|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jlab.coda.afecs.cool.parser.CCompiler
public class CCompiler
JSA: Thomas Jefferson National Accelerator Facility
This software was developed under a United States Government license,
described in the NOTICE file included as part of this distribution.
Copyright (c), Aug 18, 2009
Constructor Summary | |
---|---|
CCompiler(java.lang.String s)
Constructor removes all control characters from the cool rule code |
Method Summary | |
---|---|
boolean |
checkLastBrase(java.lang.String s)
Simple check if the coded description ends with the curly bracket |
java.util.ArrayList<ACondition> |
compile()
Parses the string codded using COOL state machine description language |
java.util.LinkedHashMap<java.lang.Integer,java.lang.String> |
findConditionalOperators(java.lang.String s)
Finds AND or OR boolean operators (& |) |
java.util.LinkedHashMap<java.lang.Integer,java.lang.Integer> |
findConditionalStatements(java.lang.String s)
Finds conditional statement limits. |
boolean |
findConditonScope(java.lang.String s)
Finds begining and ending indexes of the conditions and related scopes. |
java.lang.String |
getConditionalKeyWord(java.lang.String s)
get conditional key word of a condition |
static void |
main(java.lang.String[] args)
|
AStatement |
parseStatement(java.lang.String s)
Parses conditonal or action statements |
java.util.ArrayList<AStatement> |
parseStatements(java.lang.String s)
Parses string containing mutiple statements, separated by the ; |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CCompiler(java.lang.String s)
s
- code of the ruleMethod Detail |
---|
public boolean findConditonScope(java.lang.String s)
s
- input string
public java.util.LinkedHashMap<java.lang.Integer,java.lang.Integer> findConditionalStatements(java.lang.String s)
s
- condition string to be analyzed
public java.util.LinkedHashMap<java.lang.Integer,java.lang.String> findConditionalOperators(java.lang.String s)
s
- input string of a condition
public java.lang.String getConditionalKeyWord(java.lang.String s)
s
- input string of a condition
public boolean checkLastBrase(java.lang.String s)
s
- string codded using COOL state machine description language
public AStatement parseStatement(java.lang.String s)
s
- statement string
public java.util.ArrayList<AStatement> parseStatements(java.lang.String s)
s
- input string
public java.util.ArrayList<ACondition> compile()
public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |