jeops.compiler
Class Main
java.lang.Object
|
+--jeops.compiler.Main
- public class Main
- extends java.lang.Object
- implements TokenConstants
Main class in the Jeops phase of converting rule files into Java
classes.
When invoked, the method convert()
will create a java file
in the same directory as the rule file (with the extension changed from
.rules
to .java
). In this way, rule files can
be grouped into packages in the same way as java classes.
- Version:
- 0.02 14.01.2000 Grouping of the preconditions according to the
appearance of the declaration.
- Author:
- Carlos Figueira Filho (csff@di.ufpe.br)
Fields inherited from interface jeops.compiler.parser.TokenConstants |
ACTIONS,
ASTERISK,
CLOSE_CURLY_BRACKET,
COMMA,
COMMENT,
DECLARATIONS,
DOT,
EOF,
EQUALS,
ERROR,
EXTENDS,
IDENT,
IMPORT,
LOCALDECL,
NONE_ABOVE,
OPEN_CURLY_BRACKET,
PACKAGE,
PRECONDITIONS,
PUBLIC,
RULE,
RULE_BASE,
SEMICOLON,
STRING,
WHITE_SPACE |
Constructor Summary |
Main(java.lang.String ruleFileName)
Class constructor. |
Method Summary |
void |
convert()
Creates a java source file that behaves as defined in the rules file. |
static void |
main(java.lang.String[] args)
Test method for this class. |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Main
public Main(java.lang.String ruleFileName)
throws java.io.IOException
- Class constructor.
- Parameters:
ruleFileName
- the name of the rules file.- Throws:
- java.io.IOException - if some IO error occurs.
convert
public void convert()
throws java.io.IOException,
JeopsException
- Creates a java source file that behaves as defined in the rules file.
- Throws:
- java.io.IOException - if some IO error occurs.
- JeopsException - if some error occurs while converting the rule.
main
public static void main(java.lang.String[] args)
- Test method for this class.
- Parameters:
args
- command-line arguments. None is needed, but
one can pass the rule file name for the converting.