Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
X
XMLSchemaCompiler
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
Anders Nilsson
XMLSchemaCompiler
Commits
310414cd
Commit
310414cd
authored
14 years ago
by
Anders Nilsson
Browse files
Options
Downloads
Patches
Plain Diff
Simplified usage.
parent
d94ef7d6
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
GenCompiler.java
+53
-51
53 additions, 51 deletions
GenCompiler.java
with
53 additions
and
51 deletions
GenCompiler.java
+
53
−
51
View file @
310414cd
...
...
@@ -26,8 +26,8 @@ import java.io.PrintStream;
public
class
GenCompiler
extends
Parser
{
public
static
void
main
(
String
args
[])
{
String
dir
=
"
examples/x3
d"
;
String
outName
=
"
x3
d"
;
String
dir
=
"
generate
d"
;
String
outName
=
"
generate
d"
;
String
[]
schema
=
new
String
[
1
];
String
grammarName
=
new
String
();
boolean
first
=
true
;
...
...
@@ -35,17 +35,19 @@ public class GenCompiler extends Parser {
for
(
int
i
=
0
;
i
<
args
.
length
;
i
++)
{
if
(
args
[
i
].
equals
(
"-d"
))
{
dir
=
args
[++
i
];
System
.
out
.
println
(
"dir: "
+
dir
);
//
System.out.println("dir: "+dir);
}
else
if
(
args
[
i
].
equals
(
"-g"
))
{
grammarName
=
args
[++
i
];
System
.
out
.
println
(
"grammar: "
+
grammarName
);
dir
=
grammarName
;
outName
=
grammarName
;
// System.out.println("grammar: "+grammarName);
}
else
if
(
args
[
i
].
equals
(
"-o"
))
{
outName
=
args
[++
i
];
System
.
out
.
println
(
"outName: "
+
outName
);
//
System.out.println("outName: "+outName);
}
else
{
// OK, we suppose the remaing arg to be parsed.
schema
[
0
]
=
args
[
i
++];
System
.
out
.
println
(
"schema: "
+
schema
[
0
]);
//
System.out.println("schema: "+schema[0]);
}
}
Start
ast
=
parse
(
schema
);
...
...
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