The GOAL grammar tools consist of all components that are needed to process and analyze program files. These include:
- lexers (lexical analyzers)
- parsers (syntax analyzers)
- validators (semantic analyzers)
Various grammars are needed for modules (.mod2g), MAS (.mas2g) files, and test (
These tools depend on similar tools for the knowledge representation technologies that are supported by GOAL. The content of an agent's cognitive state, cognitive state conditions (e.g. in rules), and pre- and post-conditions of actions all vary with the knowledge representation language that is used.
This project combines all these tools into a single package for use by the GOAL run-time environment.
Check out the grammar tools as a Maven project using git as SCM. Run the pom files to obtain a working package that can be used to verify whether MAS, module, or test files are grammatical.
We have used Maven, the ANTLR 4 maven plugin, and the ANTLR 4 plugin for Eclipse provided as Eclipse plugin. Although this works, in Eclipse, for some reason the project is unstable and changes seem to easily produce errors and/or warnings. We do not know exactly what causes this but (at least for now) it seems we have to live with it. (Refresh and Update Maven project in Eclipse should most of the time do the trick to get rid of the problems.) On the command line everything works fine. Make sure that the path
/languageTools/target/generated-sources/antlr4 is always configured as source folder (in Eclipse select folder, right click, select Build Path, Use as Source Folder).