feat/schema: add lexer
This commit is contained in:
18
schema/azschema.bnf
Normal file
18
schema/azschema.bnf
Normal file
@@ -0,0 +1,18 @@
|
||||
string: '`' {.} '`' | '"' {.} '"';
|
||||
|
||||
_bin_digit: '0' - '1';
|
||||
_oct_digit: _bin_digit | '2' - '7';
|
||||
_dec_digit: _oct_digit | '8' - '9';
|
||||
_hex_digit: _dec_digit | 'A' - 'F' | 'a' - 'f';
|
||||
_negative: '-';
|
||||
number: [_negative] '0' 'b' _bin_digit {_bin_digit}
|
||||
| [_negative] '0' 'o' _oct_digit {_oct_digit}
|
||||
| [_negative] _dec_digit {_dec_digit}
|
||||
| [_negative] '0' 'x' _hex_digit {_hex_digit};
|
||||
|
||||
_name_initial: 'A' - 'Z' | 'a' - 'z' | '_' | '~' | '!' | '@' | '#' | '$' | '%' | '^' | '&' | '*' | '-' | '_' | '+' | '=' | '?' | '/' | '.' | '\'';
|
||||
_name_char: _name_initial | _dec_digit;
|
||||
name: _name_initial {_name_char};
|
||||
|
||||
!whitespace: ' ' | '\t' | '\n' | '\r';
|
||||
!comment: ';' {.} '\n';
|
||||
Reference in New Issue
Block a user