-
Notifications
You must be signed in to change notification settings - Fork 301
Building the Parser
Mathieu Guindon edited this page Jan 11, 2017
·
5 revisions
When changes are made to the VBAParser.g4 grammar, the following steps should be taken:
- Save changes
- (turn off ReSharper solution-wide analysis)
- Delete the following generated files under Rubberduck.Parsing.Grammar:
- VBAParser.cs
- VBAParserBaseListener.cs
- VBAParserBaseVisitor.cs
- VBAParserListener.cs
- VBAParserVisitor.cs
- (toggle 'Show all files' on in VS Solution Explorer)
- Delete the following generated files under Rubberduck.Parsing\obj if they exist:
- VBAParser.cs
- VBAParserBaseListener.cs
- VBAParserBaseVisitor.cs
- VBAParserListener.cs
- VBAParserVisitor.cs
- Set 'Build Action' of VBAParser.g4 grammar file to "Antlr4": this will generate all files that need to be generated
- Set 'Build Action' of VBAParser.g4 grammar file back to "None"
- Copy the following generated files from Rubberduck.Parsing\obj to Rubberduck.Parsing.Grammar:
- VBAParser.cs
- VBAParserBaseListener.cs
- VBAParserBaseVisitor.cs
- VBAParserListener.cs
- VBAParserVisitor.cs
- (turn ReSharper solution-wide analysis back on)
- Run all tests
A lot of tests require a working parser to be conclusive. If something broke, the VS Test Explorer will have these tests as "Skipped Tests". Any broken parser unit tests will be under "Failed Tests". A successful modification will not break any tests.
rubberduckvba.com
© 2014-2021 Rubberduck project contributors
- Contributing
- Build process
- Version bump
- Architecture Overview
- IoC Container
- Parser State
- The Parsing Process
- How to view parse tree
- UI Design Guidelines
- Strategies for managing COM object lifetime and release
- COM Registration
- Internal Codebase Analysis
- Projects & Workflow
- Adding other Host Applications
- Inspections XML-Doc
-
VBE Events