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
ff6a0a5c
Commit
ff6a0a5c
authored
Apr 03, 2012
by
alokp@chromium.org
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed line number reporting. Each newline was being counted twice.
git-svn-id:
https://angleproject.googlecode.com/svn/trunk@1015
736b8ea6-26fd-11df-bfd4-992fa37f6226
parent
3f990c4a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
14 deletions
+8
-14
pp.l
src/compiler/preprocessor/new/pp.l
+4
-8
pp_lex.cpp
src/compiler/preprocessor/new/pp_lex.cpp
+4
-6
No files found.
src/compiler/preprocessor/new/pp.l
View file @
ff6a0a5c
...
...
@@ -32,6 +32,7 @@ typedef pp::Token::Location YYLTYPE;
#define YY_USER_ACTION \
do { \
yylloc->line = yylineno; \
yylloc->string = 0; \
} while(0);
#define YY_INPUT(buf, result, maxSize) \
...
...
@@ -100,15 +101,10 @@ FRACTIONAL_CONSTANT ({DIGIT}*"."{DIGIT}+)|({DIGIT}+".")
"|=" { return pp::Token::OP_OR_ASSIGN; }
{PUNCTUATOR} { return yytext[0]; }
[ \t\v\f]+ { /* Ignore whitespace */ }
\n { return yytext[0]; }
[ \t\v\f]+ { /* Ignore whitespace */ }
\n {
++yylineno; yycolumn = 0;
return yytext[0];
}
<*><<EOF>> { yyterminate(); }
<*><<EOF>> { yyterminate(); }
%%
...
...
src/compiler/preprocessor/new/pp_lex.cpp
View file @
ff6a0a5c
#line 16 "./
src/compiler/preprocessor/new/
pp.l"
#line 16 "./pp.l"
//
// Copyright (c) 2011 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
...
...
@@ -9,7 +9,7 @@
#line 13 "./
src/compiler/preprocessor/new/
pp_lex.cpp"
#line 13 "./pp_lex.cpp"
#define YY_INT_ALIGNED short int
...
...
@@ -524,6 +524,7 @@ typedef pp::Token::Location YYLTYPE;
#define YY_USER_ACTION \
do { \
yylloc->line = yylineno; \
yylloc->string = 0; \
} while(0);
#define YY_INPUT(buf, result, maxSize) \
...
...
@@ -973,10 +974,7 @@ YY_RULE_SETUP
case
28
:
/* rule 28 can match eol */
YY_RULE_SETUP
{
++
yylineno
;
yycolumn
=
0
;
return
yytext
[
0
];
}
{
return
yytext
[
0
];
}
YY_BREAK
case
YY_STATE_EOF
(
INITIAL
):
{
yyterminate
();
}
...
...
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