ANTLR4 parser generator for Sanskrit language
If you need help to set up everything you can read the Java Setup section of the ANTLR Mega Tutorial
Or simply you can download the IntelliJ IDEA community edition IDE and install the plugin ANTLR v4. It will make things easier and by right clicking in grammar file it will show the options related to ANTLR commands. You can right click on a rule and by clicking "Test Rule ", it will show a text box on left where you can write the sanskrit sentence in their non-conjugated root form like र॒मुँ॒+घञ्+अ: ग॒मॢँ॑+लट्+तिप्| which english translation will be "Ram goes.", and on the right side it will show the parse tree. And you can see how the whole sentence is formed.
The main grammar file is located at https://github.com/kaushalbx/SanskritParser/blob/master/src/main/antlr4/com/ottego/sanskritparser/Sanskrit.g4
The commands you need to know:
# this README assumes that you have installed Gradle in your system
# to generate the JetBrains IntelliJ IDEA project
./gradlew idea
# you can then use standard interface of IntelliJ IDEA to build and run the program
# alternatively, if you just want to use gradle
# to generate the ANTLR4 Parser
./gradlew generateGrammarSource
# to compile the program
./gradlew compileJava
# to create a JAR with all dependencies
./gradlew fatJar
# ... and then run the program
java -jar .\build\libs\markup-example-gradle-all.jar
# to run the tests
./gradlew test
Contributions are always welcome!