Note:
AppList::= Application | AppList Application.
Application::= "APPLICATION" ":" ID "{" AppPartList "}".
AppPartList::= AppPart | AppPartList AppPart.
AppPart::= HeaderPart | ProgramPart | ScreenPart.
When Grapnel Compiler generates C source of the application it uses 'ID' from 'Application' rule as name of the source file of the application server program. It means that the 'ID' must be a valid file name. There are some examples here.
HeaderSList::= | HedaerSList HeaderSection.
HeaderSection::= "SECTION" ":" SectionName "{" GroupList "}".
SectionName::= "EDITOR" | "MAPPING" | "DEBUG" | "MONITOR" | "HARDWARE".
GroupList::= | GroupList Group.
Group::= "GROUP" ":" ID "{" ParamList "}".
ParamList::= | ParamList Param.
Param::= ID "=" ParamValueList ";".
ParamValueList::= ParamValue.
ParamValueList::= ParamValueList
"," ParamValue.
ParamValue::= IntNumber | FloatNumber | StringParam.
The header part of the GRP file contains additional informations required by the GRED (Graphical Editor), debugging and monitoring tools and so on. Parameters defined here can modify the generated source codes. It is not defined yet that what kind of 'ID' can appear in 'Group' rule. Possible 'ID' values in 'Param' rule are also undefined. It means that the Grapnel Compiler skips these parameters. See some examples.
ProgramSList::= | ProgramSList ProgramSection.
Process::= "PROCESS" ProcessNumID ":" ID ProcessRank "HEADERSECTION" "{" ProcHgroupList "}" "PORTSECTION" "{" ProcSgroupList "}" "PROGRAMSECTION" "{" ProcPgroupList "}". ProcessRank::= | "RANK" "=" IntNumber.
ProgramSection::= Process | ProcessGroup.
ProcessNumID::= | IntNumber.
ProcGroupType::= "PROCGROUP" | "FARM".
ProcHgroupList::= | ProcHgroupList ProcHgroup.
ProcHgroup::= PhgName CSuorce.
PhgName::= "GLOBAL" | "LOCAL" | "HEADS".
ProcSgroupList::= | ProcSgroupList ProcSgroup.
ProcSgroup::= PortType "("
Calculation ")" ":" IntNumber PortDefToPort. PortType::= "INPORT" | "OUTPORT" | "INOUTPORT" | "MULTICAST" | "SCATTER" | "REDUCE" | "GATHER".
Calculation::= "NONE" | "SUM" | "PROD" | "AVG".
PortDefToPort::= | "{" "PROC" ":" PortDefToProcID ";" "PORTID" ":" PortDefToPortID ";" TypeList "}".
PortDefToProcID::= | ID | IntNumber.
PortDefToPortID::= | IntNumber.
TypeList::= | TypeList PortDataType.
PortDataType::= "TYPE"
DataTypeDef ";".
DataTypeDef::= | DataType | DataType "[" DataTypeNum "]".
DataTypeNum::= IntNumber | CSource.
Datatype::= "CHAR" | "INT" | "FLOAT" | "DOUBLE" | ID.
ProcPgroupList::= | ProcPgroupList ProgItem.
ProgItem::= ProgItemType ":" IntNumber StringParam "{" ParamsOfPrgItem "}" PrgItemSource.
PrgItemSource::= | PrgItemSource CSource.
ProgItemType::= "SEQ" | "CAI" | "CAO" | "CAIALT" | "IFB" | "IFE" | "SWITCHB" | "SWITCHE" | "LOOPB" | "LOOPE" | "GRAPHIC" | "DUMMYB" | "DUMMYE".
ParamsOfPrgItem::= ItemOptionList ConnList PortParamList ItemListOfGraph.
ItemOptionList::= | ItemOptionList ItemOption.
ConnList::= Connection | ConnList Connection.
PortParamList::= | PortParamList PortParam.
ItemListOfGraph::= ProcPgroupList.
ItemOption::= "BLOCKED" | "UNBLOCKED" | ItemGuard.
ItemGuard::= "GUARD" "=" CSource.
Connection::= ConnectionType IntNumber ":" "{" ConnectionTo "}" ConnectionSource.
ConnectionType::= "CIN" | "COUT".
ConnectionTo::= IntNumber.
ConnectionSource::= | CSource.
PortParam::= "PORT" IntNumber ":" PortGuard PortSourceList.
PortGuard::= | "GUARD" "=" CSource.
PortSourceList::= | PortSourceList PortSource ";".
PortSource::= | CSource.
The program part of the application defines processes. It can split into three sections. Header section defines include files. Port section defines connections to other processes. Program section defines code of the processes. This is the most important section because it contains the structure of the program and source code of the sequential parts of the processes. There are examples here.
ScreenSList::= | ScreenSList ScreenSection.
ScreenSection::= "WINDOW" ":" ID "{" GroupList "}".
Digit::= "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9".
DigitList::= Digit | DigitList Digit.
Sign:= | "+" | "-".
Hex:= | "0x" | "0X".
IntNumber::= Sign Hex DigitList.
FloatNumber::= Sign DigitList "." DigitList.
FloatNumber::= Sign
DigitList "E" Sign DigitList.
StringParam::= """ CharList """.
CharList::= | CharList Char.
Char:= any character.
CSource::= "{@" any C-source
code "}".
CSource::=
StringParam