Search in sources :

Example 1 with TRightPar

use of de.be4.classicalb.core.parser.node.TRightPar in project probparsers by bendisposto.

the class EBLexer method filter.

@Override
protected void filter() throws LexerException, IOException {
    super.filter();
    if (token != null && token instanceof TIdentifierLiteral && v.get(token.getText())) {
        Queue<IToken> ts = getNextList();
        List<IToken> toks = getTokenList();
        int l = token.getLine();
        int p = token.getPos();
        TLeftPar t1 = new TLeftPar(l, p);
        ts.add(t1);
        toks.add(t1);
        ts.add(token);
        toks.add(token);
        TEqual t2 = new TEqual("=", l, p);
        ts.add(t2);
        toks.add(t2);
        TTrue t3 = new TTrue("TRUE", l, p);
        ts.add(t3);
        toks.add(t3);
        TRightPar t4 = new TRightPar(l, p);
        ts.add(t4);
        toks.add(t4);
        token = null;
    }
}
Also used : IToken(de.hhu.stups.sablecc.patch.IToken) TTrue(de.be4.classicalb.core.parser.node.TTrue) TEqual(de.be4.classicalb.core.parser.node.TEqual) TRightPar(de.be4.classicalb.core.parser.node.TRightPar) TIdentifierLiteral(de.be4.classicalb.core.parser.node.TIdentifierLiteral) TLeftPar(de.be4.classicalb.core.parser.node.TLeftPar)

Aggregations

TEqual (de.be4.classicalb.core.parser.node.TEqual)1 TIdentifierLiteral (de.be4.classicalb.core.parser.node.TIdentifierLiteral)1 TLeftPar (de.be4.classicalb.core.parser.node.TLeftPar)1 TRightPar (de.be4.classicalb.core.parser.node.TRightPar)1 TTrue (de.be4.classicalb.core.parser.node.TTrue)1 IToken (de.hhu.stups.sablecc.patch.IToken)1