nothing of importance
This commit is contained in:
@ -99,6 +99,12 @@ static int ident_start; /* begin of preceding identifier */
|
|||||||
static void my_yymore(void);
|
static void my_yymore(void);
|
||||||
|
|
||||||
%}
|
%}
|
||||||
|
%x IN_PREPROC WAS_ENDIF WAS_IDENTIFIER WAS_ESU IN_DQUOTE IN_SQUOTE COMMENT
|
||||||
|
|
||||||
|
/* XXX:
|
||||||
|
* the {comment} pattern seems unnecesarry as the COMMENT state unputs a ' ',
|
||||||
|
* but i do not dare to touch it until we have tests
|
||||||
|
*/
|
||||||
identifier [a-zA-Z_$][a-zA-Z_0-9$]*
|
identifier [a-zA-Z_$][a-zA-Z_0-9$]*
|
||||||
number \.?[0-9][.0-9a-fA-FlLuUxX]*
|
number \.?[0-9][.0-9a-fA-FlLuUxX]*
|
||||||
comment "/*"([^*]*("*"+[^/])?)*"*/"|"//"[^\n]*\n
|
comment "/*"([^*]*("*"+[^/])?)*"*/"|"//"[^\n]*\n
|
||||||
@ -109,17 +115,15 @@ class_definition class{wsnl}+{identifier}({wsnl}|{identifier}|[():])*\{
|
|||||||
function_definition {ws}*\(({wsnl}|{identifier}|{number}|[*&[\]=,.:])*\)([()]|{wsnl})*[:a-zA-Z_#{]
|
function_definition {ws}*\(({wsnl}|{identifier}|{number}|[*&[\]=,.:])*\)([()]|{wsnl})*[:a-zA-Z_#{]
|
||||||
function_call {ws}*\(([*&[\]=,.]|{identifier}|{number}|{wsnl})*
|
function_call {ws}*\(([*&[\]=,.]|{identifier}|{number}|{wsnl})*
|
||||||
|
|
||||||
/* flex options: stack of start conditions, and don't use yywrap() */
|
|
||||||
%option stack
|
%option stack
|
||||||
%option noyywrap
|
%option noyywrap
|
||||||
|
/* unused */
|
||||||
|
%option noyy_top_state
|
||||||
|
|
||||||
%start SDL
|
%start SDL
|
||||||
%a 4000
|
%a 4000
|
||||||
%o 7000
|
%o 7000
|
||||||
|
|
||||||
/* exclusive start conditions. not available in AT&T lex -> use flex! */
|
|
||||||
%x IN_PREPROC WAS_ENDIF WAS_IDENTIFIER WAS_ESU IN_DQUOTE IN_SQUOTE COMMENT
|
|
||||||
|
|
||||||
%%
|
%%
|
||||||
|
|
||||||
%\{ { /* lex/yacc C declarations/definitions */
|
%\{ { /* lex/yacc C declarations/definitions */
|
||||||
@ -771,7 +775,9 @@ if{wsnl}*\( { /* ignore 'if' */
|
|||||||
unput(' ');
|
unput(' ');
|
||||||
}
|
}
|
||||||
|
|
||||||
"/*" yy_push_state(COMMENT);
|
"/*" {
|
||||||
|
yy_push_state(COMMENT);
|
||||||
|
}
|
||||||
|
|
||||||
<COMMENT>{
|
<COMMENT>{
|
||||||
[^*\n]* |
|
[^*\n]* |
|
||||||
|
Reference in New Issue
Block a user