Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
CodeSamples
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CompilerConstruction
CodeSamples
Commits
55794c3e
Commit
55794c3e
authored
4 years ago
by
Ronald Charles Moore
Browse files
Options
Downloads
Patches
Plain Diff
Fix for Issue#1
parent
5a284edb
Branches
Branches containing commit
Tags
2021.04.23
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
recursiveDescentParsers/cplusplus/halfBakedCompiler/lexer.cpp
+1
-1
1 addition, 1 deletion
...rsiveDescentParsers/cplusplus/halfBakedCompiler/lexer.cpp
recursiveDescentParsers/cplusplus/halfBakedCompiler/lexer.h
+1
-1
1 addition, 1 deletion
recursiveDescentParsers/cplusplus/halfBakedCompiler/lexer.h
with
2 additions
and
2 deletions
recursiveDescentParsers/cplusplus/halfBakedCompiler/lexer.cpp
+
1
−
1
View file @
55794c3e
...
...
@@ -113,7 +113,7 @@ Token gettok( ) {
};
// else if strtod found a real number (or at least a double)
result
.
first
=
tok_number
;
result
.
second
=
tmpValue
;
// let C++ do any converisons
result
.
second
=
static_cast
<
numberType
>
(
tmpValue
);
currentColumnNumber
+=
(
omega
-
alpha
)
-
1
;
// minus one because we incremented it before the switch
...
...
This diff is collapsed.
Click to expand it.
recursiveDescentParsers/cplusplus/halfBakedCompiler/lexer.h
+
1
−
1
View file @
55794c3e
...
...
@@ -27,7 +27,7 @@
namespace
lex
{
// Utility Types
typedef
double
numberType
;
//
feel fee to change this to something else like int or float or bigint....
typedef
double
numberType
;
//
also works with (at least) float or long
// See https://en.cppreference.com/w/cpp/numeric/math/nan
static
const
numberType
bad_number
=
std
::
nan
(
"1"
);
...
...
This diff is collapsed.
Click to expand it.
Ronald Charles Moore
@r.moore
mentioned in issue
#1 (closed)
·
4 years ago
mentioned in issue
#1 (closed)
mentioned in issue #1
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment