<DEFAULT> SKIP : {
" "
| "\t"
| "\n"
| "\r"
| <"//" (~["\n","\r"])* ("\n" | "\r" | "\r\n")?>
| <"/*" (~["*"])* "*" ("*" | ~["*","/"] (~["*"])* "*")* "/">
}
|
<DEFAULT> TOKEN : {
<MAS: "MAS">
| <AGS: "agents">
| <ENV: "environment">
| <CONTROL: "executionControl">
| <AT: "at">
| <INFRA: "infrastructure">
| <CLASSPATH: "classpath">
| <SOURCEPATH: "aslSourcePath">
| <ASOEE: "events">
| <ASOEEV: "discard" | "requeue" | "retrieve">
| <ASOIB: "intBels">
| <ASOIBV: "sameFocus" | "newFocus">
| <ASONRC: "nrcbp">
| <ASOV: "verbose">
| <DIRECTIVE: "directives">
| <ASOSYNC: "synchronised">
| <ASOBOOL: "true" | "false">
| <ASAGCLASS: "agentClass">
| <ASAGARCHCLASS: "agentArchClass">
| <BBCLASS: "beliefBaseClass">
| <NUMBER: ["0"-"9"] (["0"-"9"])* | (["0"-"9"])* "." (["0"-"9"])+ (["e","E"] (["+","-"])? (["0"-"9"])+)? | (["0"-"9"])+ ["e","E"] (["+","-"])? (["0"-"9"])+>
| <STRING: "\"" (~["\"","\\","\n","\r"] | "\\" (["n","t","b","r","f","\\","\'","\""] | ["0"-"7"] (["0"-"7"])? | ["0"-"3"] ["0"-"7"] ["0"-"7"]))* "\"">
| <ASID: <LC_LETTER> (<LETTER> | <DIGIT> | "_")*>
| <ID: <LETTER> (<LETTER> | <DIGIT> | "_")*>
| <PATH: ("./" | "/" | "\\" | <DRIVER>) ((<LETTER> | <DIGIT> | "_")* ("/" | "\\"))*>
| <DRIVER: <LETTER> ":">
| <LETTER: <LC_LETTER> | <UP_LETTER>>
| <LC_LETTER: ["a"-"z"]>
| <UP_LETTER: ["A"-"Z"]>
| <DIGIT: ["0"-"9"]>
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* Configuration Grammar */ |
||
| mas | ::= | <MAS> <ASID> "{" infra environment control agents directives classpath sourcepath "}" |
| infra | ::= | ( <INFRA> ":" classDef )? |
| agents | ::= | ( <AGS> ":" ( agent )+ )? |
| agent | ::= | <ASID> ( fileName )? ASoptions ( <ASAGARCHCLASS> classDef | <ASAGCLASS> classDef | <BBCLASS> classDef | "#" <NUMBER> | <AT> <STRING> )* ";" |
| fileName | ::= | ( <PATH> )? <ASID> ( "." <ASID> )? |
| classDef | ::= | ( <ID> | <ASID> ) ( "." ( <ID> | <ASID> ) )* ( "(" ( ( parameter ) ( "," ( parameter ) )* )? ")" )? |
| parameter | ::= | ( classDef | <NUMBER> | <STRING> | listParameters ) |
| listParameters | ::= | "[" ( parameter ) ( "," parameter )* "]" |
| ASoptions | ::= | ( "[" procOption ( "," procOption )* "]" )? |
| procOption | ::= | ( <ASOEE> "=" <ASOEEV> | <ASOIB> "=" <ASOIBV> | <ASOSYNC> "=" <ASOBOOL> | <ASONRC> "=" <NUMBER> | <ASOV> "=" <NUMBER> | <ASID> "=" ( <STRING> | <ASID> | <NUMBER> | <ID> | <ASOBOOL> ) ) |
| environment | ::= | ( <ENV> ":" classDef ( <AT> <STRING> )? )? |
| control | ::= | ( <CONTROL> ":" classDef ( <AT> <STRING> )? )? |
| classpath | ::= | ( <CLASSPATH> ":" ( <STRING> ";" )+ )? |
| sourcepath | ::= | ( <SOURCEPATH> ":" ( <STRING> ";" )+ )? |
| directives | ::= | ( <DIRECTIVE> ":" ( <ASID> "=" classDef ";" )+ )? |