author | Michael Krelin <hacker@klever.net> | 2006-12-06 16:58:21 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2006-12-06 16:58:21 (UTC) |
commit | a22cf56603ca89efb73429fd3797a775ca908cff (patch) (unidiff) | |
tree | 3f1e2c2f2a7640da48ec4e9576f19e63528ec60f | |
parent | d2bac550faab6e8ffbf3f3d43fdf7cd862cf0a72 (diff) | |
download | sitecing-a22cf56603ca89efb73429fd3797a775ca908cff.zip sitecing-a22cf56603ca89efb73429fd3797a775ca908cff.tar.gz sitecing-a22cf56603ca89efb73429fd3797a775ca908cff.tar.bz2 |
fix for escaping backslash in output
-rw-r--r-- | lib/sitecing_parser.ll | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/sitecing_parser.ll b/lib/sitecing_parser.ll index 8dd8d5f..53df9a0 100644 --- a/lib/sitecing_parser.ll +++ b/lib/sitecing_parser.ll | |||
@@ -445,64 +445,65 @@ NOIDCHAR [^A-Za-z0-9_] | |||
445 | modi.pop_front(); | 445 | modi.pop_front(); |
446 | BEGIN(INITIAL); | 446 | BEGIN(INITIAL); |
447 | } | 447 | } |
448 | <CLASSLINE,DECLLINE,IMPLLINE,VARLINE,VARINIT,IMPORTLINE,IMPORTCOMPONENT,CODEMETHODLINE,CODEMETHODARGS,INLINE,METHODLINE,METHODARGS,DECLBLOCK,IMPLBLOCK,CONSTRUCTOR,DESTRUCTOR,CODEMETHODBLOCK,CODELINE,CODEBLOCK,PRAGMALINE,DERIVELINE,DERIVECOMPONENT>{ | 448 | <CLASSLINE,DECLLINE,IMPLLINE,VARLINE,VARINIT,IMPORTLINE,IMPORTCOMPONENT,CODEMETHODLINE,CODEMETHODARGS,INLINE,METHODLINE,METHODARGS,DECLBLOCK,IMPLBLOCK,CONSTRUCTOR,DESTRUCTOR,CODEMETHODBLOCK,CODELINE,CODEBLOCK,PRAGMALINE,DERIVELINE,DERIVECOMPONENT>{ |
449 | "/*"{ | 449 | "/*"{ |
450 | yy_push_state(SLASHSTAR_COMMENT); | 450 | yy_push_state(SLASHSTAR_COMMENT); |
451 | if(!M().devour_comments()) { | 451 | if(!M().devour_comments()) { |
452 | ECHO; | 452 | ECHO; |
453 | } | 453 | } |
454 | } | 454 | } |
455 | "//"{ | 455 | "//"{ |
456 | yy_push_state(SLASHSLASH_COMMENT); | 456 | yy_push_state(SLASHSLASH_COMMENT); |
457 | if(!M().devour_comments()) { | 457 | if(!M().devour_comments()) { |
458 | ECHO; | 458 | ECHO; |
459 | } | 459 | } |
460 | } | 460 | } |
461 | \" { | 461 | \" { |
462 | yy_push_state(STRING); | 462 | yy_push_state(STRING); |
463 | ECHO; | 463 | ECHO; |
464 | } | 464 | } |
465 | \'\\.\'{ | 465 | \'\\.\'{ |
466 | ECHO; | 466 | ECHO; |
467 | } | 467 | } |
468 | } | 468 | } |
469 | 469 | ||
470 | <INITIAL,METHODBLOCK,OUTPUTBLOCK>{ | 470 | <INITIAL,METHODBLOCK,OUTPUTBLOCK>{ |
471 | \"soft_anchor(); M().modify(modus_operandi::modus_text); LexerOutput("\\\"",2); | 471 | \"soft_anchor(); M().modify(modus_operandi::modus_text); LexerOutput("\\\"",2); |
472 | \nsoft_anchor(); M().modify(modus_operandi::modus_text); LexerOutput("\\n",2); | 472 | \nsoft_anchor(); M().modify(modus_operandi::modus_text); LexerOutput("\\n",2); |
473 | \rsoft_anchor(); M().modify(modus_operandi::modus_text); LexerOutput("\\r",2); | 473 | \rsoft_anchor(); M().modify(modus_operandi::modus_text); LexerOutput("\\r",2); |
474 | \tsoft_anchor(); M().modify(modus_operandi::modus_text); LexerOutput("\\t",2); | 474 | \tsoft_anchor(); M().modify(modus_operandi::modus_text); LexerOutput("\\t",2); |
475 | \bsoft_anchor(); M().modify(modus_operandi::modus_text); LexerOutput("\\b",2); | 475 | \bsoft_anchor(); M().modify(modus_operandi::modus_text); LexerOutput("\\b",2); |
476 | \asoft_anchor(); M().modify(modus_operandi::modus_text); LexerOutput("\\a",2); | 476 | \asoft_anchor(); M().modify(modus_operandi::modus_text); LexerOutput("\\a",2); |
477 | \\soft_anchor(); M().modify(modus_operandi::modus_text); LexerOutput("\\\\",2); | ||
477 | .soft_anchor(); M().modify(modus_operandi::modus_text); ECHO; | 478 | .soft_anchor(); M().modify(modus_operandi::modus_text); ECHO; |
478 | {WHITESPACE}+soft_anchor(); M().modify(modus_operandi::modus_text); ECHO; | 479 | {WHITESPACE}+soft_anchor(); M().modify(modus_operandi::modus_text); ECHO; |
479 | } | 480 | } |
480 | 481 | ||
481 | <DECLBLOCK,IMPLBLOCK,CONSTRUCTOR,DESTRUCTOR,CODEMETHODBLOCK,METHODBLOCK,CODEBLOCK>{ | 482 | <DECLBLOCK,IMPLBLOCK,CONSTRUCTOR,DESTRUCTOR,CODEMETHODBLOCK,METHODBLOCK,CODEBLOCK>{ |
482 | \<\/\%decl\>{ | 483 | \<\/\%decl\>{ |
483 | if(YY_START!=DECLBLOCK) throw preprocessor_error(CODEPOINT,"tags mismatch",lineno()); | 484 | if(YY_START!=DECLBLOCK) throw preprocessor_error(CODEPOINT,"tags mismatch",lineno()); |
484 | decl += M().output; | 485 | decl += M().output; |
485 | modi.pop_front(); | 486 | modi.pop_front(); |
486 | BEGIN(INITIAL); | 487 | BEGIN(INITIAL); |
487 | } | 488 | } |
488 | \<\/\%impl\>{ | 489 | \<\/\%impl\>{ |
489 | if(YY_START!=IMPLBLOCK) throw preprocessor_error(CODEPOINT,"tags mismatch",lineno()); | 490 | if(YY_START!=IMPLBLOCK) throw preprocessor_error(CODEPOINT,"tags mismatch",lineno()); |
490 | impl += M().output; | 491 | impl += M().output; |
491 | modi.pop_front(); | 492 | modi.pop_front(); |
492 | BEGIN(INITIAL); | 493 | BEGIN(INITIAL); |
493 | } | 494 | } |
494 | \<\/\%constructor\>{ | 495 | \<\/\%constructor\>{ |
495 | if(YY_START!=CONSTRUCTOR) throw preprocessor_error(CODEPOINT,"tags mismatch",lineno()); | 496 | if(YY_START!=CONSTRUCTOR) throw preprocessor_error(CODEPOINT,"tags mismatch",lineno()); |
496 | member_functions.push_back(member_function("","","",M().output)); | 497 | member_functions.push_back(member_function("","","",M().output)); |
497 | have_constructor = true; | 498 | have_constructor = true; |
498 | modi.pop_front(); | 499 | modi.pop_front(); |
499 | BEGIN(INITIAL); | 500 | BEGIN(INITIAL); |
500 | } | 501 | } |
501 | \<\/\%destructor\>{ | 502 | \<\/\%destructor\>{ |
502 | if(YY_START!=DESTRUCTOR) throw preprocessor_error(CODEPOINT,"tags mismatch",lineno()); | 503 | if(YY_START!=DESTRUCTOR) throw preprocessor_error(CODEPOINT,"tags mismatch",lineno()); |
503 | member_functions.push_back(member_function("","~","",M().output)); | 504 | member_functions.push_back(member_function("","~","",M().output)); |
504 | modi.pop_front(); | 505 | modi.pop_front(); |
505 | BEGIN(INITIAL); | 506 | BEGIN(INITIAL); |
506 | } | 507 | } |
507 | \<\/\%codemethod\>{ | 508 | \<\/\%codemethod\>{ |
508 | if(YY_START!=CODEMETHODBLOCK) throw preprocessor_error(CODEPOINT,"tags mismatch",lineno()); | 509 | if(YY_START!=CODEMETHODBLOCK) throw preprocessor_error(CODEPOINT,"tags mismatch",lineno()); |