Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to create Lexer/Parser? #339

Open
it19862 opened this issue Oct 7, 2019 · 1 comment
Open

How to create Lexer/Parser? #339

it19862 opened this issue Oct 7, 2019 · 1 comment
Labels

Comments

@it19862
Copy link

it19862 commented Oct 7, 2019

Used:
Visual Studio - 2019

To install ANTLR I use - tunnelvisionlabs/antlr4cs // Github.com -

I took the grammar here - antlr/grammars-v4 // Github.com
CSharpLexer.g4
CSharpParser.g4
CSharpPreprocessorParser.g4

I did:

  1. Installed ANTLR;
  2. Created a WinFrom application;
  3. Added grammar;
    Right-click the project or folder in Solution Explorer and select
    Add Existing Element.

Question.
How to create Lexer/Parser?
The instructions say that additional classes should be created, but this does not happen.

2019-10-07_09-03-33
2019-10-07_09-04-09
2019-10-07_09-07-08
2019-10-07_09-06-20

@sharwell
Copy link
Member

The build action for the grammars should be set to Antlr4. The additional files would then be created in the obj\Debug directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants