Search in sources :

Example 1 with VisitorBase

use of com.dat3m.dartagnan.parsers.cat.visitors.VisitorBase in project Dat3M by hernanponcedeleon.

the class ParserCat method parse.

private Wmm parse(CharStream charStream) {
    CatLexer lexer = new CatLexer(charStream);
    CommonTokenStream tokenStream = new CommonTokenStream(lexer);
    CatParser parser = new CatParser(tokenStream);
    parser.addErrorListener(new ParserErrorListener());
    ParserRuleContext parserEntryPoint = parser.mcm();
    return (Wmm) parserEntryPoint.accept(new VisitorBase());
}
Also used : VisitorBase(com.dat3m.dartagnan.parsers.cat.visitors.VisitorBase) CommonTokenStream(org.antlr.v4.runtime.CommonTokenStream) ParserRuleContext(org.antlr.v4.runtime.ParserRuleContext) Wmm(com.dat3m.dartagnan.wmm.Wmm) CatLexer(com.dat3m.dartagnan.parsers.CatLexer) CatParser(com.dat3m.dartagnan.parsers.CatParser) ParserErrorListener(com.dat3m.dartagnan.exception.ParserErrorListener)

Aggregations

ParserErrorListener (com.dat3m.dartagnan.exception.ParserErrorListener)1 CatLexer (com.dat3m.dartagnan.parsers.CatLexer)1 CatParser (com.dat3m.dartagnan.parsers.CatParser)1 VisitorBase (com.dat3m.dartagnan.parsers.cat.visitors.VisitorBase)1 Wmm (com.dat3m.dartagnan.wmm.Wmm)1 CommonTokenStream (org.antlr.v4.runtime.CommonTokenStream)1 ParserRuleContext (org.antlr.v4.runtime.ParserRuleContext)1