Package org . sablecc . sablecc2x ;
Helpers
all | = | [ 0 .. 0xFFFF ] |
lowercase | = | [ 'a' .. 'z' ] |
uppercase | = | [ 'A' .. 'Z' ] |
digit | = | [ '0' .. '9' ] |
hex_digit | = | [ digit + [ [ 'a' .. 'f' ] + [ 'A' .. 'F' ] ] ] |
tab | = | 9 |
cr | = | 13 |
lf | = | 10 |
eol | = | cr lf | cr | lf |
not_cr_lf | = | [ all - [ cr + lf ] ] |
not_star | = | [ all - '*' ] |
not_star_slash | = | [ not_star - '/' ] |
blank | = | ( ' ' | tab | eol ) + |
short_comment | = | '//' not_cr_lf * eol |
long_comment | = | '/*' not_star * '*' + ( not_star_slash not_star * '*' + ) * '/' |
comment | = | short_comment | long_comment |
letter | = | lowercase | uppercase | '_' | '$' |
id_part | = | lowercase ( lowercase | digit ) * |
States
- normal
- package
Tokens
{ package } | |||
pkg_id | = | letter ( letter | digit ) * | |
{ normal -> package } | |||
package | = | 'Package' | |
states | = | 'States' | |
helpers | = | 'Helpers' | |
tokens | = | 'Tokens' | |
ignored | = | 'Ignored' | |
productions | = | 'Productions' | |
token_specifier | = | 'T' | |
production_specifier | = | 'P' | |
dot | = | '.' | |
d_dot | = | '..' | |
{ normal , package -> normal } | |||
semicolon | = | ';' | |
equal | = | '=' | |
l_bkt | = | '[' | |
r_bkt | = | ']' | |
l_par | = | '(' | |
r_par | = | ')' | |
l_brace | = | '{' | |
r_brace | = | '}' | |
plus | = | '+' | |
minus | = | '-' | |
q_mark | = | '?' | |
star | = | '*' | |
bar | = | '|' | |
comma | = | ',' | |
slash | = | '/' | |
arrow | = | '->' | |
colon | = | ':' | |
id | = | id_part ( '_' id_part ) * | |
char | = | ''' not_cr_lf ''' | |
dec_char | = | digit + | |
hex_char | = | '0' ( 'x' | 'X' ) hex_digit + | |
string | = | ''' [ not_cr_lf - ''' ] + ''' | |
blank | = | blank | |
comment | = | comment |
Productions
This site has been last updated by the web master
on 2007/6/24.