...
Code Block | ||
---|---|---|
| ||
@members { public static void main(String[] args) throws Exception { SimpleCalcLexer lex = new SimpleCalcLexer(new ANTLRFileStream(args[0])); CommonTokenStream tokens = new CommonTokenStream(lex); SimpleCalcSimpleCalcParser parser = new SimpleCalcSimpleCalcParser(tokens); try { parser.expr(); } catch (RecognitionException e) { e.printStackTrace(); } } } |
...
Construct | Description | Example |
---|---|---|
| Kleene closure - matches zero or more occurrences | |
| Positive Kleene closure - matches one or more occurrences | |
| | |