The Jacl2Jython program performs two main actions when it receives
a Jacl script file as input. The first action is scan the input file and group
characters into Jacl language parser tokens such as keywords, strings, braces,
operators, and others. The second action is convert each of the parser tokens
into the corresponding Jython syntax which is output into the Jython script
file.
The Jacl2Jython program does a single pass
through the input Jacl script each time it runs and does not perform any look-ahead
actions during the parsing and converting operations. As the Jacl2Jython program
encounters new method definitions, it saves and adds these method names into
a file called Jacl2Jython_UserMethods.txt to cache
all previously encountered user method definitions. If the parser encounters
a method call and has not yet seen its method definition, the Jacl2Jython
program flags the command as an unknown. The key is to run the Jacl2Jython
program at least two times for each Jacl script that is being converted into
a Jython script. Otherwise, the converted Jython script might contain unnecessary
warnings such as:
#?PROBLEM? (jacl line 123) COMMAND_UNKNOWN? myMethod
To
run the Jacl2Jython program to facilitate the conversion of wsadmin scripts
written in Jacl to Jython syntax: