Closed MurakamiKennzo closed 3 years ago
The first non-terminal (aka category) is the default entrypoint that is used by the generated test program (Test.hs
). However, the generated Par.y
also has the other entrypoints.
If you want to parse either Exp
or Type
without knowing which one you get, you need to define a new category and use this as entry point, e.g.:
EPExp. EP ::= Exp;
EPType. EP ::= Type;
The first non-terminal (aka category) is the default entrypoint that is used by the generated test program (
Test.hs
). However, the generatedPar.y
also has the other entrypoints.If you want to parse either
Exp
orType
without knowing which one you get, you need to define a new category and use this as entry point, e.g.:EPExp. EP ::= Exp; EPType. EP ::= Type;
Got it, I find here:
Thanks!
Hi, I just test like this:
complier to Haskell and make:
but when I test with the text:
it outputs as:
and when I changed the order of entrypoints:
it works well, but the Exp not parsed.
so currently the multiple entrypoints isn't support for Haskell?(but the docs said)
Here are some info: