Awesome
Solidity Language Grammar
The ANTLR (ANother Tool for Language Recognition) grammar for Solidity is maintained in Solidity.g4.
This is a fork of (@federicobond)'s original repo, with some extra features taken from Consensys Diligence's alternative fork.
Build
Run build.sh to download the ANTLR jar file and compile the Solidity.g4 file. The build will output the Java classes to the src
folder and compiled Java classes to the target
folder. The ANTLR tokens used by the Java parser are in the src
folder.
Tests
Run run-tests.sh to parse test.sol.