Package com.sprynet.egagnon.sablecc; Helpers all = [0 .. 0xFFFF]; lowercase = ['a' .. 'z']; cr = 13; lf = 10; tab = 9; no_cr_lf = [all - [cr + lf]]; digit = ['0' .. '9']; hex = [digit + [['a' .. 'f'] + ['A' .. 'F']]]; Tokens t_package = 'Package'; t_helpers = 'Helpers'; t_tokens = 'Tokens'; t_ignored = 'Ignored'; t_productions = 'Productions'; dot = '.'; dot_dot = '..'; semicolon = ';'; equal = '='; l_bracket = '['; r_bracket = ']'; l_parenthese = '('; r_parenthese = ')'; plus = '+'; minus = '-'; q_mark = '?'; star = '*'; bar = '|'; identifier = lowercase (lowercase | '_' lowercase)*; char = '0' ('x' | 'X') hex+ | digit+ | ''' no_cr_lf '''; char_string = ''' [no_cr_lf - '''] [no_cr_lf - ''']+ '''; Ignored Tokens blank = (' ' | tab | cr | lf )+; Productions grammar = package helpers tokens ignored_tokens production_definitions; package = t_package package_name semicolon | ; package_name = package_name dot identifier | identifier; helpers = t_helpers regular_definitions | ; tokens = t_tokens regular_definitions | ; ignored_tokens = t_ignored t_tokens regular_definitions | ; regular_definitions = regular_definitions regular_definition | ; regular_definition = identifier equal regular_expression semicolon; regular_expression = regular_expression bar concatenation | concatenation; concatenation = concatenation unary_term | unary_term; unary_term = basic_term unary_operator | basic_term; basic_term = char | char_set | char_string | identifier | l_parenthese regular_expression r_parenthese; char_set = l_bracket basic_term binary_operator basic_term r_bracket | l_bracket char dot_dot char r_bracket; unary_operator = star | q_mark | plus; binary_operator = plus | minus; production_definitions = t_productions productions | ; productions = productions production | ; production = identifier equal alternatives semicolon; alternatives = alternatives bar alternative | alternative; alternative = identifiers; identifiers = identifiers identifier | ;