We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
One example of an ambiguity in the grammar is within shape_section given in the Smithy IDL specification under "Smithy IDL ABNF" -> "Shapes".
shape_section
shape_section : [`namespace_statement` [`use_section`] [`shape_statements`]] use_section : *(`use_statement`)
Is [`use_section`] empty or is it populated with an empty *(`use_statement`)?
[`use_section`]
*(`use_statement`)
This places Smithy IDL outside of a large class of grammars (see page 4 of Miscellaneous Parsing).
An example of where this is a problem is when trying to implement the grammar in lalrpop which will complain when we try to implement the following
use_section = use_statement*; pub shape_section = use_section?;
A similar conflict is described in this issue.
The ambiguity around [`use_section`] can be resolved by making it non-optional or changing use_section to 1*(`use_statement`).
use_section
1*(`use_statement`)
Disclaimer: I'm not an expert in language theory, please be skeptical of my claims and correct me where needed.
The text was updated successfully, but these errors were encountered:
I don't think this is ambiguous, but sure the [ and ] around use_section is unnecessary since *(use_statement) is already 0 or more.
[
]
*(use_statement)
And yes, we can change the grammar if it's a bug fix. Please feel free to send us a PR!
Sorry, something went wrong.
*WS
[WS]
OperationBody
*SP
[SP]
No branches or pull requests
One example of an ambiguity in the grammar is within
shape_section
given in the Smithy IDL specification under "Smithy IDL ABNF" -> "Shapes".Is
[`use_section`]
empty or is it populated with an empty*(`use_statement`)
?This places Smithy IDL outside of a large class of grammars (see page 4 of Miscellaneous Parsing).
An example of where this is a problem is when trying to implement the grammar in lalrpop which will complain when we try to implement the following
A similar conflict is described in this issue.
The ambiguity around
[`use_section`]
can be resolved by making it non-optional or changinguse_section
to1*(`use_statement`)
.Disclaimer: I'm not an expert in language theory, please be skeptical of my claims and correct me where needed.
The text was updated successfully, but these errors were encountered: