Version française
Home     About     Download     Resources     Contact us    
Browse thread
Minor bug in camlyacc found
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: lindig@i...
Subject: Minor bug in camlyacc found

While building a Modula-2 parser using camlyacc I found a minor bug:

When you define non terminals like "then" "type" or "do" the resulting
code won't compile (syntax error). It seems that you shouldn't use
reserved words form caml-light for non terminals. Capitalizing these
non terminals helps. The chapter 'Overview of camlyacc' from the
reference should give an explicit hint on that.

parser.ml derived from parser.mly:

(* 307, file parser.mly, line 781 *)
; (fun () -> repr((ast__Empty) : 'do))
			          ^^ causes syntax error

Best regards,

Christian 

-----------------------------------------------------------------------
 Christian Lindig  				lindig@ips.cs.tu-bs.de
 Software Engineering Group -- TU Braunschweig -- D-38092 Braunschweig