-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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 Dart.g "part of" new rule to recognize some files #45916
Comments
I have no permissions to do a push from a local branch i created to do the pull request unfortunately |
Thanks! That's a missing update; it is handled in https://dart-review.googlesource.com/c/sdk/+/198400. |
@eernstg I checked the update, but the rule of the parser "partHeader" is not being called. Regards Pedro Mimoso Silva. |
@pedro-mimoso — The grammar rule However, the only thing which is not tested because of this fact is the ( Are you trying to use |
@eernstg at this moment i'm using only the Grammar, Dart.g to test with ANTLR grun command if it parses projects extracted from github, so i can see the accuracy for each project. i Hva e a script in python that runs the command "grun" for each file of the project by passing the "libraryDefinition" rule as the first rule of the Grammar. So in this case since partHeader is never called in the Grammar itself, files who use "part of" will give an error. But since the main objective of this Grammar is not the same of mine there is no need to change :). I just made a quick adjustment and it parses those files |
Very good, thanks! |
Tiny bug fix, cf. dart-lang/sdk#45916: The specification currently allows for a part of directive where the enclosing library is specified using <identifier> ('.' <identifier>)*, but not using <uri>. The latter is intended to work, and it has been working in all tools for a while, and this PR just brings the specification up to date.
Hello, I'm doing a Masters Thesis that involves using a Dart grammar, and i think this one is the best so far.
If you are interested i did a clone of various projects of dart and analyzed how the accuracy of the grammar was in those projects.
I started using it in version 0.4 with antlr4, but now i saw that it had some changes and i did the same tests again and i saw some really great improvements in accuracy.
However, i did need to add some rules to the grammar, because "part of" is not recognized.
part of cobblestone;
It accepts a uri instead of cobblestone for example.
The text was updated successfully, but these errors were encountered: