merge IN_PREPROC rules
This commit is contained in:
@ -242,9 +242,10 @@ function_call {ws}*\(([*&[\]=,.]|{identifier}|{number}|{wsnl})*
|
|||||||
/* NOTREACHED */
|
/* NOTREACHED */
|
||||||
}
|
}
|
||||||
|
|
||||||
<IN_PREPROC>ifndef{ws}+ |
|
<IN_PREPROC>{
|
||||||
<IN_PREPROC>ifdef{ws}+ |
|
ifndef{ws}+ |
|
||||||
<IN_PREPROC>if{ws}+ { /* #if directive */
|
ifdef{ws}+ |
|
||||||
|
if{ws}+ { /* #if directive */
|
||||||
elseelif = false;
|
elseelif = false;
|
||||||
if (pseudoelif == true) {
|
if (pseudoelif == true) {
|
||||||
pseudoelif = false;
|
pseudoelif = false;
|
||||||
@ -264,7 +265,7 @@ function_call {ws}*\(([*&[\]=,.]|{identifier}|{number}|{wsnl})*
|
|||||||
goto more;
|
goto more;
|
||||||
/* NOTREACHED */
|
/* NOTREACHED */
|
||||||
}
|
}
|
||||||
<IN_PREPROC>else({ws}.*)? { /* #else --- eat up whole line */
|
else({ws}.*)? { /* #else --- eat up whole line */
|
||||||
elseelif = true;
|
elseelif = true;
|
||||||
if (iflevel > 0) {
|
if (iflevel > 0) {
|
||||||
|
|
||||||
@ -279,7 +280,7 @@ function_call {ws}*\(([*&[\]=,.]|{identifier}|{number}|{wsnl})*
|
|||||||
goto more;
|
goto more;
|
||||||
/* NOTREACHED */
|
/* NOTREACHED */
|
||||||
}
|
}
|
||||||
<IN_PREPROC>elif{ws}+ { /* #elif */
|
elif{ws}+ { /* #elif */
|
||||||
/* elseelif = true; --- HBB I doubt this is correct */
|
/* elseelif = true; --- HBB I doubt this is correct */
|
||||||
elif:
|
elif:
|
||||||
if (iflevel > 0) {
|
if (iflevel > 0) {
|
||||||
@ -296,8 +297,8 @@ function_call {ws}*\(([*&[\]=,.]|{identifier}|{number}|{wsnl})*
|
|||||||
/* NOTREACHED */
|
/* NOTREACHED */
|
||||||
}
|
}
|
||||||
|
|
||||||
<IN_PREPROC>include{ws}*\"[^"\n]+\" |
|
include{ws}*\"[^"\n]+\" |
|
||||||
<IN_PREPROC>include{ws}*<[^>\n]+> { /* #include file */
|
include{ws}*<[^>\n]+> { /* #include file */
|
||||||
char *s;
|
char *s;
|
||||||
char remember = yytext[yyleng-1];
|
char remember = yytext[yyleng-1];
|
||||||
|
|
||||||
@ -410,7 +411,7 @@ function_call {ws}*\(([*&[\]=,.]|{identifier}|{number}|{wsnl})*
|
|||||||
goto more;
|
goto more;
|
||||||
/* NOTREACHED */
|
/* NOTREACHED */
|
||||||
}
|
}
|
||||||
<IN_PREPROC>define{ws}+{identifier} {
|
define{ws}+{identifier} {
|
||||||
|
|
||||||
/* preprocessor macro or constant definition */
|
/* preprocessor macro or constant definition */
|
||||||
ppdefine = true;
|
ppdefine = true;
|
||||||
@ -433,18 +434,19 @@ function_call {ws}*\(([*&[\]=,.]|{identifier}|{number}|{wsnl})*
|
|||||||
goto definition;
|
goto definition;
|
||||||
/* NOTREACHED */
|
/* NOTREACHED */
|
||||||
}
|
}
|
||||||
<IN_PREPROC>\n { /* unknown preprocessor line */
|
\n { /* unknown preprocessor line */
|
||||||
BEGIN(INITIAL);
|
BEGIN(INITIAL);
|
||||||
++myylineno;
|
++myylineno;
|
||||||
goto more;
|
goto more;
|
||||||
/* NOTREACHED */
|
/* NOTREACHED */
|
||||||
}
|
}
|
||||||
<IN_PREPROC>. |
|
. |
|
||||||
<IN_PREPROC>{identifier} { /* unknown preprocessor line */
|
{identifier} { /* unknown preprocessor line */
|
||||||
BEGIN(INITIAL);
|
BEGIN(INITIAL);
|
||||||
goto more;
|
goto more;
|
||||||
/* NOTREACHED */
|
/* NOTREACHED */
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
{class_definition} { /* class definition */
|
{class_definition} { /* class definition */
|
||||||
classdef = true;
|
classdef = true;
|
||||||
@ -460,6 +462,7 @@ function_call {ws}*\(([*&[\]=,.]|{identifier}|{number}|{wsnl})*
|
|||||||
BEGIN(WAS_ESU);
|
BEGIN(WAS_ESU);
|
||||||
goto more;
|
goto more;
|
||||||
}
|
}
|
||||||
|
|
||||||
<WAS_ESU>{
|
<WAS_ESU>{
|
||||||
({wsnl}+{identifier}){wsnl}*\{ { /* e/s/u definition */
|
({wsnl}+{identifier}){wsnl}*\{ { /* e/s/u definition */
|
||||||
tagdef = my_yytext[ident_start];
|
tagdef = my_yytext[ident_start];
|
||||||
|
Reference in New Issue
Block a user