antlr / grammars-v4

Grammars written for ANTLR v4; expectation that the grammars are free of actions.
MIT License
10.12k stars 3.69k forks source link

Make cpp14 grammer work with python 3 target library #902

Open faza opened 6 years ago

faza commented 6 years ago

What change should i make to the below part in the grammar file?

purespecifier : Assign val = Octalliteral {if($val.text.compareTo("0")!=0) throw new InputMismatchException(this);}

;

Mohd-Bilal commented 5 years ago

You can change that line to {if($val.text.compareTo("0")!=0)raise InputMismatchException(this);}