Menu

#3 LOOKAHEAD() Problem

open
nobody
None
5
2003-12-09
2003-12-09
Anonymous
No

Hi!

I need som help om this.

(void) PARAM_LIST(bool bSpecialFunction)
{
(LOOKAHEAD({ bSpecialFunction }) <ID>
|
(TmpVal = EXPRESSION() (<SEMICOLON> EXPRESSION
() )*)?)
}

When I compile this with CppCC I end up with this code:

bool cppcc::LonParser::__la_PARAM_LIST_ () throw
(ScanException)
{
if (( bSpecialFunction )
) {

bSpecialFunction is used in __la_PARAM_LIST_ () where
it's not known and thus the parser does not compile. It's
also used in the PARAM_LIST (..) function but that is ok.
What am I doing wrong? I think I have done the same as
in Figure 19 in the docs.

Thanks in advance!
Torsten
torsten@cs.lth.se

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.