(file) Return to cimmof.l CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Compiler

Diff for /pegasus/src/Pegasus/Compiler/cimmof.l between version 1.10 and 1.11

version 1.10, 2005/02/09 22:08:12 version 1.11, 2005/02/10 23:14:15
Line 132 
Line 132 
                                     */                                     */
 \"                                  { BEGIN(myStr); strbuf_p = strbuf; \"                                  { BEGIN(myStr); strbuf_p = strbuf;
                                       /**strbuf_p++ = '"';*/ }                                       /**strbuf_p++ = '"';*/ }
 <str>\"                             { BEGIN(INITIAL);  <myStr>\"                             { BEGIN(INITIAL);
                                       /**strbuf_p++ = '"';*/  *strbuf_p = '\0';                                       /**strbuf_p++ = '"';*/  *strbuf_p = '\0';
                                       cimmof_leng = strbuf_p - strbuf;                                       cimmof_leng = strbuf_p - strbuf;
                                       cimmof_lval.strval = new String(strbuf);                                       cimmof_lval.strval = new String(strbuf);
                                       return TOK_STRING_VALUE; }                                       return TOK_STRING_VALUE; }
 <str><<EOF>>                        |  <myStr><<EOF>>                        |
 <str>\n                             { BEGIN(INITIAL);  <myStr>\n                             { BEGIN(INITIAL);
                                       /**strbuf_p++ = '"';*/  *strbuf_p = '\0';                                       /**strbuf_p++ = '"';*/  *strbuf_p = '\0';
                                       cimmof_leng = strbuf_p - strbuf;                                       cimmof_leng = strbuf_p - strbuf;
                                       cimmof_lval.strval = new String(strbuf);                                       cimmof_lval.strval = new String(strbuf);
                                       return TOK_UNEXPECTED_CHAR; }                                       return TOK_UNEXPECTED_CHAR; }
 <str>\\b                            { /* backspace */        *strbuf_p++ = '\b'; }  <myStr>\\b                            { /* backspace */        *strbuf_p++ = '\b'; }
 <str>\\f                            { /* form feed */        *strbuf_p++ = '\f'; }  <myStr>\\f                            { /* form feed */        *strbuf_p++ = '\f'; }
 <str>\\n                            { /* line feed */        *strbuf_p++ = '\n'; }  <myStr>\\n                            { /* line feed */        *strbuf_p++ = '\n'; }
 <str>\\r                            { /* carriage return */  *strbuf_p++ = '\r'; }  <myStr>\\r                            { /* carriage return */  *strbuf_p++ = '\r'; }
 <str>\\t                            { /* horizontal tab */   *strbuf_p++ = '\t'; }  <myStr>\\t                            { /* horizontal tab */   *strbuf_p++ = '\t'; }
 <str>\\'                            { /* single quote */     *strbuf_p++ = '\''; }  <myStr>\\'                            { /* single quote */     *strbuf_p++ = '\''; }
 <str>\\\"                           { /* double quote */     *strbuf_p++ = '"';  }  <myStr>\\\"                           { /* double quote */     *strbuf_p++ = '"';  }
 <str>\\\\                           { /* backslash */        *strbuf_p++ = '\\'; }  <myStr>\\\\                           { /* backslash */        *strbuf_p++ = '\\'; }
 <str>\\[xX]                         { yy_push_state(myHex);  <myStr>\\[xX]                         { yy_push_state(myHex);
                                       memcpy(slashx,yytext,2);                                       memcpy(slashx,yytext,2);
                                       }                                       }
 <str>\\(.|\n)                       { *strbuf_p++ = '\\';  <myStr>\\(.|\n)                       { *strbuf_p++ = '\\';
                                       *strbuf_p++ = yytext[1]; }                                       *strbuf_p++ = yytext[1]; }
 <str>[^\\\n\"]+                     { char *t = yytext;  <myStr>[^\\\n\"]+                     { char *t = yytext;
                                       while( *t ) *strbuf_p++ = *t++;                                       while( *t ) *strbuf_p++ = *t++;
                                       *strbuf_p = '\0'; }                                       *strbuf_p = '\0'; }
 <hex>[0-9A-Fa-f]{1,4}               { /* get escaped hex digits */  <myHex>[0-9A-Fa-f]{1,4}               { /* get escaped hex digits */
                                       char  hexfmt[4];   unsigned int n;                                       char  hexfmt[4];   unsigned int n;
                                       sprintf( hexfmt, "%%%dx", yyleng );                                       sprintf( hexfmt, "%%%dx", yyleng );
                                       sscanf(yytext, hexfmt, &n);                                       sscanf(yytext, hexfmt, &n);
Line 172 
Line 172 
                                       else *strbuf_p++ = *(char*)&n;                                       else *strbuf_p++ = *(char*)&n;
                                       yy_pop_state();                                       yy_pop_state();
                                       }                                       }
 <hex>.                              { memcpy(strbuf_p,slashx,2);  <myHex>.                              { memcpy(strbuf_p,slashx,2);
                                       strbuf_p += 2;                                       strbuf_p += 2;
                                       *strbuf_p++ = *yytext;                                       *strbuf_p++ = *yytext;
                                       yy_pop_state();                                       yy_pop_state();


Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2