Search in sources :

Example 1 with ToAst

use of sugarVisitors.ToAst in project L42 by ElvisResearchGroup.

the class Parser method parse.

public static synchronized Expression parse(String fileName, String s) {
    String old = Parser.fileName;
    Parser.fileName = fileName;
    try {
        checkForTab(s);
        checkForBalancedParenthesis(s);
        s = replaceORoundWithTab(s);
        NudeEContext ctxResult = parseCtx(s);
        Expression result = ctxResult.accept(new ToAst());
        return result;
    } finally {
        Parser.fileName = old;
    }
}
Also used : NudeEContext(antlrGenerated.L42Parser.NudeEContext) ToAst(sugarVisitors.ToAst) Expression(ast.Expression)

Aggregations

NudeEContext (antlrGenerated.L42Parser.NudeEContext)1 Expression (ast.Expression)1 ToAst (sugarVisitors.ToAst)1