I have a situation wherein I have defined lexer tokens as below and respective parser rule calling the same: TOK: 'IF' (.)* 'END_IF'; BLOCK: 'FUNCTION_BLOCK'; START: 'BEGIN'; END: 'END_BLOCK'; TRY: (options {greedy=true;}: .)* ; For Inputs like: Input 1: IF a>b END_IF - ANTLR works fine But for Inputs like Input 2: FUNCTION_BLOCK BEGIN END_BLOCK - ANTLR lexer goes to the token TRY instead of BLOCK token. NOTE: I am using ANTLR3.
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)