/[svn]/linuxsampler/trunk/src/scriptvm/scanner.l
ViewVC logotype

Diff of /linuxsampler/trunk/src/scriptvm/scanner.l

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3728 by schoenebeck, Fri Jan 3 10:18:21 2020 UTC revision 3729 by schoenebeck, Fri Jan 31 10:57:53 2020 UTC
# Line 21  Line 21 
21      yylloc->first_line = yylineno;      \      yylloc->first_line = yylineno;      \
22      yylloc->last_line  = yylineno;      \      yylloc->last_line  = yylineno;      \
23      yylloc->first_column = yycolumn;    \      yylloc->first_column = yycolumn;    \
24        yylloc->first_byte = yyextra->nbytes; \
25        yylloc->length_bytes = (int) yyleng;  \
26      yycolumn += yyleng;                 \      yycolumn += yyleng;                 \
27        yyextra->nbytes += (int) yyleng;    \
28      yylloc->last_column = yycolumn - 1; \      yylloc->last_column = yycolumn - 1; \
29      /*printf("lex: line '%s'\n", yytext);*/  \      /*printf("lex: line '%s'\n", yytext);*/  \
30  }  }
# Line 38  Line 41 
41  }  }
42    
43  static void scanner_error(YYLTYPE* locp, LinuxSampler::ParserContext* context, const char* err) {  static void scanner_error(YYLTYPE* locp, LinuxSampler::ParserContext* context, const char* err) {
44      context->addErr(locp->first_line, locp->last_line, locp->first_column, locp->last_column, err);      context->addErr(locp->first_line, locp->last_line, locp->first_column,
45                        locp->last_column, locp->first_byte, locp->length_bytes,
46                        err);
47  }  }
48    
49  static void scanner_warning(YYLTYPE* locp, LinuxSampler::ParserContext* context, const char* txt) {  static void scanner_warning(YYLTYPE* locp, LinuxSampler::ParserContext* context, const char* txt) {
50      context->addWrn(locp->first_line, locp->last_line, locp->first_column, locp->last_column, txt);      context->addWrn(locp->first_line, locp->last_line, locp->first_column,
51                        locp->last_column, locp->first_byte, locp->length_bytes,
52                        txt);
53  }  }
54    
55  #define SCANNER_ERR(txt)  scanner_error(yylloc, yyextra, txt)  #define SCANNER_ERR(txt)  scanner_error(yylloc, yyextra, txt)
# Line 333  UNIT     (s|(Hz)|B) Line 340  UNIT     (s|(Hz)|B)
340  <PREPROC_BODY_EAT>.* { /* eat up code block filtered out by preprocessor */  <PREPROC_BODY_EAT>.* { /* eat up code block filtered out by preprocessor */
341      //printf("PREPROCESSOR EAT3 : {%s}\n", yytext);      //printf("PREPROCESSOR EAT3 : {%s}\n", yytext);
342      yyextra->addPreprocessorComment(yylloc->first_line, yylloc->last_line,      yyextra->addPreprocessorComment(yylloc->first_line, yylloc->last_line,
343                                      yylloc->first_column+1, yylloc->last_column+1);                                      yylloc->first_column+1, yylloc->last_column+1,
344                                        yylloc->first_byte, yylloc->length_bytes);
345  }  }
346    
347    

Legend:
Removed from v.3728  
changed lines
  Added in v.3729

  ViewVC Help
Powered by ViewVC