Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
sarah.grebing
ProofScriptParser
Commits
341605af
Commit
341605af
authored
May 19, 2017
by
Sarah Grebing
Browse files
default case
parent
3953a34c
Pipeline
#10623
passed with stage
in 1 minute and 57 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/edu/kit/formal/interpreter/Interpreter.java
View file @
341605af
...
...
@@ -86,7 +86,7 @@ public class Interpreter<T> extends DefaultASTVisitor<T> {
*/
@Override
public
T
visit
(
AssignmentStatement
assignmentStatement
)
{
System
.
out
.
println
(
"Visiting Assignment "
+
assignmentStatement
.
toString
());
//
System.out.println("Visiting Assignment " + assignmentStatement.toString());
AbstractState
state
=
stateStack
.
pop
();
GoalNode
node
=
state
.
getSelectedGoalNode
();
Type
t
=
assignmentStatement
.
getType
();
...
...
@@ -185,6 +185,19 @@ public class Interpreter<T> extends DefaultASTVisitor<T> {
//for all remaining goals execute default
if
(!
copiedList
.
isEmpty
())
{
Statements
defaultCase
=
casesStatement
.
getDefaultCase
();
Iterator
<
GoalNode
>
remainingGoalsIter
=
copiedList
.
iterator
();
while
(
remainingGoalsIter
.
hasNext
())
{
GoalNode
next
=
remainingGoalsIter
.
next
();
List
<
GoalNode
>
goalList
=
new
ArrayList
<>();
goalList
.
add
(
next
);
State
s
=
new
State
(
goalList
,
next
);
stateStack
.
push
(
s
);
visit
(
defaultCase
);
State
aftercase
=
(
State
)
stateStack
.
pop
();
goalsAfterCases
.
addAll
(
aftercase
.
getGoals
());
}
}
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment