Changing names of grammar elements.

Starting with an "_" will prevent collisions with extensions
This commit is contained in:
Jeff Avallone
2014-12-02 19:59:10 -05:00
parent 9609b1d5b7
commit 1ffcd785f8
3 changed files with 8 additions and 6 deletions
+5 -3
View File
@@ -1,7 +1,9 @@
grammar JavascriptRegexp
root <- ( ( "/" regexp "/" fl:[igm]* ) / regexp ""? ) <Root>
regexp <- match alternates:( "|" match )* <Regexp>
match <- anchor_start? ( ( subexp / charset / terminal ) repeat? )* anchor_end? <Match>
root <- ( ( "/" regexp "/" _flags:[igm]* ) / regexp ""? ) <Root>
regexp <- _match:match _alternates:( "|" match )* <Regexp>
match <- _anchor_start:anchor_start?
_parts:( ( subexp / charset / terminal ) repeat? )*
_anchor_end:anchor_end? <Match>
anchor_start <- "^"
anchor_end <- "$"
repeat <- ( repeat_any / repeat_required / repeat_optional / repeat_spec ) repeat_greedy?