Previous Up Next

6  Annotation Language

The following is the grammar for annotations:
Annotation A ::= ANN(AName, AA1,AA2, ...)
Annotation name AName ::= Predident   |  Ident
Annotation argument AA ::= E   |  P   |  "..."   |  { Reg1,Reg2, ...}
Predicate start startpred ::= 'A' - 'Z'   |  '<'   |  '>'   |  '='
Expression start startident ::= 'a' - 'z'   |  '_'   |  '%'   |  '$'   |  '!'   |  ''   |  '&'   |  '*'
        |  '+'   |  '-'   |  '\'   |  '?'   |  '|'   |  '/'   |  ' '
Predicate constructor Predident ::= Startpred (Startpred   |  Startident   |  ['0' - '9']) *
Expression constructor Ident ::= Startident (Startpred   |  Startident   |  ['0' - '9']) *
Number Num ::= ['0' - '9'] +
Register Reg ::= Architecture dependent gcc notation
Predicate P ::= TRUE   |  FALSE
        |  (AND P1 P2 ...)   |  (OR P1 P2 ...)
        |  (=> P1 P2)   |  (ALL [Ident] P)   |  (EXISTS [Ident] P)
        |  (Predident E1 E2 ...)
Expression E ::= Num   |  Reg   |  Ident
        |  (+ E1 E2)   |  (- E1 E2)   |  (* E1 E2)   |  Num( E )   |  (Ident E1 E2 ...)

Important syntactic notes:
Previous Up Next