jakartaee / expression-language

Jakarta Expression Language
https://eclipse.org/ee4j/el
Other
68 stars 49 forks source link

LiteralExpression and LiteralComponent can match empty string #9

Closed glassfishrobot closed 11 years ago

glassfishrobot commented 14 years ago

The current productions for LiteralExpression and LiteralComponent can match the empty string. This may cause infinite recursion issues for implementers when writing parsers for these expressions.

I would suggest using the following:

LiteralExpression::= (LiteralComponent)+ ([$#])?

LiteralComponent ::= ([^$#])*([$#])?

| ([^$#])*([$#][^{]) | | ([^$#])+ |

Two of the '*' have been changed to '+' to ensure that the zero length string is not matched.

Environment

Operating System: All Platform: All

Affected Versions

[current]

glassfishrobot commented 6 years ago
glassfishrobot commented 14 years ago

@glassfishrobot Commented Reported by markt_asf

glassfishrobot commented 11 years ago

@glassfishrobot Commented kchung said: The grammar in the spec has been replaced by the RI's JAVACC grammar, which does not seem to have this problem.

glassfishrobot commented 7 years ago

@glassfishrobot Commented This issue was imported from java.net JIRA UEL-9

glassfishrobot commented 11 years ago

@glassfishrobot Commented Marked as fixed on Friday, March 15th 2013, 11:33:36 am