Package net.sf.laja.parser.engine2.source

Examples of net.sf.laja.parser.engine2.source.Source


        return factory2;
    }

    // parse string
    public ParsingResult parseString(String string) throws ParserException {
        return parse(new StringSource(string));
    }
View Full Code Here


public class StringSourceTest {
 
  @Test
  public void errorInLineOne() {
    StringSource stringSource = new StringSource("12345\n6789");
   
    final int index = 0;
    SourceLine sourceLine = stringSource.getSourceLine(index);
    SourceLine expectedLine = new SourceLine(1, 1, index, "12345", "^");
   
    assertEquals(expectedLine, sourceLine);
  }
View Full Code Here

    assertEquals(expectedLine, sourceLine);
  }

  @Test
  public void errorInLineTwo() {
    StringSource stringSource = new StringSource("1\r\n2345\r\n67");
   
    final int index = 4;
    SourceLine sourceLine = stringSource.getSourceLine(index);
    SourceLine expectedLine = new SourceLine(2, 2, index, "2345", " ^");
   
    assertEquals(expectedLine, sourceLine);
  }
View Full Code Here

        return factory2;
    }

    // parse string
    public ParsingResult parseString(String string) throws ParserException {
        return parse(new StringSource(string));
    }
View Full Code Here

        return factory2;
    }

    // parse string
    public ParsingResult parseString(String string) throws ParserException {
        return parse(new StringSource(string));
    }
View Full Code Here

        return factory2;
    }

    // parse string
    public ParsingResult parseString(String string) throws ParserException {
        return parse(new StringSource(string));
    }
View Full Code Here

    return parse(new FileSource(filename));
  }

  // parse URL
  public ParsingResult parseURL(String url) throws ParserException {
    return parse(new URLSource(url));
  }
View Full Code Here

        return parse(new FileSource(filename));
    }

    // parse URL
    public ParsingResult parseURL(String url) throws ParserException {
        return parse(new URLSource(url));
    }
View Full Code Here

        return parse(new FileSource(filename));
    }

    // parse URL
    public ParsingResult parseURL(String url) throws ParserException {
        return parse(new URLSource(url));
    }
View Full Code Here

        return parse(new FileSource(filename));
    }

    // parse URL
    public ParsingResult parseURL(String url) throws ParserException {
        return parse(new URLSource(url));
    }
View Full Code Here

TOP

Related Classes of net.sf.laja.parser.engine2.source.Source

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.