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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scala Grammar doesn't give correct tokens with ANTLR4 #517

Closed
shiva10162 opened this issue Nov 23, 2016 · 8 comments
Closed

Scala Grammar doesn't give correct tokens with ANTLR4 #517

shiva10162 opened this issue Nov 23, 2016 · 8 comments
Labels

Comments

@shiva10162
Copy link

I am working on ANTLR tool to parse the Scala file. I used the following grammar for it 馃憤 []https://github.com/antlr/grammars-v4/tree/master/scala .But using this grammar it doesn't give me correct tokens. I addressed my problem here completely with source code and example : http://stackoverflow.com/questions/40482259/antlr-doesnt-give-correct-output-tokens-for-scala-grammar. Please have a look. Cheers !

@teverett
Copy link
Member

Could you submit a pull request pls.

@shiva10162
Copy link
Author

yes sure . but I am working on Antlr tool to parse Scala language. I am not working on Scala language grammar.

@JeremyMarshall
Copy link

It would seem it is this rule

opchar           ::= // printableChar not matched by (whiteSpace | upper | lower |
                     // letter | digit | paren | delim | opchar | Unicode_Sm | Unicode_So)

which is actually defined as

opchar ::= printableChar

and therefore matching square brackets as part of identifiers and so on...

@chengniansun
Copy link
Contributor

Hi,

I came across the same problem. Is there gonna be a fix for this?

Thank you.

@chengniansun
Copy link
Contributor

Could some one suggest how to fix this? I am new to Antlr too, but need the scalar parser to work.

Thanks.

@teverett teverett added the scala label Jul 10, 2017
@KvanTTT
Copy link
Member

KvanTTT commented Jul 20, 2017

Feel free not to use it. This repository is developing by the community for free. So, no claims to authors.

@nomailforme
Copy link

Hi @KvanTTT ,
Are there any efforts / plans to fix this at the moment ? Or is it not on the priority list for now ?
Please update us so that we can look at other options / try to fix it

@KvanTTT
Copy link
Member

KvanTTT commented Aug 16, 2017

I have no plans to improve Scala grammar in the near future.

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

6 participants