ANTLR parsing and code generation with “-” operator and “-” number sign
问题 This is my grammar: grammar FOOL; @header { import java.util.ArrayList; } @lexer::members { public ArrayList<String> lexicalErrors = new ArrayList<>(); } /*------------------------------------------------------------------ * PARSER RULES *------------------------------------------------------------------*/ prog : exp SEMIC #singleExp | let exp SEMIC #letInExp | (classdec)+ SEMIC (let)? exp SEMIC #classExp ; classdec : CLASS ID ( EXTENDS ID )? (LPAR (vardec ( COMMA vardec)*)? RPAR)? (CLPAR (