diff options
author | Lev Walkin <vlm@lionet.info> | 2005-08-22 12:23:54 +0000 |
---|---|---|
committer | Lev Walkin <vlm@lionet.info> | 2005-08-22 12:23:54 +0000 |
commit | 4696c74b7255861ae5c01b4f59168c91c1f36145 (patch) | |
tree | 954e6492949a2661aa0fe92ac9e6335a4acab378 /libasn1parser/asn1p_l.l | |
parent | b85a8135dae955c09b23197f5497b8ff911d083d (diff) |
asn1c code generator modifier: <asn1c:pointer>
Diffstat (limited to 'libasn1parser/asn1p_l.l')
-rw-r--r-- | libasn1parser/asn1p_l.l | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/libasn1parser/asn1p_l.l b/libasn1parser/asn1p_l.l index 04a55046..d12aae1c 100644 --- a/libasn1parser/asn1p_l.l +++ b/libasn1parser/asn1p_l.l @@ -25,6 +25,8 @@ int asn1p_lexer_types_year = 0; int asn1p_lexer_constructs_year = 0; static asn1c_integer_t asn1p_atoi(char *ptr); /* errno is either 0 or ERANGE */ +int asn1p_as_pointer; + /* * Check that the type is defined in the year of the standard choosen. */ @@ -100,15 +102,27 @@ WSP [\t\r\v\f\n ] {NL} yy_pop_state(); + "<asn1c:"[^\r\v\f\n>-]{1,80}">" { + if(strcmp(yytext, "<asn1c:pointer>") == 0) + asn1p_as_pointer = 1; + /* Eat modifier */ + } + "<" /* Eat stand-alone left angle brace */ + -- yy_pop_state(); /* End of comment */ - /* Eat single dash */ - [^\r\v\f\n-]+ /* Eat */ + [^\r\v\f\n<-]+ /* Eat */ } <INITIAL,cpp_comment>"/*" yy_push_state(cpp_comment); <cpp_comment>{ - [^*/] /* Eat */ + [^*/<] /* Eat */ "*/" yy_pop_state(); + "<asn1c:"[^\r\v\f\n>-]{1,80}">" { + if(strcmp(yytext, "<asn1c:pointer>") == 0) + asn1p_as_pointer = 1; + /* Eat modifier */ + } . /* Eat */ } |