Nonterminal Block

GiglNtDeclList :=

| <empty>

| GiglNtDeclList ';'

| GiglNtDeclList GiglNtDecl

GiglNtDecl :=

| Identifier_t '(' ConcreteParamList ')' GiglMaybeInherit ';'

| Identifier_t '(' ')' GiglMaybeInherit ';'

| Identifier_t GiglMaybeInherit ';'

GiglMaybeInherit :=

| <empty>

| 'inherit' GiglInheritList

GiglInheritList :=

| GiglInheritance

| GiglInheritList ',' GiglInheritance

GiglInheritance :=

| TypeName_t

| Identifier_t

These sets of productions starting from the nonterminal GiglNtDeclList, which is the content in a nonterminal block. It contains a list (maybe empty) of entries (declarations) each of which may optionally be followed by extra ';'s. Each entry is a declaration of a nonterminal type, which can optionally be specified with parameters, and with an inheritance from parent classes. The parameters are parameters to the node generator, and will also act as the parameters to the lambda functions behind the configure parameters. The inheritance is specified with the keyword 'inherit' and can take one or more class names separated by commas (typically one if ever needed), and it might be useful when using attributes and functions that are already defined in other source file.

    • Identifier_t is a terminal in C that matches any valid identifier. Here, it is the nonterminal type name in the productions from the nonterminal GiglNtDecl, and is the inherited class name in the productions from the nonterminal GiglInheritance (which should actually be using TypeName_t only; Identifier_t is also added only because the type system is not robust at the moment).

  • TypeName_t is a terminal in C that matches any valid type names, which is the inherited class name here.

    • ConcreteParamList is a nonterminal for a list of parameters, syntax-wise it is like declaring a list of parameters for functions in C, except that parameter names must be present and no variadic is allowed; here there are parameters to the node generator.