grammar.py: Add grammar_parse_ebnf_tokens()

Add grammar_parse_ebnf_tokens(), to be used by external grammar parsers
and grammar_parse_ebnf()

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2017-10-28 19:16:00 +02:00
commit 432d78cdc5
4 changed files with 216 additions and 91 deletions

View file

@ -5,7 +5,7 @@
'END.' ;
identifier = alphabetic character, { alphabetic character | digit } ;
number = [ "-" ], digit, { digit } ;
string = '"' , { all characters - '"' }, '"' ;
string = '"' , { all characters }, '"' ;
assignment = identifier , ":=" , ( number | identifier | string ) ;
alphabetic character = "A" | "B" | "C" | "D" | "E" | "F" | "G"
| "H" | "I" | "J" | "K" | "L" | "M" | "N"