Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cs444
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
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
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
Xun Yang
cs444
Commits
8a43b8b9
Commit
8a43b8b9
authored
5 years ago
by
Xun Yang
Browse files
Options
Downloads
Patches
Plain Diff
running joosc
parent
8a5a3d8d
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
joosc
+1
-1
1 addition, 1 deletion
joosc
joosc.py
+6
-11
6 additions, 11 deletions
joosc.py
with
7 additions
and
12 deletions
joosc
+
1
−
1
View file @
8a43b8b9
#! /bin/bash
#! /bin/bash
result
=
`
python
3
joosc.py
$1
`
result
=
`
python joosc.py
$1
`
1>&2
echo
$result
1>&2
echo
$result
if
[
'$result'
!=
"0"
]
;
then
if
[
'$result'
!=
"0"
]
;
then
exit
42
exit
42
...
...
This diff is collapsed.
Click to expand it.
joosc.py
+
6
−
11
View file @
8a43b8b9
...
@@ -16,12 +16,10 @@ def main():
...
@@ -16,12 +16,10 @@ def main():
try
:
try
:
(
tokens
,
errorString
)
=
scan
(
content
)
(
tokens
,
errorString
)
=
scan
(
content
)
except
:
except
:
print
(
"
scan exception
"
)
return
42
return
42
# Error in Scanning
# Error in Scanning
if
tokens
is
None
:
if
tokens
is
None
:
print
(
"
scan failed
"
)
return
42
return
42
# Weed the tokens
# Weed the tokens
...
@@ -30,18 +28,15 @@ def main():
...
@@ -30,18 +28,15 @@ def main():
return
42
return
42
# Parsing
# Parsing
try
:
(
steps
,
error
)
=
parse
(
tokens
)
(
steps
,
error
)
=
parse
(
tokens
)
except
:
print
(
"
parse exception
"
)
return
42
if
steps
is
None
:
if
steps
is
None
:
print
(
"
parse failed
"
)
# print(error)
return
42
return
42
print
(
"
success in scanning and parsing
"
)
#
print("success in scanning and parsing")
return
0
return
0
main
()
re
=
main
()
print
(
re
)
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