module Unsafe: sig end
Module for clearing grammars and entries. To be manipulated with
care, because: 1) reinitializing a grammar destroys all tokens
and there may have problems with the associated lexer if it has
a notion of keywords; 2) clearing an entry does not destroy the
tokens used only by itself.
-
Unsafe.reinit_gram g lex removes the tokens of the grammar
- and sets
lex as a new lexer for g. Warning: the lexer
- itself is not reinitialized.
-
Unsafe.clear_entry e removes all rules of the entry e.
val gram_reinit : Grammar.g -> Token.t Token.glexer -> unit
val clear_entry : 'a Grammar.Entry.e -> unit