summaryrefslogtreecommitdiffstats
path: root/otherlibs/labltk/compiler/parser.mly
diff options
context:
space:
mode:
authorJun FURUSE / 古瀬 淳 <jun.furuse@gmail.com>2002-04-26 12:16:26 +0000
committerJun FURUSE / 古瀬 淳 <jun.furuse@gmail.com>2002-04-26 12:16:26 +0000
commitc54baa5bd6c2a6d8addbea0613998e89d8cf4167 (patch)
treefe926e50c17b7d67fcde37d2ef713bcc896a05e1 /otherlibs/labltk/compiler/parser.mly
parent82be04fd96c67653a27562c3f157674c99db84c2 (diff)
merge the branch mltk
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4745 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'otherlibs/labltk/compiler/parser.mly')
-rw-r--r--otherlibs/labltk/compiler/parser.mly25
1 files changed, 24 insertions, 1 deletions
diff --git a/otherlibs/labltk/compiler/parser.mly b/otherlibs/labltk/compiler/parser.mly
index a22f2f4ab..d338a037c 100644
--- a/otherlibs/labltk/compiler/parser.mly
+++ b/otherlibs/labltk/compiler/parser.mly
@@ -1,3 +1,19 @@
+/***********************************************************************/
+/* */
+/* MLTk, Tcl/Tk interface of Objective Caml */
+/* */
+/* Francois Rouaix, Francois Pessaux, Jun Furuse and Pierre Weis */
+/* projet Cristal, INRIA Rocquencourt */
+/* Jacques Garrigue, Kyoto University RIMS */
+/* */
+/* Copyright 2002 Institut National de Recherche en Informatique et */
+/* en Automatique and Kyoto University. 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 file ../LICENSE. */
+/* */
+/***********************************************************************/
+
/* $Id$ */
%{
@@ -21,6 +37,7 @@ open Tables
%token RBRACKET /* "]" */
%token LBRACE /* "{" */
%token RBRACE /* "}" */
+%token SLASH /* "/" */
%token TYINT /* "int" */
%token TYFLOAT /* "float" */
@@ -66,9 +83,15 @@ Type0 :
{ UserDefined $1 }
;
+/* Camltk/Labltk types */
+Type0_5:
+ | Type0 SLASH Type0 { if !Flags.camltk then $1 else $3 }
+ | Type0 { $1 }
+;
+
/* with subtypes */
Type1 :
- Type0
+ Type0_5
{ $1 }
| TypeName LPAREN IDENT RPAREN
{ Subtype ($1, $3) }