Changeset 332 for cpp/frams/vm/framscript.l
- Timestamp:
- 02/28/15 03:42:40 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/vm/framscript.l
r224 r332 33 33 \"\"\" {trctx.tmp=""; trctx.multilimit='\"'; BEGIN multiline;} 34 34 "'''" {trctx.tmp=""; trctx.multilimit='\''; BEGIN multiline;} 35 "@line "[0-9]+\n {trctx.line=atol(yytext+6); }36 "@file "[^\n\t\r]+\n {trctx.srcname=SString(yytext+6,yyleng-7); }35 "@line "[0-9]+\n {trctx.line=atol(yytext+6);trctx.linechanged=true;} 36 "@file "[^\n\t\r]+\n {trctx.srcname=SString(yytext+6,yyleng-7);trctx.namechanged=true;} 37 37 38 38 [a-zA-Z_][a-zA-Z0-9_]* { int t=lookupToken(yytext); … … 65 65 ">>" return RSHIFT; 66 66 67 <INITIAL,asmcode,asmcode2>\/\/.*\n {trctx.line++; } // komentarz jednoliniowy67 <INITIAL,asmcode,asmcode2>\/\/.*\n {trctx.line++;trctx.linechanged=true;} // komentarz jednoliniowy 68 68 <INITIAL,asmcode,asmcode2>\/\/[^\n]* ; // komentarz ale nie ma potem \n 69 69 70 70 <INITIAL>\/\* BEGIN comment; 71 <comment>\n {trctx.line++; }71 <comment>\n {trctx.line++;trctx.linechanged=true;} 72 72 <comment>\*\/ BEGIN 0; 73 73 <comment>. ; … … 85 85 trctx.tmp+=SString(yytext,yyleng); 86 86 } 87 <multiline>\n {trctx.line++; trctx. tmp+="\n";}87 <multiline>\n {trctx.line++; trctx.linechanged=true; trctx.tmp+="\n";} 88 88 [ \t\r\f] ; 89 \n {trctx.line++; }89 \n {trctx.line++; trctx.linechanged=true;} 90 90 . return yytext[0]; 91 91 … … 94 94 char *t=yytext; 95 95 while(t=strchr(t+1,'\n')) trctx.line++; 96 trctx.linechanged=true; 96 97 return ASM; 97 98 } 98 99 <asmcode>.*\n { 99 100 char *t=yytext; 100 trctx.line++; 101 trctx.line++; trctx.linechanged=true; 101 102 while ((*t==' ')||(*t=='\t')) t++; 102 103 if (*t=='}') {yyless((t-yytext)+1); BEGIN 0; return '}';}
Note: See TracChangeset
for help on using the changeset viewer.