Exemplo n.º 1
0
 public void TestQuotedStringWithSpaces()
 {
     Lexer l = new Lexer("\" abc def\"");
     Token t = l.next(Lexer.Mode.DEFAULT);
     Assert.IsTrue(t.type == Token.Type.QUOTED_STRING);
     Assert.IsTrue(t.repr.CompareTo("\" abc def\"") == 0);
 }
Exemplo n.º 2
0
 public void TestDotAtom()
 {
     Lexer p = new Lexer("abc.def");
     Token t = p.next(Lexer.Mode.DEFAULT);
     Assert.IsTrue(t.type == Token.Type.DOT_ATOM);
     Assert.IsTrue(t.repr.CompareTo("abc.def") == 0);
 }
Exemplo n.º 3
0
 public Parser(String s)
 {
     l = new Lexer(s);
 }
Exemplo n.º 4
0
 public Parser(StreamReader sr)
 {
     l = new Lexer(sr);
 }