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

VS Extension not generating lexer parser constructors #323

Open
snortblt opened this issue Apr 10, 2019 · 4 comments
Open

VS Extension not generating lexer parser constructors #323

snortblt opened this issue Apr 10, 2019 · 4 comments

Comments

@snortblt
Copy link

snortblt commented Apr 10, 2019

In what few examples I can find scouring the web, it seems that the partial lexer/parser classes generated when adding a new parser or lexer via Visual Studio's "Add | New Item" menu (vian) don't have the expected constructors. The classes generated are completely empty yet the samples I see are calling constructors accepting an AntlrInputStream. If this isn't a bug, please provide additional explanation in the VS setup guide.

Using ANTLR Language Support extension v1.4.0, Antlr4 nuget package v4.6.6.

@snortblt
Copy link
Author

snortblt commented Apr 11, 2019

Getting this now too. Tried reinstalling. The log file doesn't mention anything ostensibly helpful.

image

@sharwell
Copy link
Member

The classes generated are completely empty yet the samples I see are calling constructors accepting an AntlrInputStream.

The files created by the template are not the generated source files. You'll find the generated source file(s) in the intermediate output directory (typically obj\Debug and obj\Release) with the extension .g.cs. The empty files added to your project allow you to add new methods to the same class which contains generated code in another file. See Partial Classes and Methods for more information.

Getting this now too. Tried reinstalling. The log file doesn't mention anything ostensibly helpful.

Well that's not good. Can you search in the XML file for "error" or "exception" and copy the information here? Hopefully I can make sense of it to fix the issue.

@snortblt
Copy link
Author

snortblt commented Apr 15, 2019

Not sure why, but uninstalling and reinstalling the extension a second time fixed both issues. I do have VS 2019 installed side by side with 2017. They are supposed to be independent, but I've seen evidence that that isn't always the case. Perhaps this is related.

Speaking of 2019, it appears the extension is not yet compatible with that version of VS. If not already, it would be great to have this on the backlog. Thanks for the great work!

@sharwell
Copy link
Member

sharwell commented Jun 4, 2019

Speaking of 2019, it appears the extension is not yet compatible with that version of VS. If not already, it would be great to have this on the backlog. Thanks for the great work!

The Visual Studio extension is actually part of tunnelvisionlabs/LangSvcV2. This repository just contains the C# runtime library, code generator, and MSBuild integration.

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

No branches or pull requests

2 participants