segfault
This commit is contained in:
parent
bd90eca237
commit
1f778c1652
1 changed files with 30 additions and 0 deletions
30
grammars/ebnf.ebnf
Normal file
30
grammars/ebnf.ebnf
Normal file
|
@ -0,0 +1,30 @@
|
|||
letter ::= "A" | "B" | "C" | "D" | "E" | "F" | "G" | "H" | "I" | "J" | "K" | "L" | "M" | "N" | "O" | "P" | "Q" | "R" | "S" | "T" | "U" | "V" | "W" | "X" | "Y" | "Z" | "a" | "b" | "c" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "r" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z"
|
||||
|
||||
digit ::= "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9"
|
||||
# removed " | "\f" | "\b"
|
||||
symbol ::= "[" | "]" | "{" | "}" | "(" | ")" | "<" | ">" | "'" | "=" | "|" | "." | "," | ";" | "-" | "+" | "*" | "?" | "\n" | "\t" | "\r"
|
||||
|
||||
character ::= letter | digit | symbol | "_" | " "
|
||||
identifier ::= letter ( letter | digit | "_" )
|
||||
|
||||
#| "\f" | "\b"
|
||||
S ::= ( " " | "\n" | "\t" | "\r" )
|
||||
|
||||
terminal ::= "'" character - "'" ( character - "'" ) "'"
|
||||
#| '"' character - '"' ( character - '"' ) '"'
|
||||
|
||||
terminator ::= (";" | ".")
|
||||
|
||||
term ::= "(" S rhs S ")" | "[" S rhs S "]" | "{" S rhs S "}" | terminal | identifier
|
||||
|
||||
factor ::= term S "?" | term S "*" | term S "+" | term S "-" S term | term S
|
||||
|
||||
concatenation ::= ( S factor S "," ? ) +
|
||||
alternation ::= ( S concatenation S "|" ? ) +
|
||||
|
||||
rhs ::= alternation
|
||||
lhs ::= identifier
|
||||
|
||||
rule ::= lhs S "=" S rhs S terminator
|
||||
|
||||
root ::= ( S rule S ) *
|
Loading…
Add table
Add a link
Reference in a new issue