Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
D
DHParser
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
badw-it
DHParser
Commits
a3db829f
Commit
a3db829f
authored
Feb 26, 2019
by
di68kap
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Fehler in Grammatik-Tests korrigiert
parent
658fe908
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
examples/Arithmetic/grammar_tests/02_test_components.ini
examples/Arithmetic/grammar_tests/02_test_components.ini
+3
-0
examples/Arithmetic/tst_Arithmetic_grammar.py
examples/Arithmetic/tst_Arithmetic_grammar.py
+2
-2
No files found.
examples/Arithmetic/grammar_tests/02_test_components.ini
View file @
a3db829f
[match:group]
M1:
"(2
+
x)"
M2:
"(3)"
M3:
"(-4x
/
2)"
[fail:group]
F1:
"22"
...
...
@@ -17,6 +18,7 @@ M6: "-(a * b)"
M7:
"2x"
M8:
"-2x"
M9:
"-(2
+
4)x(3
+
4)"
M10:
"2(-x)"
[fail:factor]
F1:
"x4"
...
...
@@ -46,6 +48,7 @@ M4: "a - 5 + b"
M5:
"-5
-
+4x"
M6:
"5
-
4
+
3"
M7:
"5
-
(4
+
3)"
M8:
"5
-
4
/
2
+
3x
-
2"
[fail:expression]
F1:
"-5
-
-
4x"
...
...
examples/Arithmetic/tst_Arithmetic_grammar.py
View file @
a3db829f
...
...
@@ -8,7 +8,7 @@ import sys
LOGGING
=
False
sys
.
path
.
extend
([
'../../'
,
'..
/'
,
'./
'
])
sys
.
path
.
extend
([
'../../'
,
'..
'
,
'.
'
])
scriptpath
=
os
.
path
.
dirname
(
__file__
)
...
...
@@ -24,7 +24,7 @@ except ModuleNotFoundError:
CONFIG_PRESET
[
'ast_serialization'
]
=
"S-expression"
CONFIG_PRESET
[
'test_parallelization'
]
=
Tru
e
CONFIG_PRESET
[
'test_parallelization'
]
=
Fals
e
def
recompile_grammar
(
grammar_src
,
force
):
grammar_tests_dir
=
os
.
path
.
join
(
scriptpath
,
'grammar_tests'
)
...
...
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