Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
5c989519
Commit
5c989519
authored
May 31, 2013
by
Dick Hollenbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add support for exponents in dsnlexer.cpp's DSN_NUMBER token
parent
d8f87cca
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
dsnlexer.cpp
common/dsnlexer.cpp
+8
-4
No files found.
common/dsnlexer.cpp
View file @
5c989519
...
...
@@ -407,7 +407,7 @@ static bool isSpace( int cc )
*/
static
bool
isNumber
(
const
char
*
cp
,
const
char
*
limit
,
const
char
**
next
)
{
#if
1
// no exponents supported
#if
0
// no exponents supported
if( strchr( "+-.0123456789", *cp ) )
{
...
...
@@ -440,16 +440,19 @@ static bool isNumber( const char* cp, const char* limit, const char** next )
sawNumber
=
true
;
}
if
(
cp
<
limit
&&
*
cp
==
'.'
)
{
if
(
cp
<
limit
&&
*
cp
==
'.'
)
++
cp
;
++
cp
;
while
(
cp
<
limit
&&
strchr
(
"0123456789"
,
*
cp
)
)
{
sawNumber
=
true
;
++
cp
;
sawNumber
=
true
;
}
}
if
(
sawNumber
)
{
if
(
cp
<
limit
&&
strchr
(
"Ee"
,
*
cp
)
)
{
++
cp
;
...
...
@@ -469,6 +472,7 @@ static bool isNumber( const char* cp, const char* limit, const char** next )
if
(
sawNumber
)
{
// token can only be a number if not adjoined with other non-number token text
if
(
cp
==
limit
||
isSpace
(
*
cp
)
||
*
cp
==
')'
||
*
cp
==
'('
)
{
*
next
=
cp
;
...
...
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