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

Grammar looks fine in PyCharms ANTLR Preview, but doesn't parse (in Py3 and C#) #3210

Open
DerIltis opened this issue Jun 23, 2021 · 3 comments

Comments

@DerIltis
Copy link

Dear all,

I created a grammar for a certain file format withPyCharm and the ANTLR4 plugin. I also "tested" this grammar with PyCharms "ANTLR Preview" feature on files with ~100k lines and everything looks fine. In a simple example, one would get:
image

However, whenever I try to manually parse a file with the generated code (both in C# or Py3), I get a different behaviour for some CarriageReturns:
line 1:0 mismatched input 'dataset\r' expecting 'dataset'

Unfortunately, the grammar is quite comprehensive and I need some more hours to extract the minimal example from it. However, I also recognized that there have been some differences between C# and JAVA output, as mentioned here:

#3112

Could someone of you tell me if 'my' problem could be related to these issues? Would it for example make sense to step back to an older version of ANTLR and the ANTLR runtime, either for the purpose of debugging or to get things working in the first place?

Thank you very much!

@ericvergnaud
Copy link
Contributor

ericvergnaud commented Jun 23, 2021 via email

@DerIltis
Copy link
Author

Hi eric,

Thank you for your hint. I can access the antlr discussion here:

https://groups.google.com/g/antlr-discussion

But how do I post something in there? I have no google account...

With kind regards,

Marcel

@KvanTTT
Copy link
Member

KvanTTT commented Jul 2, 2021

Also, you can start a discussion.

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

3 participants