Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
camlp4 stream parser syntax
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Joel Reymont <joelr1@g...>
Subject: Re: Re : [Caml-list] Re: camlp4 stream parser syntax

Is the camlp4 grammar parser case-insensitive?

Will both Delay and delay be accepted in the actionDelay rule?

	actionDelay: [ [ "delay"; expression ->
		Asthelper.failwith (convert_loc _loc)
			"RVC-CAL does not permit the use of delay." ] ];

Also, I noticed that your lexer has a really small token set, i.e.

type token =
     | KEYWORD of string
     | SYMBOL  of string
     | IDENT   of string
     | INT     of int * string
     | FLOAT   of float * string
     | CHAR    of char * string
     | STRING  of string * string
     | EOI

My custom lexer, on the other hand, has a HUGE token set, e.g.

   type token =
     | AT_ENTRY
     | RANGE
     | YELLOW
     | WHITE
     | WHILE
     | UNTIL

This is partly because I have a very large set of keywords.

Do I correctly understand that I do not need all the keywords since I  
can match them in the camlp4 grammar as strings like "BuyToCover",  
"SellShort", etc.?

	Thanks, Joel

Mac, C++, OCaml