Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
angle
Project
Overview
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
angle
Commits
85f2b2c5
Commit
85f2b2c5
authored
Apr 25, 2012
by
alokp@chromium.org
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added rules for ignoring comments.
git-svn-id:
https://angleproject.googlecode.com/svn/trunk@1053
736b8ea6-26fd-11df-bfd4-992fa37f6226
parent
ddb6e8e3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
1 deletion
+13
-1
pp.l
src/compiler/preprocessor/new/pp.l
+13
-1
pp_lex.cpp
src/compiler/preprocessor/new/pp_lex.cpp
+0
-0
No files found.
src/compiler/preprocessor/new/pp.l
View file @
85f2b2c5
...
@@ -45,8 +45,9 @@ typedef pp::Token::Location YYLTYPE;
...
@@ -45,8 +45,9 @@ typedef pp::Token::Location YYLTYPE;
%option reentrant bison-bridge bison-locations
%option reentrant bison-bridge bison-locations
%option prefix="pp"
%option prefix="pp"
%option extra-type="pp::Input*"
%option extra-type="pp::Input*"
%x COMMENT
NEWLINE
"\n"|"\r"|"\r\n"
NEWLINE
\n|\r|\r\n
IDENTIFIER [_a-zA-Z][_a-zA-Z0-9]*
IDENTIFIER [_a-zA-Z][_a-zA-Z0-9]*
PUNCTUATOR [][<>(){}.+-/*%^|&~=!:;,?]
PUNCTUATOR [][<>(){}.+-/*%^|&~=!:;,?]
...
@@ -60,6 +61,17 @@ FRACTIONAL_CONSTANT ({DIGIT}*"."{DIGIT}+)|({DIGIT}+".")
...
@@ -60,6 +61,17 @@ FRACTIONAL_CONSTANT ({DIGIT}*"."{DIGIT}+)|({DIGIT}+".")
%%
%%
/* Line comment */
"//"[^\r\n]*
/* Block comment */
"/*" { BEGIN(COMMENT); }
<COMMENT>[^*\r\n]*
<COMMENT>[^*\r\n]*{NEWLINE} { ++yylineno; return '\n'; }
<COMMENT>"*"+[^*/\r\n]*
<COMMENT>"*"+[^*/\r\n]*{NEWLINE} { ++yylineno; return '\n'; }
<COMMENT>"*"+"/" { BEGIN(INITIAL); return ' '; }
# { return yytext[0]; }
# { return yytext[0]; }
{IDENTIFIER} {
{IDENTIFIER} {
...
...
src/compiler/preprocessor/new/pp_lex.cpp
View file @
85f2b2c5
This diff is collapsed.
Click to expand it.
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