diff options
author | Stephane Glondu <steph@glondu.net> | 2012-01-12 16:04:54 +0100 |
---|---|---|
committer | Stephane Glondu <steph@glondu.net> | 2012-01-12 16:04:54 +0100 |
commit | 39efc41237ec906226a3a53d7396d51173495204 (patch) | |
tree | 87cd58d72d43469d2a2a0a127c1060d7c9e0206b /tools/compat5b.mlp | |
parent | 5fe4ac437bed43547b3695664974f492b55cb553 (diff) | |
parent | 97fefe1fcca363a1317e066e7f4b99b9c1e9987b (diff) |
Remove non-DFSG contentsupstream/8.4_beta+dfsg
Diffstat (limited to 'tools/compat5b.mlp')
-rw-r--r-- | tools/compat5b.mlp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tools/compat5b.mlp b/tools/compat5b.mlp new file mode 100644 index 00000000..cf8e5494 --- /dev/null +++ b/tools/compat5b.mlp @@ -0,0 +1,23 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* <O___,, * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999-2010 *) +(* \VV/ **************************************************************) +(* // * This file is distributed under the terms of the *) +(* * GNU Lesser General Public License Version 2.1 *) +(************************************************************************) + +(** Adding a bit of camlp5 syntax to camlp4 for compatibility: + - EXTEND ... becomes EXTEND Gram ... +*) + +open Camlp4.PreCast + +let rec my_token_filter = parser + | [< '(KEYWORD "EXTEND",_ as t); s >] -> + [< 't; '(UIDENT "Gram", Loc.ghost); my_token_filter s >] + | [< 'tokloc; s >] -> [< 'tokloc; my_token_filter s >] + | [< >] -> [< >] + +let _ = + Token.Filter.define_filter (Gram.get_filter()) + (fun prev strm -> prev (my_token_filter strm)) |