From: Benoit G. <gu...@th...> - 2004-11-18 10:05:18
|
Hello, I'm trying to use flexml and I see that some error cases are not catched. I've seen that the section 'FLEXML_FINAL' is not set in the default skeleton so that the global error catching code is not expanded in the generated lex file. I can understand that since the rules are really general (and in most cases cannot be reached) but I think that at least the all functionnal error cases should be catched by default. The patch I did in the flexml file is the following : elsif ( /^FLEXML_FINAL$/ and not $nofail ) { # Catch-all "real" error cases. for my $tag (@tags) { for (split ',',$states{$tag}) { # The error cases for end states are managed somewhere else if (not exists $mixed{$tag} and not ($endstates{$tag} =3D~ /$_/)) { print "<$_>{\n"; print " \"<\"{Name} FAIL(\"Unexpected tag `%s'.\", yytext+1);\n"; print " . FAIL(\"Unexpected CDATA `%c' in $tag.\",yytext[0]);\n"; print "}\n"; } } } } But I am not sur it works in all cases... Regards, -- Beno=EEt Guillon TRT/SML THALES RESEARCH & TECHNOLOGY |