Browse thread
camlp4 grammar and LIST1
- Joel Reymont
[
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: | camlp4 grammar and LIST1 |
In the following bit of camlp4 grammar
inputDeclarations:
[
[ "Input"; ":";
l = LIST1 inputDeclaration SEP "," -> l
]
];
Is it always necessary to write [ x = inputDeclaration -> x ] instead
of just inputDeclaration?
I'm trying to debug the type of each rule and I'm often getting
complaints about 'unit list' being used instead of just 'statement'.
By the same token, can I shorten the gramar below to just
[ openStatement | closedStatement ]?
statement: [ [ s = openStatement -> s | s = closedStatement -> s ] ];
How do you folks debug grammar rule types?
Thanks, Joel
---
http://tinyco.de
--- Mac & iPhone