I'm doing a grammar lexer in antlr, and I wonder if there is any alternative to not using 'DEFAULT MODE' in antlr syntax.
I then display a fragment of code, where I use the 'DEFAULT MODE'.
But I would like to use it in java syntax, in the last line of the java code (after 'phrase1 = phrase2 = "";').
Is it possible to use 'DEFAULT MODE' in java syntax?
mode sBOILER_11;
OutMMBOILER11 : '\r\n\r\n' -> mode(DEFAULT_MODE);
GetBOILER_11 : ~('.') { frase3+=getText(); }
;
OutBOILER_11 : ('.')
{ countMatch1++;
System.out.println("Mais uma ocorrencia do Boilerplate tipo 1 -- OBLIGATION /fixada|inclui");
System.out.println("Entidade 1: " + frase1); System.out.println("Entidade 2: " + frase2 ); System.out.println("Entidade 3: " + frase3 );
frase1 = frase2 = "";
}
;