|
From: Andreas L. <and...@st...> - 2007-12-04 08:16:55
|
Hi all,
my second problem with grammars in reuseware is the following.
I would like reuseware to be able to parse
#include <foo.h>
and my plan was to do it like this:
abstract:
PrPrIncludeGlobal = name:GlobalIncludeName;
GlobalIncludeName = value:S;
concrete:
PrPrIncludeGlobal ::= "#" "include" name;
GlobalIncludeName ::= value['<' (~('>'|'\\') | '\\' . )* '>'];
This works fine with the local include (#include "foo.h"), but it fails
for the global variant, as with these grammars produce an error during
the parsing of code, whenever there occurs a "<" that is not part of an
#include.
What is the problem?
Regards,
Andreas
|