Browse thread
[Caml-list] eliminating shift/reduce conflicts
-
Rafael 'Dido' Sevilla
- Benjamin Geer
-
Christian Lindig
- Rafael 'Dido' Sevilla
- Eckart Goehler
- Ken Rose
- Eric C. Cooper
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Rafael 'Dido' Sevilla <dido@i...> |
| Subject: | Re: [Caml-list] eliminating shift/reduce conflicts |
On Fri, Sep 12, 2003 at 10:40:47AM +0200, Christian Lindig wrote:
> I have tried to build a little grammar to reproduce your problem but
> failed. If you could post a small stand-alone grammar for OCamlyacc
> somebody might be able to help you.
Here then:
%token COLON COMMA FOO BAR BAZ
%start start
%type <unit>start
%%
start: bar {}
| baz {}
;
foo_list: FOO {}
| foo_list COMMA FOO {}
;
bar: foo_list COLON BAR {}
;
baz: FOO COLON BAZ {}
;
produces a shift/reduce on COLON.
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners