I want to build a parser in C# for a language known as C/AL. This language is used by Microsoft Dynamics NAV. I have code samples, but in short, the language is roughly based on Pascal, but has many extended elements that need to be parsed. I want to parse the code, create .net object model that can be used from a C# project.
The ultimate goal is to be able to perform static code analysis from the source. I am not building a compiler, only the parser/scanner/object model that can be used from a c# project.
The object model will be represented as follows:
- Vars (globals)
- Vars (parameters)
- Vars (locals)
- Code lines (contain references to vars/objects) etc
- Events (procedures)