I am new to ANTLR4 and would like to know the best way to push info from a lexer action to the parser.
I have the following:
LINE_DIRECTIVE: '#line' [ \t]+ INTEGER [ \t]+ STRING_LITERAL { System.out.println(getText()); skip(); }
;
Basically I would like to push the getText() to the parser.
Putting a parser-rule for the line-directive is not an option as such a line directive can happen everywhere...
Thanks for your help!