Skip to content
This repository has been archived by the owner on Sep 7, 2021. It is now read-only.

Latest commit

 

History

History
27 lines (19 loc) · 837 Bytes

README.md

File metadata and controls

27 lines (19 loc) · 837 Bytes

TSL antlr grammar

To set up a correct antlr environnement you can follow this README

Then you can execute the antlr command to build the grammar

antlr4 tsl.g4
javac tsl*.java

You can use the grun command to test the Grammar with the tsl.expr file

grun tsl prog -gui tsl.expr

Grammar files

  • The tsl.g4 contains all the grammar rules of TSL.
  • The tslTokens.g4 contains all the tokens parsed in TSL.
  • The tsl.expr contains some valid syntax expr.

Miss and improvements

  • At the current time there is a syntax issue with the , token. The ANTLR grammar expect a space after a , in functions arguments when it shouldn't be requiried
  • Add rules allowed returns
  • Check variable keys (exists when called and variable type)