# BNF for MAS2JavaParser.jcc

## NON-TERMINALS

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> ) )
environment | ::= | ( <ENV> ":" classDef ( <AT> <STRING> )? )?
control | ::= | ( <CONTROL> ":" classDef ( <AT> <STRING> )? )?
classpath | ::= | ( <CLASSPATH> ":" ( <STRING> ";" )+ )?
sourcepath | ::= | ( <SOURCEPATH> ":" ( <STRING> ";" )+ )?
directives | ::= | ( <DIRECTIVE> ":" ( <ASID> "=" classDef ";" )+ )?