private CommonTree ParseViaAntlrOnly(String relinqScriptCode) { var input = new ANTLRStringStream(relinqScriptCode); var lex = new EcmaScriptV3Lexer(input); var tokens = new CommonTokenStream(lex); var parser = new EcmaScriptV3Parser(tokens); return (CommonTree)parser.expression().Tree; }
public RelinqScriptExpression Parse() { var input = new ANTLRStringStream(RelinqScriptCode); var lex = new EcmaScriptV3Lexer(input); var tokens = new CommonTokenStream(lex); var parser = new EcmaScriptV3Parser(tokens); var esV3Ast = (CommonTree)parser.program().Tree; esV3Ast.RecursivelyReplaceNullListsWithEmptyOnes(); return Parse(esV3Ast); }