2 * Copyright 2010, INRIA, University of Copenhagen
3 * Julia Lawall, Rene Rydhof Hansen, Gilles Muller, Nicolas Palix
4 * Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
5 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller, Nicolas Palix
6 * This file is part of Coccinelle.
8 * Coccinelle is free software: you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation, according to version 2 of the License.
12 * Coccinelle is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with Coccinelle. If not, see <http://www.gnu.org/licenses/>.
20 * The authors reserve the right to distribute this or future versions of
21 * Coccinelle under other licenses.
25 (* --------------------------------------------------------------------- *)
28 type added_string
= Noindent
of string | Indent
of string
30 type info
= { line
: int; column
: int;
31 strbef
: (added_string
* int (* line *) * int (* col *)) list
;
32 straft
: (added_string
* int (* line *) * int (* col *)) list
}
34 type meta_name
= string * string
38 free_vars
: meta_name list
; (*free vars*)
39 minus_free_vars
: meta_name list
; (*minus free vars*)
40 fresh_vars
: (meta_name
* seed
) list
; (*fresh vars*)
41 inherited
: meta_name list
; (*inherited vars*)
42 saved_witness
: meta_name list
; (*witness vars*)
43 bef_aft
: dots_bef_aft
;
44 pos_info
: meta_name mcode
option; (* pos info, try not to duplicate *)
45 true_if_test_exp
: bool;(* true if "test_exp from iso", only for exprs *)
46 (* the following is only for declarations *)
47 safe_for_multi_decls
: bool;
48 (* isos relevant to the term; ultimately only used for rule_elems *)
49 iso_info
: (string*anything
) list
}
52 BEFORE
of 'a list list
* count
53 | AFTER
of 'a list list
* count
54 | BEFOREAFTER
of 'a list list
* 'a list list
* count
57 and 'a mcode
= 'a
* info
* mcodekind
* meta_pos
(* pos variable *)
58 (* pos is an offset indicating where in the C code the mcodekind has an
61 MINUS
of pos
* int list
* int * anything list list
62 | CONTEXT
of pos
* anything befaft
64 and count
= ONE
(* + *) | MANY
(* ++ *)
66 Real
of int (* charpos *) | Virt
of int * int (* charpos + offset *)
67 and pos
= NoPos
| DontCarePos
| FixPos
of (fixpos
* fixpos
)
71 | AddingBetweenDots
of statement
* int (*index of let var*)
72 | DroppingBetweenDots
of statement
* int (*index of let var*)
74 and inherited
= Type_cocci.inherited
75 and keep_binding
= Type_cocci.keep_binding
76 and multi
= bool (*true if a nest is one or more, false if it is zero or more*)
79 meta_name list
(*free vars*) * (meta_name
* seed
) list
(*fresh*) *
80 meta_name list
(*inherited vars*) * mcodekind
82 (* --------------------------------------------------------------------- *)
85 and arity
= UNIQUE
| OPT
| MULTI
| NONE
88 MetaIdDecl
of arity
* meta_name
(* name *)
89 | MetaFreshIdDecl
of meta_name
(* name *) * seed
(* seed *)
90 | MetaTypeDecl
of arity
* meta_name
(* name *)
91 | MetaInitDecl
of arity
* meta_name
(* name *)
92 | MetaListlenDecl
of meta_name
(* name *)
93 | MetaParamDecl
of arity
* meta_name
(* name *)
94 | MetaParamListDecl
of arity
* meta_name
(*name*) * list_len
(*len*)
96 arity
* meta_name
(* name *) * Type_cocci.typeC list
option
97 | MetaErrDecl
of arity
* meta_name
(* name *)
99 arity
* meta_name
(* name *) * Type_cocci.typeC list
option
101 arity
* meta_name
(* name *) * Type_cocci.typeC list
option
102 | MetaLocalIdExpDecl
of
103 arity
* meta_name
(* name *) * Type_cocci.typeC list
option
104 | MetaExpListDecl
of arity
* meta_name
(*name*) * list_len
(*len*)
105 | MetaDeclDecl
of arity
* meta_name
(* name *)
106 | MetaFieldDecl
of arity
* meta_name
(* name *)
107 | MetaStmDecl
of arity
* meta_name
(* name *)
108 | MetaStmListDecl
of arity
* meta_name
(* name *)
109 | MetaFuncDecl
of arity
* meta_name
(* name *)
110 | MetaLocalFuncDecl
of arity
* meta_name
(* name *)
111 | MetaPosDecl
of arity
* meta_name
(* name *)
112 | MetaDeclarerDecl
of arity
* meta_name
(* name *)
113 | MetaIteratorDecl
of arity
* meta_name
(* name *)
115 and list_len
= AnyLen
| MetaLen
of meta_name
| CstLen
of int
117 and seed
= NoVal
| StringSeed
of string | ListSeed
of seed_elem list
118 and seed_elem
= SeedString
of string | SeedId
of meta_name
120 (* --------------------------------------------------------------------- *)
121 (* --------------------------------------------------------------------- *)
129 and 'a dots
= 'a base_dots wrap
131 (* --------------------------------------------------------------------- *)
136 | MetaId
of meta_name mcode
* idconstraint
* keep_binding
* inherited
137 | MetaFunc
of meta_name mcode
* idconstraint
* keep_binding
* inherited
138 | MetaLocalFunc
of meta_name mcode
* idconstraint
* keep_binding
* inherited
141 | UniqueIdent
of ident
143 and ident
= base_ident wrap
145 (* --------------------------------------------------------------------- *)
148 and base_expression
=
150 | Constant
of constant mcode
151 | FunCall
of expression
* string mcode
(* ( *) *
152 expression dots
* string mcode
(* ) *)
153 | Assignment
of expression
* assignOp mcode
* expression
* bool
154 | CondExpr
of expression
* string mcode
(* ? *) * expression
option *
155 string mcode
(* : *) * expression
156 | Postfix
of expression
* fixOp mcode
157 | Infix
of expression
* fixOp mcode
158 | Unary
of expression
* unaryOp mcode
159 | Binary
of expression
* binaryOp mcode
* expression
160 | Nested
of expression
* binaryOp mcode
* expression
161 | ArrayAccess
of expression
* string mcode
(* [ *) * expression
*
163 | RecordAccess
of expression
* string mcode
(* . *) * ident
164 | RecordPtAccess
of expression
* string mcode
(* -> *) * ident
165 | Cast
of string mcode
(* ( *) * fullType
* string mcode
(* ) *) *
168 | SizeOfExpr
of string mcode
(* sizeof *) * expression
169 | SizeOfType
of string mcode
(* sizeof *) * string mcode
(* ( *) *
170 fullType
* string mcode
(* ) *)
171 | TypeExp
of fullType
173 | Paren
of string mcode
(* ( *) * expression
*
176 | MetaErr
of meta_name mcode
* constraints
* keep_binding
*
178 | MetaExpr
of meta_name mcode
* constraints
* keep_binding
*
179 Type_cocci.typeC list
option * form
* inherited
180 | MetaExprList
of meta_name mcode
* listlen
*
181 keep_binding
* inherited
(* only in arg lists *)
183 | EComma
of string mcode
(* only in arg lists *)
185 | DisjExpr
of expression list
186 | NestExpr
of string mcode
(* <.../<+... *) *
188 string mcode
(* ...>/...+> *) *
189 expression
option * multi
191 (* can appear in arg lists, and also inside Nest, as in:
192 if(< ... X ... Y ...>)
193 In the following, the expression option is the WHEN *)
194 | Edots
of string mcode
(* ... *) * expression
option
195 | Ecircles
of string mcode
(* ooo *) * expression
option
196 | Estars
of string mcode
(* *** *) * expression
option
198 | OptExp
of expression
199 | UniqueExp
of expression
203 | NotIdCstrt
of reconstraint
204 | NotExpCstrt
of expression list
205 | SubExpCstrt
of meta_name list
207 (* Constraints on Meta-* Identifiers, Functions *)
210 | IdNegIdSet
of string list
* meta_name list
211 | IdRegExpConstraint
of reconstraint
214 | IdRegExp
of string * Str.regexp
215 | IdNotRegExp
of string * Str.regexp
217 and form
= ANY
| ID
| LocalID
| CONST
(* form for MetaExp *)
219 and expression
= base_expression wrap
222 MetaListLen
of meta_name mcode
* keep_binding
* inherited
226 and unaryOp
= GetRef
| DeRef
| UnPlus
| UnMinus
| Tilde
| Not
227 and assignOp
= SimpleAssign
| OpAssign
of arithOp
228 and fixOp
= Dec
| Inc
230 and binaryOp
= Arith
of arithOp
| Logical
of logicalOp
232 Plus
| Minus
| Mul
| Div
| Mod
| DecLeft
| DecRight
| And
| Or
| Xor
233 and logicalOp
= Inf
| Sup
| InfEq
| SupEq
| Eq
| NotEq
| AndLog
| OrLog
241 (* --------------------------------------------------------------------- *)
245 Type
of const_vol mcode
option * typeC
246 | DisjType
of fullType list
(* only after iso *)
247 | OptType
of fullType
248 | UniqueType
of fullType
251 BaseType
of baseType
* string mcode list
(* Yoann style *)
252 | SignedT
of sign mcode
* typeC
option
253 | Pointer
of fullType
* string mcode
(* * *)
254 | FunctionPointer
of fullType
*
255 string mcode
(* ( *)*string mcode
(* * *)*string mcode
(* ) *)*
256 string mcode
(* ( *)*parameter_list
*string mcode
(* ) *)
257 | FunctionType
of bool (* true if all minus for dropping return type *) *
259 string mcode
(* ( *) * parameter_list
*
261 | Array
of fullType
* string mcode
(* [ *) *
262 expression
option * string mcode
(* ] *)
263 | EnumName
of string mcode
(*enum*) * ident
option (* name *)
264 | EnumDef
of fullType
(* either EnumName or metavar *) *
265 string mcode
(* { *) * expression dots
* string mcode
(* } *)
266 | StructUnionName
of structUnion mcode
* ident
option (* name *)
267 | StructUnionDef
of fullType
(* either StructUnionName or metavar *) *
268 string mcode
(* { *) * declaration dots
* string mcode
(* } *)
269 | TypeName
of string mcode
271 | MetaType
of meta_name mcode
* keep_binding
* inherited
273 and fullType
= base_fullType wrap
274 and typeC
= base_typeC wrap
276 and baseType
= VoidType
| CharType
| ShortType
| IntType
| DoubleType
277 | FloatType
| LongType
| LongLongType
| SizeType
| SSizeType
| PtrDiffType
279 and structUnion
= Struct
| Union
281 and sign
= Signed
| Unsigned
283 and const_vol
= Const
| Volatile
285 (* --------------------------------------------------------------------- *)
286 (* Variable declaration *)
287 (* Even if the Cocci program specifies a list of declarations, they are
288 split out into multiple declarations of a single variable each. *)
290 and base_declaration
=
291 Init
of storage mcode
option * fullType
* ident
* string mcode
(*=*) *
292 initialiser
* string mcode
(*;*)
293 | UnInit
of storage mcode
option * fullType
* ident
* string mcode
(* ; *)
294 | TyDecl
of fullType
* string mcode
(* ; *)
295 | MacroDecl
of ident
(* name *) * string mcode
(* ( *) *
296 expression dots
* string mcode
(* ) *) * string mcode
(* ; *)
297 | Typedef
of string mcode
(*typedef*) * fullType
* typeC
* string mcode
(*;*)
298 | DisjDecl
of declaration list
299 | Ddots
of string mcode
(* ... *) * declaration
option (* whencode *)
301 | MetaDecl
of meta_name mcode
* keep_binding
* inherited
302 | MetaField
of meta_name mcode
* keep_binding
* inherited
304 | OptDecl
of declaration
305 | UniqueDecl
of declaration
307 and declaration
= base_declaration wrap
309 (* --------------------------------------------------------------------- *)
312 and base_initialiser
=
313 MetaInit
of meta_name mcode
* keep_binding
* inherited
314 | InitExpr
of expression
315 | ArInitList
of string mcode
(*{*) * initialiser dots
* string mcode
(*}*)
316 | StrInitList
of bool (* true if all are - *) *
317 string mcode
(*{*) * initialiser list
* string mcode
(*}*) *
318 initialiser list
(* whencode: elements that shouldn't appear in init *)
320 designator list
(* name *) * string mcode
(*=*) *
321 initialiser
(* gccext: *)
322 | InitGccName
of ident
(* name *) * string mcode
(*:*) *
324 | IComma
of string mcode
(* , *)
325 | Idots
of string mcode
(* ... *) * initialiser
option (* whencode *)
326 | OptIni
of initialiser
327 | UniqueIni
of initialiser
330 DesignatorField
of string mcode
(* . *) * ident
331 | DesignatorIndex
of string mcode
(* [ *) * expression
* string mcode
(* ] *)
333 string mcode
(* [ *) * expression
* string mcode
(* ... *) *
334 expression
* string mcode
(* ] *)
336 and initialiser
= base_initialiser wrap
338 (* --------------------------------------------------------------------- *)
341 and base_parameterTypeDef
=
342 VoidParam
of fullType
343 | Param
of fullType
* ident
option
345 | MetaParam
of meta_name mcode
* keep_binding
* inherited
346 | MetaParamList
of meta_name mcode
* listlen
* keep_binding
* inherited
348 | PComma
of string mcode
350 | Pdots
of string mcode
(* ... *)
351 | Pcircles
of string mcode
(* ooo *)
353 | OptParam
of parameterTypeDef
354 | UniqueParam
of parameterTypeDef
356 and parameterTypeDef
= base_parameterTypeDef wrap
358 and parameter_list
= parameterTypeDef dots
360 (* --------------------------------------------------------------------- *)
361 (* #define Parameters *)
363 and base_define_param
=
365 | DPComma
of string mcode
366 | DPdots
of string mcode
(* ... *)
367 | DPcircles
of string mcode
(* ooo *)
368 | OptDParam
of define_param
369 | UniqueDParam
of define_param
371 and define_param
= base_define_param wrap
373 and base_define_parameters
=
375 | DParams
of string mcode
(*( *) * define_param dots
* string mcode
(* )*)
377 and define_parameters
= base_define_parameters wrap
379 (* --------------------------------------------------------------------- *)
382 (* PER = keep bindings separate, ANY = collect them *)
383 and meta_collect
= PER
| ALL
386 MetaPos
of meta_name mcode
* meta_name list
*
387 meta_collect
* keep_binding
* inherited
390 (* --------------------------------------------------------------------- *)
391 (* Function declaration *)
393 and storage
= Static
| Auto
| Register
| Extern
395 (* --------------------------------------------------------------------- *)
399 FunHeader
of mcodekind
(* before the function header *) *
400 bool (* true if all minus, for dropping static, etc *) *
401 fninfo list
* ident
(* name *) *
402 string mcode
(* ( *) * parameter_list
*
404 | Decl
of mcodekind
(* before the decl *) *
405 bool (* true if all minus *) * declaration
407 | SeqStart
of string mcode
(* { *)
408 | SeqEnd
of string mcode
(* } *)
410 | ExprStatement
of expression
* string mcode
(*;*)
411 | IfHeader
of string mcode
(* if *) * string mcode
(* ( *) *
412 expression
* string mcode
(* ) *)
413 | Else
of string mcode
(* else *)
414 | WhileHeader
of string mcode
(* while *) * string mcode
(* ( *) *
415 expression
* string mcode
(* ) *)
416 | DoHeader
of string mcode
(* do *)
417 | WhileTail
of string mcode
(* while *) * string mcode
(* ( *) *
418 expression
* string mcode
(* ) *) *
420 | ForHeader
of string mcode
(* for *) * string mcode
(* ( *) *
421 expression
option * string mcode
(*;*) *
422 expression
option * string mcode
(*;*) *
423 expression
option * string mcode
(* ) *)
424 | IteratorHeader
of ident
(* name *) * string mcode
(* ( *) *
425 expression dots
* string mcode
(* ) *)
426 | SwitchHeader
of string mcode
(* switch *) * string mcode
(* ( *) *
427 expression
* string mcode
(* ) *)
428 | Break
of string mcode
(* break *) * string mcode
(* ; *)
429 | Continue
of string mcode
(* continue *) * string mcode
(* ; *)
430 | Label
of ident
* string mcode
(* : *)
431 | Goto
of string mcode
(* goto *) * ident
* string mcode
(* ; *)
432 | Return
of string mcode
(* return *) * string mcode
(* ; *)
433 | ReturnExpr
of string mcode
(* return *) * expression
*
436 | MetaRuleElem
of meta_name mcode
* keep_binding
* inherited
437 | MetaStmt
of meta_name mcode
* keep_binding
* metaStmtInfo
*
439 | MetaStmtList
of meta_name mcode
* keep_binding
* inherited
442 | TopExp
of expression
(* for macros body *)
443 | Ty
of fullType
(* only at top level *)
444 | TopInit
of initialiser
(* only at top level *)
445 | Include
of string mcode
(*#include*) * inc_file mcode
(*file *)
446 | DefineHeader
of string mcode
(* #define *) * ident
(* name *) *
447 define_parameters
(*params*)
448 | Case
of string mcode
(* case *) * expression
* string mcode
(*:*)
449 | Default
of string mcode
(* default *) * string mcode
(*:*)
450 | DisjRuleElem
of rule_elem list
453 FStorage
of storage mcode
455 | FInline
of string mcode
456 | FAttr
of string mcode
459 NotSequencible
| SequencibleAfterDots
of dots_whencode list
| Sequencible
461 and rule_elem
= base_rule_elem wrap
464 Seq
of rule_elem
(* { *) *
465 statement dots
* rule_elem
(* } *)
466 | IfThen
of rule_elem
(* header *) * statement
* end_info
467 | IfThenElse
of rule_elem
(* header *) * statement
*
468 rule_elem
(* else *) * statement
* end_info
469 | While
of rule_elem
(* header *) * statement
* end_info
470 | Do
of rule_elem
(* do *) * statement
* rule_elem
(* tail *)
471 | For
of rule_elem
(* header *) * statement
* end_info
472 | Iterator
of rule_elem
(* header *) * statement
* end_info
(*enditer*)
473 | Switch
of rule_elem
(* header *) * rule_elem
(* { *) *
474 statement
(*decl*) dots
* case_line list
* rule_elem
(*}*)
475 | Atomic
of rule_elem
476 | Disj
of statement dots list
477 | Nest
of string mcode
(* <.../<+... *) * statement dots
*
478 string mcode
(* ...>/...+> *) *
479 (statement dots
,statement
) whencode list
* multi
*
480 dots_whencode list
* dots_whencode list
481 | FunDecl
of rule_elem
(* header *) * rule_elem
(* { *) *
482 statement dots
* rule_elem
(* } *)
483 | Define
of rule_elem
(* header *) * statement dots
484 | Dots
of string mcode
(* ... *) *
485 (statement dots
,statement
) whencode list
*
486 dots_whencode list
* dots_whencode list
487 | Circles
of string mcode
(* ooo *) *
488 (statement dots
,statement
) whencode list
*
489 dots_whencode list
* dots_whencode list
490 | Stars
of string mcode
(* *** *) *
491 (statement dots
,statement
) whencode list
*
492 dots_whencode list
* dots_whencode list
493 | OptStm
of statement
494 | UniqueStm
of statement
496 and ('a
,'b
) whencode
=
499 | WhenModifier
of when_modifier
500 | WhenNotTrue
of rule_elem
501 | WhenNotFalse
of rule_elem
510 WParen
of rule_elem
* meta_name
(*pren_var*)
512 | Other_dots
of statement dots
514 and statement
= base_statement wrap
517 CaseLine
of rule_elem
(* case/default header *) * statement dots
518 | OptCase
of case_line
520 and case_line
= base_case_line wrap
523 Local
of inc_elem list
524 | NonLocal
of inc_elem list
532 | CODE
of statement dots
533 | FILEINFO
of string mcode
(* old file *) * string mcode
(* new file *)
534 | ERRORWORDS
of expression list
536 and top_level
= base_top_level wrap
539 CocciRulename
of string option * dependency
* string list
* string list
*
541 (* true if the whole thing is an expression *)
542 | GeneratedRulename
of string option * dependency
*
543 string list
* string list
* exists
* bool
544 (* true if the whole thing is an expression *)
545 | ScriptRulename
of string option (* name *) * string (* language *) *
547 | InitialScriptRulename
of string option (* name *) * string (* language *) *
549 | FinalScriptRulename
of string option (* name *) * string (* language *) *
552 and ruletype
= Normal
| Generated
555 CocciRule
of string (* name *) *
556 (dependency
* string list
(* dropped isos *) * exists
) *
557 top_level list
* bool list
(* true if generates an exp *) * ruletype
558 | ScriptRule
of string (* name *) *
559 string * dependency
*
560 (script_meta_name
* meta_name
* metavar
) list
*
561 meta_name list
(*script vars*) * string
562 | InitialScriptRule
of string (* name *) *
563 string * dependency
* string
564 | FinalScriptRule
of string (* name *) *
565 string * dependency
* string
567 and script_meta_name
= string option (*string*) * string option (*ast*)
570 Dep
of string (* rule applies for the current binding *)
571 | AntiDep
of string (* rule doesn't apply for the current binding *)
572 | EverDep
of string (* rule applies for some binding *)
573 | NeverDep
of string (* rule never applies for any binding *)
574 | AndDep
of dependency
* dependency
575 | OrDep
of dependency
* dependency
578 and rule_with_metavars
= metavar list
* rule
581 FullTypeTag
of fullType
582 | BaseTypeTag
of baseType
583 | StructUnionTag
of structUnion
586 | ExpressionTag
of expression
587 | ConstantTag
of constant
588 | UnaryOpTag
of unaryOp
589 | AssignOpTag
of assignOp
591 | BinaryOpTag
of binaryOp
592 | ArithOpTag
of arithOp
593 | LogicalOpTag
of logicalOp
594 | DeclarationTag
of declaration
595 | InitTag
of initialiser
596 | StorageTag
of storage
597 | IncFileTag
of inc_file
598 | Rule_elemTag
of rule_elem
599 | StatementTag
of statement
600 | CaseLineTag
of case_line
601 | ConstVolTag
of const_vol
602 | Token
of string * info
option
603 | Pragma
of added_string list
605 | ExprDotsTag
of expression dots
606 | ParamDotsTag
of parameterTypeDef dots
607 | StmtDotsTag
of statement dots
608 | DeclDotsTag
of declaration dots
610 | ParamTag
of parameterTypeDef
611 | SgrepStartTag
of string
612 | SgrepEndTag
of string
614 (* --------------------------------------------------------------------- *)
616 and exists
= Exists
| Forall
| Undetermined
618 (* --------------------------------------------------------------------- *)
620 val mkToken
: string -> anything
622 val undots
: 'a dots
-> 'a list
624 val lub_count
: count
-> count
-> count
626 (* --------------------------------------------------------------------- *)
628 val rewrap
: 'a wrap
-> 'b
-> 'b wrap
629 val rewrap_mcode
: 'a mcode
-> 'a
-> 'a mcode
630 val unwrap
: 'a wrap
-> 'a
631 val unwrap_mcode
: 'a mcode
-> 'a
632 val get_mcodekind
: 'a mcode
-> mcodekind
633 val get_line
: 'a wrap
-> line
634 val get_mcode_line
: 'a mcode
-> line
635 val get_mcode_col
: 'a mcode
-> int
636 val get_fvs
: 'a wrap
-> meta_name list
637 val get_wcfvs
: ('a wrap
,'b wrap
) whencode list
-> meta_name list
638 val set_fvs
: meta_name list
-> 'a wrap
-> 'a wrap
639 val get_mfvs
: 'a wrap
-> meta_name list
640 val set_mfvs
: meta_name list
-> 'a wrap
-> 'a wrap
641 val get_fresh
: 'a wrap
-> (meta_name
* seed
) list
642 val get_inherited
: 'a wrap
-> meta_name list
643 val get_saved
: 'a wrap
-> meta_name list
644 val get_dots_bef_aft
: statement
-> dots_bef_aft
645 val set_dots_bef_aft
: dots_bef_aft
-> statement
-> statement
646 val get_pos
: 'a wrap
-> meta_name mcode
option
647 val set_pos
: 'a wrap
-> meta_name mcode
option -> 'a wrap
648 val get_test_exp
: 'a wrap
-> bool
649 val set_test_exp
: expression
-> expression
650 val get_safe_decl
: 'a wrap
-> bool
651 val get_isos
: 'a wrap
-> (string*anything
) list
652 val set_isos
: 'a wrap
-> (string*anything
) list
-> 'a wrap
653 val get_pos_var
: 'a mcode
-> meta_pos
654 val set_pos_var
: meta_pos
-> 'a mcode
-> 'a mcode
655 val drop_pos
: 'a mcode
-> 'a mcode
657 val get_meta_name
: metavar
-> meta_name
659 val tag2c
: anything
-> string
663 val make_meta_rule_elem
:
664 string -> mcodekind
->
665 (meta_name list
* (meta_name
* seed
) list
* meta_name list
) ->
669 string -> mcodekind
->
670 (meta_name list
* (meta_name
* seed
) list
* meta_name list
) ->
673 val make_term
: 'a
-> 'a wrap
674 val make_mcode
: 'a
-> 'a mcode
676 val equal_pos
: fixpos
-> fixpos
-> bool