Main production.
- By Steve Kapp
- May 24, 2001
Power Java
Parsing With JavaCC
by Steve Kapp
Listing 1. Main production.
01 boolean translationUnit(PSEnvironment env) : {
PSObject obj; } {
02 obj = numericType(env) {
03 env.setCurrentObject(obj);
04 return true;
05 }
06 | obj = stringType(env) {
07 env.setCurrentObject(obj);
08 return true;
09 }
10 | obj = nameType(env) {
11 env.setCurrentObject(obj);
12 return true;
13 }
14 | arrayStart(env) {
15 return true;
16 }
17 | obj = arrayType(env) {
18 env.setCurrentObject(obj);
19 return true;
20 }
21 | <EOF> {
22 return false;
23 }
24 }
About the Author
Steve Kapp is a client partner at EMRT in Rochester, NY. Steve can be contacted at [email protected].