Fw: Parser error from semantic actions
Hi, How can I inform an error from a semantic action? Consider the following code: rule = IDENTIFIER[ callback_a( m_varBinder, &VarBinder::bind ) ]; callback_a is an actor allowing member calls in semantic actions. VarBinder::bind receives an identifier and try to locate it in an external symbol table. If bind fails, I like to inform a parser error back to Spirit. How can I do that? Pointers to the relevant parts in the documentation are welcome. Hermann [My apologies for sending a Spirit specific question to boost-users lists. However, I getting an administrative error from the sourceforge mail server]
Hermann Oliveira Rodrigues wrote:
How can I inform an error from a semantic action? Consider the following code:
rule = IDENTIFIER[ callback_a( m_varBinder, &VarBinder::bind ) ];
callback_a is an actor allowing member calls in semantic actions. VarBinder::bind receives an identifier and try to locate it in an external symbol table. If bind fails, I like to inform a parser error back to Spirit. How can I do that? Pointers to the relevant parts in the documentation are welcome.
Have you had a look at the error handling parsers (see here: http://tinyurl.com/5z2y6)? Regards Hartmut
Hermann Oliveira Rodrigues wrote:
Hi,
How can I inform an error from a semantic action? Consider the following code:
rule = IDENTIFIER[ callback_a( m_varBinder, &VarBinder::bind ) ];
callback_a is an actor allowing member calls in semantic actions. VarBinder::bind receives an identifier and try to locate it in an external symbol table. If bind fails, I like to inform a parser error back to Spirit. How can I do that? Pointers to the relevant parts in the documentation are welcome.
Hermann
[My apologies for sending a Spirit specific question to boost-users lists. However, I getting an administrative error from the sourceforge mail server]
Yeah, SF had the problem yesterday. Now it's been fixed. Please post it there. Regards, -- Joel de Guzman http://www.boost-consulting.com http://spirit.sf.net
participants (3)
-
Hartmut Kaiser
-
Hermann Oliveira Rodrigues
-
Joel de Guzman