diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2014-12-04 22:59:30 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2014-12-04 22:59:30 (GMT) |
commit | 12154652c576144405011b5bd267c15c9667f223 (patch) | |
tree | be552b2b7bc563a58892e8950afd920a45132a6e /tools/d2c/d2c_tok.l | |
parent | 6803c5d5b86416d1748d4d37a5cc5cb44fe007b1 (diff) |
Provided a new way to build the full name of each instruction and cached it.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@435 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'tools/d2c/d2c_tok.l')
-rw-r--r-- | tools/d2c/d2c_tok.l | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/d2c/d2c_tok.l b/tools/d2c/d2c_tok.l index e40f10d..78abfd3 100644 --- a/tools/d2c/d2c_tok.l +++ b/tools/d2c/d2c_tok.l @@ -29,7 +29,7 @@ void free_flex_memory(void) ; %x encoding_bits encoding_bits_size -%x syntax syntax_int syntax_ext +%x syntax syntax_name syntax_int syntax_ext %x conv_begin conv_content conv_arg conv_arg_binval @@ -95,6 +95,10 @@ void free_flex_memory(void) ; <syntax>[ ]+ { } <syntax>"\n" { BEGIN(encoding_content); } +<syntax>[\"] { BEGIN(syntax_name); } +<syntax_name>[^ \n\"]+ { d2c_lval.string = strdup(yytext); return OPERAND_NAME; } +<syntax_name>[\"] { BEGIN(syntax); } + <syntax>"{" { BEGIN(syntax_int); } <syntax_int>[^ \n}]+ { d2c_lval.string = strdup(yytext); return OPERAND_INTERNAL; } <syntax_int>"}" { BEGIN(syntax); } |