Project

General

Profile

Grammar reference

(1) specification ::=

{ statement }

(2) statement ::=

idl-statement
| component
| interface

(3) idl-statements ::=

{ idl-statement } idl-statement

(4) idl-statement ::=

module
| const-dcl
| type-dcl

(5) component ::=

"component" component-name component-body ";"

(6) component-name ::=

identifier

(7) component-body ::=

[ "{" exports "}" ]

(8) exports ::=

{ export }

(9) export ::=

idl-statement
| property
| ids
| task
| port
| attribute
| service

(10) component-property ::=

( "doc" string-literals
| "version" string-literals
| "lang" string-literals
| "email" string-literals
| "requires" string-list
| "codels-require" string-list
| "clock-rate" const-expr time-unit
| "provides" interface-list
| "uses" interface-list ) ";"

(11) throw-property ::=

"throws" throw-list ";"

(12) throw-list ::=

{ named-type "," } named-type

(13) interface ::=

"interface" interface-scope component-body ";"

(14) interface-scope ::=

identifier

(15) interface-name ::=

identifier

(16) interface-property ::=

"extends" interface-list ";"

(17) interface-list ::=

{ interface-name "," } interface-name

(18) ids ::=

ids-name "{" member-list "}" ";"

(19) ids-name ::=

"ids"

(20) task ::=

"task" identifier opt-properties ";"

(21) task-property ::=

( "period" const-expr time-unit
| "delay" const-expr time-unit
| "priority" positive-int-const
| "scheduling" "real-time"
| "stack" positive-int-const size-unit ) ";"

(22) port ::=

"port" opt-multiple port-dir type-spec identifier opt-properties ";"

(23) port-dir ::=

"in"
| "out"

(24) opt-multiple ::=

[ "multiple" ]

(25) attribute ::=

"attribute" identifier "(" attribute-parameters ")" opt-properties ";"

(26) service ::=

service-kind identifier "(" service-parameters ")" opt-properties ";"

(27) service-kind ::=

"function"
| "activity"

(28) service-property ::=

( "task" identifier
| "interrupts" identifier-list
| "before" identifier-list
| "after" identifier-list
| "validate" codel
| "local" local-variables ) ";"

(29) attribute-parameters ::=

[ { attribute-parameter "," } attribute-parameter ]

(30) attribute-parameter ::=

parameter-dir ( parameter-variable opt-initializer
| parameter-variable "::" identifier opt-initializer
| "::" identifier opt-initializer )

(31) service-parameters ::=

[ { service-parameter "," } service-parameter ]

(32) service-parameter ::=

parameter-dir type-spec declarator opt-initializer

(33) local-variables ::=

( type-spec
| local-variables "," ) declarator

(34) codel ::=

identifier "(" codel-parameters ")"

(35) fsm-codel ::=

"<" event-list ">" identifier "(" codel-parameters ")" "yields" event-list

(36) opt-async ::=

[ "async" ]

(37) event-name ::=

[ "pause" "::" ] identifier

(38) event-list ::=

{ event-name "," } event-name

(39) codel-parameters ::=

[ { codel-parameter "," } codel-parameter ]

(40) codel-parameter ::=

opt-parameter-src parameter-dir ( parameter-variable
| parameter-variable "::" identifier
| "::" identifier )

(41) codel-property ::=

opt-async "codel" ( codel ";"
| fsm-codel ";" )

(42) opt-parameter-src ::=

[ "ids"
| "local"
| "port"
| "remote" ]

(43) parameter-dir ::=

"in"
| "out"
| "inout"

(44) parameter-variable ::=

identifier
| parameter-variable "." identifier
| parameter-variable "[" positive-int-const "]"

(45) opt-initializer ::=

[ "=" initializer ]

(46) initializers ::=

[ { initializer "," } initializer ]

(47) initializer ::=

initializer-value
| ":" string-literals
| initializer-value ":" string-literals

(48) initializer-value ::=

const-expr
| "{" initializers "}"
| "[" positive-int-const "]" "=" const-expr
| "[" positive-int-const "]" "=" "{" initializers "}"
| "[" positive-int-const "]" "="
| "." identifier "=" const-expr
| "." identifier "=" "{" initializers "}"
| "." identifier "="

(49) module ::=

"module" module-name "{" module-body "}" ";"

(50) module-name ::=

identifier

(51) module-body ::=

[ idl-statements ]

(52) struct-name ::=

identifier

(53) union-name ::=

identifier

(54) exception-name ::=

identifier

(55) scoped-name ::=

[ [ scoped-name ] "::" ] identifier

(56) type-spec ::=

simple-type-spec
| constructed-type-spec

(57) simple-type-spec ::=

base-type-spec
| template-type-spec
| named-type

(58) type-dcl ::=

"typedef" type-declarator ";"
| "native" identifier ";"
| "exception" exception-list ";"
| constructed-type ";"
| forward-dcl ";"

(59) type-declarator ::=

( type-spec
| type-declarator "," ) declarator

(60) exception-list ::=

{ exception-dcl "," } exception-dcl

(61) exception-dcl ::=

exception-name opt-member-list

(62) opt-member-list ::=

[ "{" ( "}"
| member-list "}" ) ]

(63) named-type ::=

