[Maude-help] Re: Parsing question (answer + new question)
duran at lcc.uma.es
Wed Nov 2 05:44:23 CST 2005
I'm late to your first email. It's good that you managed to get your own
> I copied the "special" declarations used in EXP above from
> prelude.maude, hoping that they might produce the parsing behavior I
> was looking for, and I was rewarded. However, now, my question
> becomes: what is the link between these specials and the way Maude
> parses integers, floats, and strings?
They are handled like tokens with such a special structure. Such
information is used both for parsing and for typing the resulting parse.
> More generally, does there exist any documentation of these special
> attributes, id-hook, op-hook, term-hook, etc.?
No published documentation on them. They are built-ins, system
dependent, they are just hooks to the C++ implementations. The special
attributes allow you to use them in the way you have done, or even
changing the operators (you can rename built-in operators).
> Am I creating some possible problems by using these features to parse
> literal constants in my applications?
There should be no problem. In fact, you may be interested in using your
own tokens. Take a look to the section on the manual on Tokens, Bubbles,
More information about the Maude-help