Changeset 1454 for trunk/test/sandbox
- Timestamp:
- Jun 11, 2012, 11:21:43 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/sandbox/lex/lolfx.l
r1427 r1454 5 5 %} 6 6 7 %x GLSL 8 %x HLSL 7 9 %x C_COMMENT 8 10 %x CPP_COMMENT 9 11 10 12 %% 13 14 %{ 15 int comment_caller = INITIAL; 16 %} 11 17 12 18 /* … … 450 456 */ 451 457 452 "#"[ \t]*"region" { return PREPROCESSOR_REGION; } 458 "#"[ \t]*"region GLSL" { BEGIN(GLSL); } 459 "#"[ \t]*"region HLSL" { BEGIN(HLSL); } 453 460 "#"[ \t]*"pragma"[ \t]*"lolfx".* { /* ignore for now */ } 454 461 … … 534 541 */ 535 542 536 "/*" { BEGIN(C_COMMENT); } 537 <C_COMMENT>"*/" { BEGIN(INITIAL); } 543 <GLSL>"/*" { comment_caller = GLSL; BEGIN(C_COMMENT); } 544 <HLSL>"/*" { comment_caller = HLSL; BEGIN(C_COMMENT); } 545 "/*" { comment_caller = INITIAL; BEGIN(C_COMMENT); } 546 <C_COMMENT>"*/" { BEGIN(comment_caller); } 538 547 <C_COMMENT>[^*]* { } 539 548 <C_COMMENT>. { } … … 543 552 */ 544 553 545 "//" { BEGIN(CPP_COMMENT); } 546 <CPP_COMMENT>\n { BEGIN(INITIAL); } 554 <GLSL>"//" { comment_caller = GLSL; BEGIN(CPP_COMMENT); } 555 <HLSL>"//" { comment_caller = HLSL; BEGIN(CPP_COMMENT); } 556 "//" { comment_caller = INITIAL; BEGIN(CPP_COMMENT); } 557 <CPP_COMMENT>\n { BEGIN(comment_caller); } 547 558 <CPP_COMMENT>.* { } 548 559
Note: See TracChangeset
for help on using the changeset viewer.