scoped-name

(64) declarator ::=

simple-declarator
| array-declarator

(65) simple-declarator ::=

identifier

(66) array-declarator ::=

( simple-declarator
| array-declarator ) fixed-array-size

(67) fixed-array-size ::=

"[" positive-int-const "]"

(68) const-dcl ::=

"const" const-type identifier "=" const-expr ";"

(69) const-type ::=

integer-type
| char-type
| boolean-type
| floating-pt-type
| octet-type
| string-type
| named-type

(70) base-type-spec ::=

boolean-type
| integer-type
| floating-pt-type
| char-type
| octet-type
| any-type

(71) integer-type ::=

signed-int
| unsigned-int

(72) signed-int ::=

signed-longlong-int
| signed-long-int
| signed-short-int

(73) unsigned-int ::=

unsigned-longlong-int
| unsigned-long-int
| unsigned-short-int

(74) unsigned-short-int ::=

"unsigned" "short"

(75) unsigned-long-int ::=

"unsigned" "long"

(76) unsigned-longlong-int ::=

"unsigned" "long" "long"

(77) signed-short-int ::=

"short"

(78) signed-long-int ::=

"long"

(79) signed-longlong-int ::=

"long" "long"

(80) floating-pt-type ::=

float-type
| double-type

(81) float-type ::=

"float"

(82) double-type ::=

"double"

(83) char-type ::=

"char"

(84) boolean-type ::=

"boolean"

(85) octet-type ::=

"octet"

(86) any-type ::=

"any"

(87) template-type-spec ::=

sequence-type
| optional-type
| string-type
| fixed-type

(88) sequence-type ::=

"sequence" "<" simple-type-spec ( ">"
| "," positive-int-const ">" )

(89) optional-type ::=

"optional" "<" simple-type-spec ">"

(90) string-type ::=

"string" [ "<" positive-int-const ">" ]

(91) fixed-type ::=

"fixed" [ "<" positive-int-const "," positive-int-const ">" ]

(92) constructed-type-spec ::=

constructed-type

(93) constructed-type ::=

struct-type
| union-type
| enum-type

(94) struct-type ::=

"struct" struct-name "{" member-list "}"

(95) member-list ::=

{ member ";" } member ";"

(96) member ::=

( type-spec
| member "," ) declarator

(97) union-type ::=

"union" union-name "switch" "(" switch-type-spec ")" "{" switch-body "}"

(98) switch-type-spec ::=

integer-type
| char-type
| boolean-type
| enum-type
| named-type

(99) switch-body ::=

{ case } case

(100) case ::=

case-label-list type-spec declarator ";"

(101) case-label-list ::=

{ case-label } case-label

(102) case-label ::=

( "case" const-expr
| "default" ) ":"

(103) enum-type ::=

"enum" identifier "{" enumerator-list "}"

(104) enumerator-list ::=

{ enumerator "," } enumerator

(105) enumerator ::=

identifier

(106) forward-dcl ::=

( "struct"
| "union" ) identifier

(107) identifier ::=

"[A-Za-z-][A-Za-z0-9-]*"
| "s"
| "ms"
| "us"
| "k"
| "m"
| "real-time"
| "interface"
| "component"
| "ids"
| "attribute"
| "function"
| "activity"
| "version"
| "lang"
| "email"
| "requires"
| "codels-require"
| "clock-rate"
| "task"
| "task"
| "period"
| "delay"
| "priority"
| "scheduling"
| "stack"
| "codel"
| "validate"
| "yields"
| "pause"
| "throws"
| "doc"
| "interrupts"
| "before"
| "after"
| "handle"
| "port"
| "in"
| "out"
| "inout"
| "local"
| "async"
| "remote"
| "extends"
| "provides"
| "uses"
| "multiple"
| "native"
| "exception"

(108) identifier-list ::=

{ identifier "," } identifier

(109) const-expr ::=

or-expr

(110) positive-int-const ::=

const-expr

(111) or-expr ::=

{ xor-expr "|" } xor-expr

(112) xor-expr ::=

{ and-expr "^" } and-expr

(113) and-expr ::=

{ shift-expr "&" } shift-expr

(114) shift-expr ::=

{ add-expr ( ">>"
| "<<" ) } add-expr

(115) add-expr ::=

{ mult-expr ( "+"
| "-" ) } mult-expr

(116) mult-expr ::=

{ unary-expr ( "*"
| "/"
| "%" ) } unary-expr

(117) unary-expr ::=

[ "-"
| "+"
| "~" ] primary-expr

(118) primary-expr ::=

literal
| "(" const-expr ")"
| named-type

(119) literal ::=

"TRUE"
| "FALSE"
| integer-literal
| "<float-literal>"
| "<fixed-literal>"
| "<char-literal>"
| string-literals

(120) string-literals ::=

{ string-literal } string-literal

(121) string-list ::=

{ string-literals "," } string-literals

(122) time-unit ::=

[ "s"
| "ms"
| "us" ]

(123) size-unit ::=

[ "k"
| "m" ]

(124) opt-properties ::=

[ "{" properties "}" ]

(125) properties ::=

{ property }

(126) property ::=

component-property
| interface-property
| task-property
| service-property
| codel-property
| throw-property