| BEFOREAFTER of 'a list list * 'a list list * count
| NOTHING
+and 'a replacement = REPLACEMENT of 'a list list * count | NOREPLACEMENT
+
and 'a mcode = 'a * info * mcodekind * meta_pos list (* pos variables *)
(* pos is an offset indicating where in the C code the mcodekind has an
effect *)
+and adjacency = ALLMINUS | ADJ of int
and mcodekind =
- MINUS of pos * int list * int * anything list list
+ MINUS of pos * int list * adjacency * anything replacement
| CONTEXT of pos * anything befaft
| PLUS of count
and count = ONE (* + *) | MANY (* ++ *)
| Paren of string mcode (* ( *) * expression *
string mcode (* ) *)
+ | Constructor of string mcode (* ( *) * fullType * string mcode (* ) *) *
+ initialiser
| MetaErr of meta_name mcode * constraints * keep_binding *
inherited
| MetaExpr of meta_name mcode * constraints * keep_binding *
| DisjExpr of expression list
| NestExpr of string mcode (* <.../<+... *) *
expression dots *
- string mcode (* ...>/...+> *) *
+ string mcode (* ...>/...+> *) *
expression option * multi
(* can appear in arg lists, and also inside Nest, as in:
| IdRegExpConstraint of reconstraint
and reconstraint =
- | IdRegExp of string * Str.regexp
- | IdNotRegExp of string * Str.regexp
+ | IdRegExp of string * Regexp.regexp
+ | IdNotRegExp of string * Regexp.regexp
and form = ANY | ID | LocalID | CONST (* form for MetaExp *)
| CstListLen of int
| AnyListLen
-and unaryOp = GetRef | DeRef | UnPlus | UnMinus | Tilde | Not
+and unaryOp = GetRef | GetRefLabel | DeRef | UnPlus | UnMinus | Tilde | Not
and assignOp = SimpleAssign | OpAssign of arithOp
and fixOp = Dec | Inc
and fullType = base_fullType wrap
and typeC = base_typeC wrap
-and baseType = VoidType | CharType | ShortType | IntType | DoubleType
- | FloatType | LongType | LongLongType | SizeType | SSizeType | PtrDiffType
+and baseType = VoidType | CharType | ShortType | ShortIntType | IntType
+| DoubleType | LongDoubleType | FloatType
+| LongType | LongIntType | LongLongType | LongLongIntType
+| SizeType | SSizeType | PtrDiffType
and structUnion = Struct | Union
| SeqStart of string mcode (* { *)
| SeqEnd of string mcode (* } *)
- | ExprStatement of expression * string mcode (*;*)
+ | ExprStatement of expression option * string mcode (*;*)
| IfHeader of string mcode (* if *) * string mcode (* ( *) *
expression * string mcode (* ) *)
| Else of string mcode (* else *)
| Atomic of rule_elem
| Disj of statement dots list
| Nest of string mcode (* <.../<+... *) * statement dots *
- string mcode (* ...>/...+> *) *
+ string mcode (* ...>/...+> *) *
(statement dots,statement) whencode list * multi *
dots_whencode list * dots_whencode list
| FunDecl of rule_elem (* header *) * rule_elem (* { *) *
| IncDots
and base_top_level =
- DECL of statement
+ NONDECL of statement (* cannot match all of a top-level declaration *)
| CODE of statement dots
| FILEINFO of string mcode (* old file *) * string mcode (* new file *)
| ERRORWORDS of expression list