Exemplo n.º 1
0
 private ITree GetAntlrComputedExpressionTree()
 {
     ICharStream input = new ANTLRStringStream(sourceText);
     JavascriptLexer lexer = new JavascriptLexer(input);
     CommonTokenStream tokens = new CommonTokenStream(lexer);
     JavascriptParser parser = new JavascriptParser(tokens);
     try
     {
         return parser.Expression().Tree;
     }
     catch (RecognitionException re)
     {
         throw new ArgumentException(re.Message, re);
     }
 }
Exemplo n.º 2
0
			public DFA9(JavascriptLexer _enclosing, BaseRecognizer recognizer)
			{
				this._enclosing = _enclosing;
				this.recognizer = recognizer;
				this.decisionNumber = 9;
				this.eot = DFA9_eot;
				this.eof = DFA9_eof;
				this.min = DFA9_min;
				this.max = DFA9_max;
				this.accept = DFA9_accept;
				this.special = DFA9_special;
				this.transition = DFA9_transition;
			}