Search in sources :

Example 1 with ProcessorParser

use of com.kasirgalabs.thumb2.ProcessorParser in project ETUmulator by kasirgalabs.

the class BaseProcessor method execute.

private void execute(String instruction) {
    ProcessorLexer lexer = new ProcessorLexer(CharStreams.fromString(instruction));
    CommonTokenStream tokens = new CommonTokenStream(lexer);
    ProcessorParser parser = new ProcessorParser(tokens);
    ProcessorParser.ProgContext tree = parser.prog();
    this.visit(tree);
}
Also used : CommonTokenStream(org.antlr.v4.runtime.CommonTokenStream) ProcessorLexer(com.kasirgalabs.thumb2.ProcessorLexer) ProcessorParser(com.kasirgalabs.thumb2.ProcessorParser)

Aggregations

ProcessorLexer (com.kasirgalabs.thumb2.ProcessorLexer)1 ProcessorParser (com.kasirgalabs.thumb2.ProcessorParser)1 CommonTokenStream (org.antlr.v4.runtime.CommonTokenStream)1