Decl Group -- Dichiarazione dei Gruppi


I gruppi sono sequenze strutturate di dati. Le sequenze sono simili alla definizione di un DTD XML

La grammatica prevista è la seguente.

declaration: group_decl_stm
group_decl_stm: group_decl ';'
group_decl: 'group' GROUPCON(?) IDENTIFIER comment(?) group_body
group_body: '{' group_item(s) '}'
group_adecl: 'group' GROUPCON(?) comment(?) group_body
group_item: simple_group_ele
          | decl_group_ele
          | anon_group_ele
simple_group_ele: group_ele_tag IDENTIFIER GROUPOCC(?) GROUPANON(?) ';' comment(?)
decl_group_ele: group_decl GROUPOCC(?) GROUPANON(?) ';' comment(?)
anon_group_ele: group_adecl GROUPOCC(?) GROUPANON(?) ';' comment(?)
GROUPCON:
    /seq/i
  | /and/i
  | /or/i 
GROUPOCC:
    '?'
  | '*'
  | '+'
GROUPANON:
    '<'
comment: line_comment(s?) block_comment(s?)
line_comment: / \/ \/ .*? $/xm
block_comment: /\s* \/ \* .*? \* \/ /xms

Un esempio di codice.

group file                              // File sequenziale
    {
    group pos*;
    };
group pos                               // Posizione singola anagrafica
    {
    group or
        {
        struct tglaangp;
        struct tglaangg;
        };
    group or
        {
        struct tglaindb;
        struct tglaindl;
        }*;
    struct tglaemail+<;
    struct tglosld*;
    string note*;                       // Note alla posizione
    };
dsg.tag.decl.group • LastModified: 14-9-2009 • John Peter Arnold