Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
inox
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
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
LARA
inox
Commits
bf0cdbe7
Commit
bf0cdbe7
authored
12 years ago
by
Régis Blanc
Browse files
Options
Downloads
Patches
Plain Diff
use reporter to print option information
parent
2698d59f
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/scala/leon/Main.scala
+9
-9
9 additions, 9 deletions
src/main/scala/leon/Main.scala
with
9 additions
and
9 deletions
src/main/scala/leon/Main.scala
+
9
−
9
View file @
bf0cdbe7
...
...
@@ -25,12 +25,12 @@ object Main {
LeonOptionDef
(
"help"
,
true
,
"--help This help"
)
)
def
displayHelp
()
{
println
(
"usage: leon [--xlang] [--help] [--synthesis] [--help] [--debug=<N>] [..] <files>"
)
println
println
(
"Leon options are:"
)
def
displayHelp
(
reporter
:
Reporter
)
{
reporter
.
info
(
"usage: leon [--xlang] [--help] [--synthesis] [--help] [--debug=<N>] [..] <files>"
)
reporter
.
info
(
""
)
reporter
.
info
(
"Leon options are:"
)
for
(
opt
<-
allOptions
.
toSeq
.
sortBy
(
_
.
name
))
{
println
(
" "
+
opt
.
description
)
reporter
.
info
(
" "
+
opt
.
description
)
}
sys
.
exit
(
1
)
}
...
...
@@ -62,12 +62,12 @@ object Main {
case
(
false
,
LeonValueOption
(
name
,
value
))
=>
Some
(
leonOpt
)
case
_
=>
Sys
te
m
.
err
.
println
(
"Invalid option usage: "
+
opt
)
displayHelp
()
repor
te
r
.
err
or
(
"Invalid option usage: "
+
opt
)
displayHelp
(
reporter
)
None
}
}
else
{
Sys
te
m
.
err
.
println
(
"leon: '"
+
opt
+
"' is not a valid option. See 'leon --help'"
)
repor
te
r
.
err
or
(
"leon: '"
+
opt
+
"' is not a valid option. See 'leon --help'"
)
None
}
}
...
...
@@ -83,7 +83,7 @@ object Main {
case
LeonFlagOption
(
"parse"
)
=>
settings
=
settings
.
copy
(
synthesis
=
false
,
xlang
=
false
,
analyze
=
false
)
case
LeonFlagOption
(
"help"
)
=>
displayHelp
()
displayHelp
(
reporter
)
case
_
=>
}
...
...
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