[antlr-interest] problem of using default parameters in parser rules
Ric Klaren
klaren at cs.utwente.nl
Mon Jun 2 02:12:08 PDT 2003
On Thu, May 22, 2003 at 04:58:41AM -0000, xdjicn wrote:
> I want to use default parameters in parser rules,for example:
>
> parseRule1 [int iPos = 0]
> :
> .....
>
> but the codes generated by ANTLR redefined the default parameter:
>
> //in .hpp
> void Parser::parserRule1 (int iPos = 0); //valid
>
> //in .cpp
> void Parser::parserRule1 (int iPos = 0)
> {
> ...
> }
> //which is invalid
> Does anybody know how to solve the problem?
No solution at the moment other than not using them. Ran into it myself as
well.
Ric
--
-----+++++*****************************************************+++++++++-------
---- Ric Klaren ----- j.klaren at utwente.nl ----- +31 53 4893722 ----
-----+++++*****************************************************+++++++++-------
Wit is cultured insolence. --- Aristotle
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list