Search in sources :

Example 6 with SyntaxAnalyzer

use of org.develnext.jphp.core.syntax.SyntaxAnalyzer in project jphp by jphp-compiler.

the class JvmCompilerCase method getSyntaxTree.

protected List<Token> getSyntaxTree(Context context) {
    Tokenizer tokenizer = null;
    try {
        tokenizer = new Tokenizer(context);
    } catch (IOException e) {
        throw new RuntimeException(e);
    }
    SyntaxAnalyzer analyzer = new SyntaxAnalyzer(environment, tokenizer);
    return analyzer.getTree();
}
Also used : SyntaxAnalyzer(org.develnext.jphp.core.syntax.SyntaxAnalyzer) IOException(java.io.IOException) Tokenizer(org.develnext.jphp.core.tokenizer.Tokenizer)

Aggregations

SyntaxAnalyzer (org.develnext.jphp.core.syntax.SyntaxAnalyzer)6 Tokenizer (org.develnext.jphp.core.tokenizer.Tokenizer)6 IOException (java.io.IOException)3 Context (php.runtime.env.Context)3 ParseException (php.runtime.exceptions.ParseException)2 File (java.io.File)1 JvmCompiler (org.develnext.jphp.core.compiler.jvm.JvmCompiler)1 TokenMeta (org.develnext.jphp.core.tokenizer.TokenMeta)1 BreakToken (org.develnext.jphp.core.tokenizer.token.BreakToken)1 ColonToken (org.develnext.jphp.core.tokenizer.token.ColonToken)1 SemicolonToken (org.develnext.jphp.core.tokenizer.token.SemicolonToken)1 Token (org.develnext.jphp.core.tokenizer.token.Token)1 CastExprToken (org.develnext.jphp.core.tokenizer.token.expr.operator.cast.CastExprToken)1 UnsetCastExprToken (org.develnext.jphp.core.tokenizer.token.expr.operator.cast.UnsetCastExprToken)1 MacroToken (org.develnext.jphp.core.tokenizer.token.expr.value.macro.MacroToken)1 ExprStmtToken (org.develnext.jphp.core.tokenizer.token.stmt.ExprStmtToken)1 AbstractCompiler (php.runtime.common.AbstractCompiler)1 Environment (php.runtime.env.Environment)1 TraceInfo (php.runtime.env.TraceInfo)1 ErrorException (php.runtime.exceptions.support.ErrorException)1