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
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
Dominik Deisenroth
CodeSamples
Commits
411d0123
Commit
411d0123
authored
5 years ago
by
Ronald Charles Moore
Browse files
Options
Downloads
Patches
Plain Diff
Improved CFLAGS in the Compiler, and fixed the warnings this brought to light
parent
b8b7fdf2
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
recursiveDescentParsers/cplusplus/interpreter/Makefile
+1
-1
1 addition, 1 deletion
recursiveDescentParsers/cplusplus/interpreter/Makefile
recursiveDescentParsers/cplusplus/interpreter/interpreter.cpp
+1
-2
1 addition, 2 deletions
...rsiveDescentParsers/cplusplus/interpreter/interpreter.cpp
with
2 additions
and
3 deletions
recursiveDescentParsers/cplusplus/interpreter/Makefile
+
1
−
1
View file @
411d0123
...
@@ -12,7 +12,7 @@ TESTFILES := testInput.txt testOutput.txt
...
@@ -12,7 +12,7 @@ TESTFILES := testInput.txt testOutput.txt
CC
:=
clang++
CC
:=
clang++
## Add your own CFLAGS if you find them necessary... such as -O3 or so...
## Add your own CFLAGS if you find them necessary... such as -O3 or so...
CFLAGS
:=
CFLAGS
:=
-g
-std
=
c++17
-Wall
## More preliminaries
## More preliminaries
...
...
This diff is collapsed.
Click to expand it.
recursiveDescentParsers/cplusplus/interpreter/interpreter.cpp
+
1
−
2
View file @
411d0123
...
@@ -43,7 +43,6 @@ static std::istream *input = &(std::cin); // until proven otherwise
...
@@ -43,7 +43,6 @@ static std::istream *input = &(std::cin); // until proven otherwise
static
std
::
string
currentLine
(
""
);
static
std
::
string
currentLine
(
""
);
static
int
currentLineNumber
=
-
1
;
static
int
currentLineNumber
=
-
1
;
static
int
currentColumnNumber
=
0
;
static
int
currentColumnNumber
=
0
;
static
int
currentTokenLength
=
0
;
static
Token
next_token
;
// again with the global variables...
static
Token
next_token
;
// again with the global variables...
static
numberType
currentNumber
;
// = zero....
static
numberType
currentNumber
;
// = zero....
...
@@ -165,7 +164,7 @@ numberType E2ndHalf() {
...
@@ -165,7 +164,7 @@ numberType E2ndHalf() {
// T´ → * F T´ | / F T´ | ε
// T´ → * F T´ | / F T´ | ε
numberType
T2ndHalf
()
{
numberType
T2ndHalf
()
{
numberType
tmp
,
rhs
,
acc
;
numberType
tmp
;
// Compiler forces me to put this here :-(
switch
(
next_token
)
{
switch
(
next_token
)
{
case
tok_times
:
case
tok_times
:
next_token
=
gettok
();
// eat *
next_token
=
gettok
();
// eat *
...
...
This diff is collapsed.
Click to expand it.
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