You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, due to an ambiguity between different patterns of extended attributes, the current parser is not as expressive as it should be as defined by the official grammar. This is due to an ambiguity that arises between specific patterns of extended attributes and the generalized form. For example:
[Attribute=Attribute=Attribute]
is an extended attribute that could be parsed in multiple ways if the general and specific patterns were mixed. I'm not sure how to resolve these ambiguities in the grammar using larlpop, so for now I've traded expressiveness with ease of use. The WebIDL specification states that it only uses 5 specific patterns of extended attributes which are all able to be parsed currently. But, an example from the Mozilla repository shows that this is not enough to be able to parse the entire file. Specifically, that file uses extended attributes of the form [Identifier=StringLiteral] but this is not one of the common patterns mentioned in the specification.
Because of this, I have slightly extended the grammar to also support extended attributes of the form [Other] and [Identifier=Other] which seems to be enough to parse the above file. But there still may be other files in the Mozilla repository that cannot be parsed. I will be writing tests to parse all the files in that directory and see if it can handle them all.
Ideally this ambiguity would be resolved, but I'm not sure how to resolve it, so this is the current workaround.
The text was updated successfully, but these errors were encountered:
Currently, due to an ambiguity between different patterns of extended attributes, the current parser is not as expressive as it should be as defined by the official grammar. This is due to an ambiguity that arises between specific patterns of extended attributes and the generalized form. For example:
is an extended attribute that could be parsed in multiple ways if the general and specific patterns were mixed. I'm not sure how to resolve these ambiguities in the grammar using larlpop, so for now I've traded expressiveness with ease of use. The WebIDL specification states that it only uses 5 specific patterns of extended attributes which are all able to be parsed currently. But, an example from the Mozilla repository shows that this is not enough to be able to parse the entire file. Specifically, that file uses extended attributes of the form
[Identifier=StringLiteral]but this is not one of the common patterns mentioned in the specification.Because of this, I have slightly extended the grammar to also support extended attributes of the form
[Other]and[Identifier=Other]which seems to be enough to parse the above file. But there still may be other files in the Mozilla repository that cannot be parsed. I will be writing tests to parse all the files in that directory and see if it can handle them all.Ideally this ambiguity would be resolved, but I'm not sure how to resolve it, so this is the current workaround.
The text was updated successfully, but these errors were encountered: