Browse thread
camlp4 stream parser syntax
[
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: | Joel Reymont <joelr1@g...> |
| Subject: | Re: Re : [Caml-list] Re: camlp4 stream parser syntax |
Matthieu,
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 =
| BUY_TO_COVER
| SELL_SHORT
| 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
---
http://tinyco.de
Mac, C++, OCaml