/[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 3835 by schoenebeck, Sat Feb 1 18:11:20 2020 UTC revision 3836 by schoenebeck, Sat Nov 28 14:47:14 2020 UTC
# Line 122  UNIT     (s|(Hz)|B) Line 122  UNIT     (s|(Hz)|B)
122  %%  %%
123    
124  \"[^"]*\" {  \"[^"]*\" {
125      yylval->sValue = strdup(yytext + 1);      char* s = strdup(yytext + 1);
126      yylval->sValue[strlen(yylval->sValue) - 1] = '\0';      s[strlen(s) - 1] = '\0';
127        yylval->sValue = s;
128        yyextra->autoFreeAfterParse(s);
129      return STRING;      return STRING;
130  }  }
131    
# Line 384  UNIT     (s|(Hz)|B) Line 386  UNIT     (s|(Hz)|B)
386    
387  ("$"|"@"|"%"|"~"|"?"){ID} {  ("$"|"@"|"%"|"~"|"?"){ID} {
388      yylval->sValue = strdup(yytext);      yylval->sValue = strdup(yytext);
389        yyextra->autoFreeAfterParse(yylval->sValue);
390      return VARIABLE;      return VARIABLE;
391  }  }
392    
393  {ID} {  {ID} {
394      yylval->sValue = strdup(yytext);      yylval->sValue = strdup(yytext);
395        yyextra->autoFreeAfterParse(yylval->sValue);
396      return IDENTIFIER;      return IDENTIFIER;
397  }  }
398    

Legend:
Removed from v.3835  
changed lines
  Added in v.3836

  ViewVC Help
Powered by ViewVC