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

Diff of /linuxsampler/trunk/src/scriptvm/editor/nksp.l

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

revision 3260 by schoenebeck, Wed May 31 21:07:44 2017 UTC revision 3332 by schoenebeck, Mon Jul 24 18:51:21 2017 UTC
# Line 47  static int countNewLineChars(const char* Line 47  static int countNewLineChars(const char*
47  # define register  # define register
48  #endif  #endif
49    
50    // Since this parser is solely used by script code editors, thus not used in a
51    // real-time context, always throw an exception instead of exiting on fatal
52    // lexer errors (so the debugger may pause with the appropriate back trace)
53    #include <stdexcept>
54    #define YY_FATAL_ERROR(msg) throw std::runtime_error(msg)
55    
56  %}  %}
57    
58  /* generate a reentrant safe scanner */  /* generate a reentrant safe scanner */
# Line 65  static int countNewLineChars(const char* Line 71  static int countNewLineChars(const char*
71    
72  DIGIT    [0-9]  DIGIT    [0-9]
73  ID       [a-zA-Z0-9_]+  ID       [a-zA-Z0-9_]+
74    END_ID   on|while|if|select|function|synchronized
75    
76  %%  %%
77    
# Line 219  end { Line 226  end {
226      return yyextra->token.baseType;      return yyextra->token.baseType;
227  }  }
228    
229  <PREPROC_END_NAME>[ \t]*{ID} {  <PREPROC_END_NAME>[ \t]*{END_ID}? {
230      yy_pop_state(yyscanner);      yy_pop_state(yyscanner);
231      yyextra->token = KeywordToken(yytext);      yyextra->token = KeywordToken(yytext);
232      return yyextra->token.baseType;      return yyextra->token.baseType;

Legend:
Removed from v.3260  
changed lines
  Added in v.3332

  ViewVC Help
Powered by ViewVC