You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to antlr-discussion
Is there an updated grammar (Dart.g4) for latest Dart language specification?
I found one but is using java inside *.g file. I can not compile it with antlr4.dart
I tried to convert, but I am not fluent in Java.
Ken Domino
unread,
Apr 26, 2022, 12:20:21 AM4/26/22
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to antlr-discussion
I ported the semi-official Dart grammar (https://github.com/dart-lang/sdk/blob/main/tools/spec_parser/Dart.g) to a so-called "target-agnostic format" and included Dart base classes here: https://github.com/kaby76/DartGrammar. In order for the grammar to work for both Dart and Java, the action code was moved into methods within the recognizer base classes, and replaced with method calls. NB: the language spec for Dart may be out of sync with this grammar.
Ivan Rendulic
unread,
Apr 26, 2022, 1:32:43 AM4/26/22
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to antlr-discussion
Well, it works very well. I have tested on some projects.
It is much faster than the official dart analyser package.