|
From: Andreas L. <and...@st...> - 2007-11-14 14:01:27
|
Hi there,
I am trying to get reuseware to understand (at least partial) C code.
Unfortunatly I experience strange behaviour: reuseware accepts this:
*dummy{};
int main( int argc, char *args[] ) {
int index;
int array[100];
for(index = 0; index < 100; index++) {
array[index] = 0;
}
return 0;
}
But without the leading dummy line, the code raises errors. Strange is,
that just regenerating language plugins and text parsers leads to
different errors here. Anyway, all the errors are similar to this:
state 0 (decision=75) no viable alt; token=[@5,10:12='int',<97>,1:10]
or
mismatched token: [@5,10:12='int',<97>,1:10]; expecting ')'
And they indicate, that function definitions or array declarations...
are not recognized.
So my question is: Why does reuseware accept C code just after the
leading line "*dummy{};"?
I've attached the grammars (that follow closely the K&R, 2nd edition).
Regards,
Andreas Leha
|