diff options
| author | Jérémie Dimino <jeremie@dimino.org> | 2013-11-23 09:11:19 +0000 |
|---|---|---|
| committer | Jérémie Dimino <jeremie@dimino.org> | 2013-11-23 09:11:19 +0000 |
| commit | b30b541b9be7c48f9b0126c7fbbb88503e32b3c0 (patch) | |
| tree | 47e7f11440fc4be2cf1014abd371f915f885d06d /camlp4/examples/lambda_parser.ml | |
| parent | 7335d5f68f8cc1f85c5e2134f41a46de6546a376 (diff) | |
| parent | 5d917633adeee07f19848d737a6825bd7a462cf8 (diff) | |
| download | ocaml-b30b541b9be7c48f9b0126c7fbbb88503e32b3c0.tar.gz | |
Remove camlp4.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14310 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'camlp4/examples/lambda_parser.ml')
| -rw-r--r-- | camlp4/examples/lambda_parser.ml | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/camlp4/examples/lambda_parser.ml b/camlp4/examples/lambda_parser.ml deleted file mode 100644 index 82ab3b8b59..0000000000 --- a/camlp4/examples/lambda_parser.ml +++ /dev/null @@ -1,48 +0,0 @@ -(****************************************************************************) -(* *) -(* OCaml *) -(* *) -(* INRIA Rocquencourt *) -(* *) -(* Copyright 2008 Institut National de Recherche en Informatique et *) -(* en Automatique. All rights reserved. This file is distributed under *) -(* the terms of the GNU Library General Public License, with the special *) -(* exception on linking described in LICENSE at the top of the OCaml *) -(* source tree. *) -(* *) -(****************************************************************************) - -(* Please keep me in sync with brion.inria.fr/gallium/index.php/Lambda_calculus_quotations *) - -type term = - | Lam of var * term - | App of term * term - | Int of int - | Var of var -and var = string - -module LambdaGram = Camlp4.PreCast.MakeGram(Camlp4.PreCast.Lexer);; -module Loc = Camlp4.PreCast.Loc;; (* should not be necessary when camlp4 will be fixed *) -open Camlp4.Sig;; (* from tokens *) -let term = LambdaGram.Entry.mk "term";; -let term_eoi = LambdaGram.Entry.mk "lambda term quotation";; - -EXTEND LambdaGram - GLOBAL: term term_eoi; - term: - [ "top" - [ "fun"; v = var; "->"; t = term -> Lam(v, t) ] - | "app" - [ t1 = SELF; t2 = SELF -> App(t1, t2) ] - | "simple" - [ v = var -> Var(v) - | `INT(i, _) -> Int(i) - | "("; t = term; ")" -> t ] - ]; - var: - [[ `LIDENT v -> v ]]; - term_eoi: - [[ t = term; `EOI -> t ]]; -END;; - -let lambda_parser = LambdaGram.parse_string term_eoi;; |
