Demo entry 6317567

ebnf

   

Submitted by anonymous on Nov 05, 2016 at 22:57
Language: EBNF. Code size: 977 Bytes.

(* EBNF notations *)

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" ;
symbol = "[" | "]" | "{" | "}" | "(" | ")" | "<" | ">" | "?"
       | "'" | '"' | "=" | "|" | "." | "," | ";" | "*" | ":" ;
character = letter | digit | symbol | "_" ;

identifier = letter , { letter | digit | "_" | "-" } ;
terminal = "'" , character , { character } , "'" 
         | '"' , character , { character } , '"' ;
 
lhs = identifier ;
rhs = identifier
     | terminal
     | "[" , rhs , "]"
     | "{" , rhs , "}"
     | "(" , rhs , ")"
     | rhs , "|" , rhs
     | rhs , "," , rhs 
     | "(*" , { character } , "*)" ;

rule = lhs , "=" , rhs , ";" ;
grammar = { rule } ;

This snippet took 0.01 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).