diff options
Diffstat (limited to 'tools/d2c/d2c_tok.l')
-rw-r--r-- | tools/d2c/d2c_tok.l | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tools/d2c/d2c_tok.l b/tools/d2c/d2c_tok.l index 71f1a15..8f54c8d 100644 --- a/tools/d2c/d2c_tok.l +++ b/tools/d2c/d2c_tok.l @@ -33,6 +33,8 @@ void free_flex_memory(void) ; %x conv_begin conv_content conv_arg conv_arg_binval +%x hooks_begin hooks_content + %x rules_begin rules_content rules_cond rules_cond_binval rules_action rules_action_see @@ -145,6 +147,17 @@ void free_flex_memory(void) ; +<encoding_content>"@hooks" { BEGIN(hooks_begin); return HOOKS; } +<hooks_begin>[ ]+ { } +<hooks_begin>"{" { BEGIN(hooks_content); } +<hooks_content>"}" { BEGIN(encoding_content); } + +<hooks_content>[ \t\n]+ { } +<hooks_content>[a-z_][a-z0-9_]* { d2c_lval.string = strdup(yytext); return NAME; } +<hooks_content>"=" { return EQ; } + + + <encoding_content>"@rules" { BEGIN(rules_begin); return RULES; } <rules_content>\/\/[^\n]+ { printf("SKIP '%s'\n", yytext); } <rules_begin>[ ]+ { } |