2 * Copyright 2005-2010, Ecole des Mines de Nantes, University of Copenhagen
3 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller, Nicolas Palix
4 * This file is part of Coccinelle.
6 * Coccinelle is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, according to version 2 of the License.
10 * Coccinelle is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with Coccinelle. If not, see <http://www.gnu.org/licenses/>.
18 * The authors reserve the right to distribute this or future versions of
19 * Coccinelle under other licenses.
24 * Copyright 2005-2010, Ecole des Mines de Nantes, University of Copenhagen
25 * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller, Nicolas Palix
26 * This file is part of Coccinelle.
28 * Coccinelle is free software: you can redistribute it and/or modify
29 * it under the terms of the GNU General Public License as published by
30 * the Free Software Foundation, according to version 2 of the License.
32 * Coccinelle is distributed in the hope that it will be useful,
33 * but WITHOUT ANY WARRANTY; without even the implied warranty of
34 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
35 * GNU General Public License for more details.
37 * You should have received a copy of the GNU General Public License
38 * along with Coccinelle. If not, see <http://www.gnu.org/licenses/>.
40 * The authors reserve the right to distribute this or future versions of
41 * Coccinelle under other licenses.
45 (* --------------------------------------------------------------------- *)
48 type added_string
= Noindent
of string | Indent
of string
50 type info
= { line
: int; column
: int;
51 strbef
: (added_string
* int (* line *) * int (* col *)) list
;
52 straft
: (added_string
* int (* line *) * int (* col *)) list
}
54 type meta_name
= string * string
58 free_vars
: meta_name list
; (*free vars*)
59 minus_free_vars
: meta_name list
; (*minus free vars*)
60 fresh_vars
: (meta_name
* seed
) list
; (*fresh vars*)
61 inherited
: meta_name list
; (*inherited vars*)
62 saved_witness
: meta_name list
; (*witness vars*)
63 bef_aft
: dots_bef_aft
;
64 pos_info
: meta_name mcode
option; (* pos info, try not to duplicate *)
65 true_if_test_exp
: bool;(* true if "test_exp from iso", only for exprs *)
66 (* isos relevant to the term; ultimately only used for rule_elems *)
67 iso_info
: (string*anything
) list
}
70 BEFORE
of 'a list list
* count
71 | AFTER
of 'a list list
* count
72 | BEFOREAFTER
of 'a list list
* 'a list list
* count
75 and 'a mcode
= 'a
* info
* mcodekind
* meta_pos
(* pos variable *)
76 (* pos is an offset indicating where in the C code the mcodekind has an
79 MINUS
of pos
* int list
* int * anything list list
80 | CONTEXT
of pos
* anything befaft
82 and count
= ONE
(* + *) | MANY
(* ++ *)
84 Real
of int (* charpos *) | Virt
of int * int (* charpos + offset *)
85 and pos
= NoPos
| DontCarePos
| FixPos
of (fixpos
* fixpos
)
89 | AddingBetweenDots
of statement
* int (*index of let var*)
90 | DroppingBetweenDots
of statement
* int (*index of let var*)
92 and inherited
= Type_cocci.inherited
93 and keep_binding
= Type_cocci.keep_binding
94 and multi
= bool (*true if a nest is one or more, false if it is zero or more*)
97 meta_name list
(*free vars*) * (meta_name
* seed
) list
(*fresh*) *
98 meta_name list
(*inherited vars*) * mcodekind
100 (* --------------------------------------------------------------------- *)
103 and arity
= UNIQUE
| OPT
| MULTI
| NONE
106 MetaIdDecl
of arity
* meta_name
(* name *)
107 | MetaFreshIdDecl
of meta_name
(* name *) * seed
(* seed *)
108 | MetaTypeDecl
of arity
* meta_name
(* name *)
109 | MetaInitDecl
of arity
* meta_name
(* name *)
110 | MetaListlenDecl
of meta_name
(* name *)
111 | MetaParamDecl
of arity
* meta_name
(* name *)
112 | MetaParamListDecl
of arity
* meta_name
(*name*) * meta_name
option (*len*)
114 arity
* meta_name
(* name *) * Type_cocci.typeC list
option
115 | MetaErrDecl
of arity
* meta_name
(* name *)
117 arity
* meta_name
(* name *) * Type_cocci.typeC list
option
119 arity
* meta_name
(* name *) * Type_cocci.typeC list
option
120 | MetaLocalIdExpDecl
of
121 arity
* meta_name
(* name *) * Type_cocci.typeC list
option
122 | MetaExpListDecl
of arity
* meta_name
(*name*) * meta_name
option (*len*)
123 | MetaStmDecl
of arity
* meta_name
(* name *)
124 | MetaStmListDecl
of arity
* meta_name
(* name *)
125 | MetaFuncDecl
of arity
* meta_name
(* name *)
126 | MetaLocalFuncDecl
of arity
* meta_name
(* name *)
127 | MetaPosDecl
of arity
* meta_name
(* name *)
128 | MetaDeclarerDecl
of arity
* meta_name
(* name *)
129 | MetaIteratorDecl
of arity
* meta_name
(* name *)
131 and seed
= NoVal
| StringSeed
of string | ListSeed
of seed_elem list
132 and seed_elem
= SeedString
of string | SeedId
of meta_name
134 (* --------------------------------------------------------------------- *)
135 (* --------------------------------------------------------------------- *)
143 and 'a dots
= 'a base_dots wrap
145 (* --------------------------------------------------------------------- *)
150 | MetaId
of meta_name mcode
* idconstraint
* keep_binding
* inherited
151 | MetaFunc
of meta_name mcode
* idconstraint
* keep_binding
* inherited
152 | MetaLocalFunc
of meta_name mcode
* idconstraint
* keep_binding
* inherited
155 | UniqueIdent
of ident
157 and ident
= base_ident wrap
159 (* --------------------------------------------------------------------- *)
162 and base_expression
=
164 | Constant
of constant mcode
165 | FunCall
of expression
* string mcode
(* ( *) *
166 expression dots
* string mcode
(* ) *)
167 | Assignment
of expression
* assignOp mcode
* expression
* bool
168 | CondExpr
of expression
* string mcode
(* ? *) * expression
option *
169 string mcode
(* : *) * expression
170 | Postfix
of expression
* fixOp mcode
171 | Infix
of expression
* fixOp mcode
172 | Unary
of expression
* unaryOp mcode
173 | Binary
of expression
* binaryOp mcode
* expression
174 | Nested
of expression
* binaryOp mcode
* expression
175 | ArrayAccess
of expression
* string mcode
(* [ *) * expression
*
177 | RecordAccess
of expression
* string mcode
(* . *) * ident
178 | RecordPtAccess
of expression
* string mcode
(* -> *) * ident
179 | Cast
of string mcode
(* ( *) * fullType
* string mcode
(* ) *) *
182 | SizeOfExpr
of string mcode
(* sizeof *) * expression
183 | SizeOfType
of string mcode
(* sizeof *) * string mcode
(* ( *) *
184 fullType
* string mcode
(* ) *)
185 | TypeExp
of fullType
187 | Paren
of string mcode
(* ( *) * expression
*
190 | MetaErr
of meta_name mcode
* constraints
* keep_binding
*
192 | MetaExpr
of meta_name mcode
* constraints
* keep_binding
*
193 Type_cocci.typeC list
option * form
* inherited
194 | MetaExprList
of meta_name mcode
* listlen
option *
195 keep_binding
* inherited
(* only in arg lists *)
197 | EComma
of string mcode
(* only in arg lists *)
199 | DisjExpr
of expression list
200 | NestExpr
of string mcode
(* <.../<+... *) *
202 string mcode
(* ...>/...+> *) *
203 expression
option * multi
205 (* can appear in arg lists, and also inside Nest, as in:
206 if(< ... X ... Y ...>)
207 In the following, the expression option is the WHEN *)
208 | Edots
of string mcode
(* ... *) * expression
option
209 | Ecircles
of string mcode
(* ooo *) * expression
option
210 | Estars
of string mcode
(* *** *) * expression
option
212 | OptExp
of expression
213 | UniqueExp
of expression
217 | NotIdCstrt
of reconstraint
218 | NotExpCstrt
of expression list
219 | SubExpCstrt
of meta_name list
221 (* Constraints on Meta-* Identifiers, Functions *)
224 | IdNegIdSet
of string list
* meta_name list
225 | IdRegExpConstraint
of reconstraint
228 | IdRegExp
of string * Str.regexp
229 | IdNotRegExp
of string * Str.regexp
231 and form
= ANY
| ID
| LocalID
| CONST
(* form for MetaExp *)
233 and expression
= base_expression wrap
235 and listlen
= meta_name mcode
* keep_binding
* inherited
237 and unaryOp
= GetRef
| DeRef
| UnPlus
| UnMinus
| Tilde
| Not
238 and assignOp
= SimpleAssign
| OpAssign
of arithOp
239 and fixOp
= Dec
| Inc
241 and binaryOp
= Arith
of arithOp
| Logical
of logicalOp
243 Plus
| Minus
| Mul
| Div
| Mod
| DecLeft
| DecRight
| And
| Or
| Xor
244 and logicalOp
= Inf
| Sup
| InfEq
| SupEq
| Eq
| NotEq
| AndLog
| OrLog
252 (* --------------------------------------------------------------------- *)
256 Type
of const_vol mcode
option * typeC
257 | DisjType
of fullType list
(* only after iso *)
258 | OptType
of fullType
259 | UniqueType
of fullType
262 BaseType
of baseType
* string mcode list
(* Yoann style *)
263 | SignedT
of sign mcode
* typeC
option
264 | Pointer
of fullType
* string mcode
(* * *)
265 | FunctionPointer
of fullType
*
266 string mcode
(* ( *)*string mcode
(* * *)*string mcode
(* ) *)*
267 string mcode
(* ( *)*parameter_list
*string mcode
(* ) *)
268 | FunctionType
of bool (* true if all minus for dropping return type *) *
270 string mcode
(* ( *) * parameter_list
*
272 | Array
of fullType
* string mcode
(* [ *) *
273 expression
option * string mcode
(* ] *)
274 | EnumName
of string mcode
(*enum*) * ident
(* name *)
275 | StructUnionName
of structUnion mcode
* ident
option (* name *)
276 | StructUnionDef
of fullType
(* either StructUnionName or metavar *) *
277 string mcode
(* { *) * declaration dots
* string mcode
(* } *)
278 | TypeName
of string mcode
280 | MetaType
of meta_name mcode
* keep_binding
* inherited
282 and fullType
= base_fullType wrap
283 and typeC
= base_typeC wrap
285 and baseType
= VoidType
| CharType
| ShortType
| IntType
| DoubleType
286 | FloatType
| LongType
| LongLongType
288 and structUnion
= Struct
| Union
290 and sign
= Signed
| Unsigned
292 and const_vol
= Const
| Volatile
294 (* --------------------------------------------------------------------- *)
295 (* Variable declaration *)
296 (* Even if the Cocci program specifies a list of declarations, they are
297 split out into multiple declarations of a single variable each. *)
299 and base_declaration
=
300 Init
of storage mcode
option * fullType
* ident
* string mcode
(*=*) *
301 initialiser
* string mcode
(*;*)
302 | UnInit
of storage mcode
option * fullType
* ident
* string mcode
(* ; *)
303 | TyDecl
of fullType
* string mcode
(* ; *)
304 | MacroDecl
of ident
(* name *) * string mcode
(* ( *) *
305 expression dots
* string mcode
(* ) *) * string mcode
(* ; *)
306 | Typedef
of string mcode
(*typedef*) * fullType
* typeC
* string mcode
(*;*)
307 | DisjDecl
of declaration list
308 | Ddots
of string mcode
(* ... *) * declaration
option (* whencode *)
310 | MetaDecl
of meta_name mcode
* keep_binding
* inherited
312 | OptDecl
of declaration
313 | UniqueDecl
of declaration
315 and declaration
= base_declaration wrap
317 (* --------------------------------------------------------------------- *)
320 and base_initialiser
=
321 MetaInit
of meta_name mcode
* keep_binding
* inherited
322 | InitExpr
of expression
323 | InitList
of string mcode
(*{*) * initialiser list
* string mcode
(*}*) *
324 initialiser list
(* whencode: elements that shouldn't appear in init *)
326 designator list
(* name *) * string mcode
(*=*) *
327 initialiser
(* gccext: *)
328 | InitGccName
of ident
(* name *) * string mcode
(*:*) *
330 | IComma
of string mcode
(* , *)
331 | OptIni
of initialiser
332 | UniqueIni
of initialiser
335 DesignatorField
of string mcode
(* . *) * ident
336 | DesignatorIndex
of string mcode
(* [ *) * expression
* string mcode
(* ] *)
338 string mcode
(* [ *) * expression
* string mcode
(* ... *) *
339 expression
* string mcode
(* ] *)
341 and initialiser
= base_initialiser wrap
343 (* --------------------------------------------------------------------- *)
346 and base_parameterTypeDef
=
347 VoidParam
of fullType
348 | Param
of fullType
* ident
option
350 | MetaParam
of meta_name mcode
* keep_binding
* inherited
351 | MetaParamList
of meta_name mcode
* listlen
option * keep_binding
*
354 | PComma
of string mcode
356 | Pdots
of string mcode
(* ... *)
357 | Pcircles
of string mcode
(* ooo *)
359 | OptParam
of parameterTypeDef
360 | UniqueParam
of parameterTypeDef
362 and parameterTypeDef
= base_parameterTypeDef wrap
364 and parameter_list
= parameterTypeDef dots
366 (* --------------------------------------------------------------------- *)
367 (* #define Parameters *)
369 and base_define_param
=
371 | DPComma
of string mcode
372 | DPdots
of string mcode
(* ... *)
373 | DPcircles
of string mcode
(* ooo *)
374 | OptDParam
of define_param
375 | UniqueDParam
of define_param
377 and define_param
= base_define_param wrap
379 and base_define_parameters
=
381 | DParams
of string mcode
(*( *) * define_param dots
* string mcode
(* )*)
383 and define_parameters
= base_define_parameters wrap
385 (* --------------------------------------------------------------------- *)
388 (* PER = keep bindings separate, ANY = collect them *)
389 and meta_collect
= PER
| ALL
392 MetaPos
of meta_name mcode
* meta_name list
*
393 meta_collect
* keep_binding
* inherited
396 (* --------------------------------------------------------------------- *)
397 (* Function declaration *)
399 and storage
= Static
| Auto
| Register
| Extern
401 (* --------------------------------------------------------------------- *)
405 FunHeader
of mcodekind
(* before the function header *) *
406 bool (* true if all minus, for dropping static, etc *) *
407 fninfo list
* ident
(* name *) *
408 string mcode
(* ( *) * parameter_list
*
410 | Decl
of mcodekind
(* before the decl *) *
411 bool (* true if all minus *) * declaration
413 | SeqStart
of string mcode
(* { *)
414 | SeqEnd
of string mcode
(* } *)
416 | ExprStatement
of expression
* string mcode
(*;*)
417 | IfHeader
of string mcode
(* if *) * string mcode
(* ( *) *
418 expression
* string mcode
(* ) *)
419 | Else
of string mcode
(* else *)
420 | WhileHeader
of string mcode
(* while *) * string mcode
(* ( *) *
421 expression
* string mcode
(* ) *)
422 | DoHeader
of string mcode
(* do *)
423 | WhileTail
of string mcode
(* while *) * string mcode
(* ( *) *
424 expression
* string mcode
(* ) *) *
426 | ForHeader
of string mcode
(* for *) * string mcode
(* ( *) *
427 expression
option * string mcode
(*;*) *
428 expression
option * string mcode
(*;*) *
429 expression
option * string mcode
(* ) *)
430 | IteratorHeader
of ident
(* name *) * string mcode
(* ( *) *
431 expression dots
* string mcode
(* ) *)
432 | SwitchHeader
of string mcode
(* switch *) * string mcode
(* ( *) *
433 expression
* string mcode
(* ) *)
434 | Break
of string mcode
(* break *) * string mcode
(* ; *)
435 | Continue
of string mcode
(* continue *) * string mcode
(* ; *)
436 | Label
of ident
* string mcode
(* : *)
437 | Goto
of string mcode
(* goto *) * ident
* string mcode
(* ; *)
438 | Return
of string mcode
(* return *) * string mcode
(* ; *)
439 | ReturnExpr
of string mcode
(* return *) * expression
*
442 | MetaRuleElem
of meta_name mcode
* keep_binding
* inherited
443 | MetaStmt
of meta_name mcode
* keep_binding
* metaStmtInfo
*
445 | MetaStmtList
of meta_name mcode
* keep_binding
* inherited
448 | TopExp
of expression
(* for macros body *)
449 | Ty
of fullType
(* only at top level *)
450 | TopInit
of initialiser
(* only at top level *)
451 | Include
of string mcode
(*#include*) * inc_file mcode
(*file *)
452 | DefineHeader
of string mcode
(* #define *) * ident
(* name *) *
453 define_parameters
(*params*)
454 | Case
of string mcode
(* case *) * expression
* string mcode
(*:*)
455 | Default
of string mcode
(* default *) * string mcode
(*:*)
456 | DisjRuleElem
of rule_elem list
459 FStorage
of storage mcode
461 | FInline
of string mcode
462 | FAttr
of string mcode
465 NotSequencible
| SequencibleAfterDots
of dots_whencode list
| Sequencible
467 and rule_elem
= base_rule_elem wrap
470 Seq
of rule_elem
(* { *) *
471 statement dots
* rule_elem
(* } *)
472 | IfThen
of rule_elem
(* header *) * statement
* end_info
473 | IfThenElse
of rule_elem
(* header *) * statement
*
474 rule_elem
(* else *) * statement
* end_info
475 | While
of rule_elem
(* header *) * statement
* end_info
476 | Do
of rule_elem
(* do *) * statement
* rule_elem
(* tail *)
477 | For
of rule_elem
(* header *) * statement
* end_info
478 | Iterator
of rule_elem
(* header *) * statement
* end_info
(*enditer*)
479 | Switch
of rule_elem
(* header *) * rule_elem
(* { *) *
480 statement
(*decl*) dots
* case_line list
* rule_elem
(*}*)
481 | Atomic
of rule_elem
482 | Disj
of statement dots list
483 | Nest
of string mcode
(* <.../<+... *) * statement dots
*
484 string mcode
(* ...>/...+> *) *
485 (statement dots
,statement
) whencode list
* multi
*
486 dots_whencode list
* dots_whencode list
487 | FunDecl
of rule_elem
(* header *) * rule_elem
(* { *) *
488 statement dots
* rule_elem
(* } *)
489 | Define
of rule_elem
(* header *) * statement dots
490 | Dots
of string mcode
(* ... *) *
491 (statement dots
,statement
) whencode list
*
492 dots_whencode list
* dots_whencode list
493 | Circles
of string mcode
(* ooo *) *
494 (statement dots
,statement
) whencode list
*
495 dots_whencode list
* dots_whencode list
496 | Stars
of string mcode
(* *** *) *
497 (statement dots
,statement
) whencode list
*
498 dots_whencode list
* dots_whencode list
499 | OptStm
of statement
500 | UniqueStm
of statement
502 and ('a
,'b
) whencode
=
505 | WhenModifier
of when_modifier
506 | WhenNotTrue
of rule_elem
507 | WhenNotFalse
of rule_elem
516 WParen
of rule_elem
* meta_name
(*pren_var*)
518 | Other_dots
of statement dots
520 and statement
= base_statement wrap
523 CaseLine
of rule_elem
(* case/default header *) * statement dots
524 | OptCase
of case_line
526 and case_line
= base_case_line wrap
529 Local
of inc_elem list
530 | NonLocal
of inc_elem list
538 | CODE
of statement dots
539 | FILEINFO
of string mcode
(* old file *) * string mcode
(* new file *)
540 | ERRORWORDS
of expression list
542 and top_level
= base_top_level wrap
545 CocciRulename
of string option * dependency
* string list
* string list
*
547 (* true if the whole thing is an expression *)
548 | GeneratedRulename
of string option * dependency
*
549 string list
* string list
* exists
* bool
550 (* true if the whole thing is an expression *)
551 | ScriptRulename
of string * dependency
552 | InitialScriptRulename
of string * dependency
553 | FinalScriptRulename
of string * dependency
555 and ruletype
= Normal
| Generated
558 CocciRule
of string (* name *) *
559 (dependency
* string list
(* dropped isos *) * exists
) *
560 top_level list
* bool list
(* true if generates an exp *) * ruletype
561 | ScriptRule
of string * dependency
* (string * meta_name
) list
* string
562 | InitialScriptRule
of string * dependency
* string
563 | FinalScriptRule
of string * dependency
* string
566 Dep
of string (* rule applies for the current binding *)
567 | AntiDep
of string (* rule doesn't apply for the current binding *)
568 | EverDep
of string (* rule applies for some binding *)
569 | NeverDep
of string (* rule never applies for any binding *)
570 | AndDep
of dependency
* dependency
571 | OrDep
of dependency
* dependency
574 and rule_with_metavars
= metavar list
* rule
577 FullTypeTag
of fullType
578 | BaseTypeTag
of baseType
579 | StructUnionTag
of structUnion
582 | ExpressionTag
of expression
583 | ConstantTag
of constant
584 | UnaryOpTag
of unaryOp
585 | AssignOpTag
of assignOp
587 | BinaryOpTag
of binaryOp
588 | ArithOpTag
of arithOp
589 | LogicalOpTag
of logicalOp
590 | DeclarationTag
of declaration
591 | InitTag
of initialiser
592 | StorageTag
of storage
593 | IncFileTag
of inc_file
594 | Rule_elemTag
of rule_elem
595 | StatementTag
of statement
596 | CaseLineTag
of case_line
597 | ConstVolTag
of const_vol
598 | Token
of string * info
option
599 | Pragma
of added_string list
601 | ExprDotsTag
of expression dots
602 | ParamDotsTag
of parameterTypeDef dots
603 | StmtDotsTag
of statement dots
604 | DeclDotsTag
of declaration dots
606 | ParamTag
of parameterTypeDef
607 | SgrepStartTag
of string
608 | SgrepEndTag
of string
610 (* --------------------------------------------------------------------- *)
612 and exists
= Exists
| Forall
| Undetermined
614 (* --------------------------------------------------------------------- *)
616 val mkToken
: string -> anything
618 val undots
: 'a dots
-> 'a list
620 val lub_count
: count
-> count
-> count
622 (* --------------------------------------------------------------------- *)
624 val rewrap
: 'a wrap
-> 'b
-> 'b wrap
625 val rewrap_mcode
: 'a mcode
-> 'a
-> 'a mcode
626 val unwrap
: 'a wrap
-> 'a
627 val unwrap_mcode
: 'a mcode
-> 'a
628 val get_mcodekind
: 'a mcode
-> mcodekind
629 val get_line
: 'a wrap
-> line
630 val get_mcode_line
: 'a mcode
-> line
631 val get_mcode_col
: 'a mcode
-> int
632 val get_fvs
: 'a wrap
-> meta_name list
633 val get_wcfvs
: ('a wrap
,'b wrap
) whencode list
-> meta_name list
634 val set_fvs
: meta_name list
-> 'a wrap
-> 'a wrap
635 val get_mfvs
: 'a wrap
-> meta_name list
636 val set_mfvs
: meta_name list
-> 'a wrap
-> 'a wrap
637 val get_fresh
: 'a wrap
-> (meta_name
* seed
) list
638 val get_inherited
: 'a wrap
-> meta_name list
639 val get_saved
: 'a wrap
-> meta_name list
640 val get_dots_bef_aft
: statement
-> dots_bef_aft
641 val set_dots_bef_aft
: dots_bef_aft
-> statement
-> statement
642 val get_pos
: 'a wrap
-> meta_name mcode
option
643 val set_pos
: 'a wrap
-> meta_name mcode
option -> 'a wrap
644 val get_test_exp
: 'a wrap
-> bool
645 val set_test_exp
: expression
-> expression
646 val get_isos
: 'a wrap
-> (string*anything
) list
647 val set_isos
: 'a wrap
-> (string*anything
) list
-> 'a wrap
648 val get_pos_var
: 'a mcode
-> meta_pos
649 val set_pos_var
: meta_pos
-> 'a mcode
-> 'a mcode
650 val drop_pos
: 'a mcode
-> 'a mcode
652 val get_meta_name
: metavar
-> meta_name
654 val tag2c
: anything
-> string
658 val make_meta_rule_elem
:
659 string -> mcodekind
->
660 (meta_name list
* (meta_name
* seed
) list
* meta_name list
) ->
664 string -> mcodekind
->
665 (meta_name list
* (meta_name
* seed
) list
* meta_name list
) ->
668 val make_term
: 'a
-> 'a wrap
669 val make_mcode
: 'a
-> 'a mcode
671 val equal_pos
: fixpos
-> fixpos
-> bool