Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
73802eb3
Commit
73802eb3
authored
Jan 10, 2003
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed handling of trailing whitespace after #else and #endif.
parent
cc670412
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
3 deletions
+12
-3
ppl.l
tools/wpp/ppl.l
+12
-3
No files found.
tools/wpp/ppl.l
View file @
73802eb3
...
...
@@ -143,6 +143,7 @@
%x pp_macexp
%x pp_if
%x pp_ifd
%x pp_endif
%x pp_line
%x pp_defined
%x pp_ignore
...
...
@@ -321,8 +322,8 @@ includelogicentry_t *pp_includelogiclist = NULL;
<pp_pp>{ws}*ifndef{ws}* pp_incl_state.seen_junk--; yy_pp_state(pp_ifd); return tIFNDEF;
<pp_pp>{ws}*if{ws}* yy_pp_state(pp_if); return tIF;
<pp_pp>{ws}*elif{ws}* yy_pp_state(pp_if); return tELIF;
<pp_pp>{ws}*else{ws}* return tELSE;
<pp_pp>{ws}*endif{ws}* return tENDIF;
<pp_pp>{ws}*else{ws}*
yy_pp_state(pp_endif);
return tELSE;
<pp_pp>{ws}*endif{ws}*
yy_pp_state(pp_endif);
return tENDIF;
<pp_pp>{ws}*line{ws}* if(yy_top_state() != pp_ignore) {yy_pp_state(pp_line); return tLINE;} else {yy_pp_state(pp_eol);}
<pp_pp>{ws}+ if(yy_top_state() != pp_ignore) {yy_pp_state(pp_line); return tGCCLINE;} else {yy_pp_state(pp_eol);}
<pp_pp>{ws}*[a-z]+ pperror("Invalid preprocessor token '%s'", pptext);
...
...
@@ -390,6 +391,14 @@ includelogicentry_t *pp_includelogiclist = NULL;
<pp_ifd>(\\\r?)|(.) pperror("Identifier expected");
/*
* Handle #else and #endif.
*/
<pp_endif>{ws}+ ;
<pp_endif>\n newline(1); yy_pop_state(); return tNL;
<pp_endif>\\\r?\n newline(0);
<pp_endif>. pperror("Garbage after #else or #endif.");
/*
* Handle the special 'defined' keyword.
* This is necessary to get the identifier prior to any
* substitutions.
...
...
@@ -514,7 +523,7 @@ includelogicentry_t *pp_includelogiclist = NULL;
/*
* Comment handling (almost all start-conditions)
*/
<INITIAL,pp_pp,pp_ignore,pp_eol,pp_inc,pp_if,pp_ifd,pp_defined,pp_def,pp_define,pp_macro,pp_mbody,RCINCL>"/*" yy_push_state(pp_comment);
<INITIAL,pp_pp,pp_ignore,pp_eol,pp_inc,pp_if,pp_ifd,pp_
endif,pp_
defined,pp_def,pp_define,pp_macro,pp_mbody,RCINCL>"/*" yy_push_state(pp_comment);
<pp_comment>[^*\n]*|"*"+[^*/\n]* ;
<pp_comment>\n newline(0);
<pp_comment>"*"+"/" yy_pop_state();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment