Is there a way to tell Marpa to ignore a certain, obviously wrong, element
in the input.
Case in mind a language that by at large adhere with the BNF, but a vendor
added some extensions without publishing the proper BNF and I would like to
postpone doing that task for various reasons.
Example: SQL Server variety of SQL 2003, keyword TOP:
SELECT TOP 5 column1, column2 FROM table1;
This is a valid SQL 2003 SELECT statement except of the 'TOP 5'
What I have in mind is something like this
my $grammar = Marpa::R2::Scanless::G->new( { source => \$dsl, Handlers =>
{UNKNOWNTOKEN
=> \&handle_unknowntoken}});
Now handle_unknowntoken could potentially see the rest of the input from
the point where the unknown token was found, report it, make it into spaces
and return to the module with a code that say, continue anyway with what
you see, or die the way the module is doing now.
I do not know whether this option is available in any shape or whether it
is at all feasible.
Thanks
ZA
--
You received this message because you are subscribed to the Google Groups
"marpa parser" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.