[DGD] Working with parse_string()
bart at wotf.org
bart at wotf.org
Tue Jul 21 13:11:41 CEST 2009
Heh, re: 2. I ran into that more then once.. because of that, and because of
only having a single string available for passing error information out of an
atomic function and a number of similar issues, I see upping the string size
limit as the only available solution.
Using an array of strings is often viable, but not for the atomic error and
parse_string cases, at least not in the current implementation. If there is a
better solution that I am missing, I'd be glad to hear about it.
Bart.
On Tue, 21 Jul 2009 03:44:01 -0700, Shentino wrote
> This reminds me of another couple of questions I've wanted to ask:
>
> 1. Apart from padding a grammar with ambiguity catching error cases,
> is there any way to extract diagnostic information from a bad parse?
>
> So far, I can think of tracking the successful fragment parses as "progress
> points"
>
> 2. How do you handle a grammar parse where the grammar, the
> sentence, or both exceed the limits of string size, without hacking
> DGD and upping the limits.
>
> A case in point for this would be parsing a very large XML document
> that was larger than 64K
>
> On Tue, Jul 21, 2009 at 3:25 AM, Felix A. Croes <felix at dworkin.nl> wrote:
>
> > Kamil N <kamiln at gmail.com> wrote:
> >
> > >[...]
> > > By the way, is there any way I can somehow track runtime errors that
> > > happen inside parse_string() function, for example in LPC functions
> > > that are called by the parser? The most detailed error message I can
> > > get is:
> > >
> > > Runetime error: Index on bad type [caught]
> > > 46 receive_message /kernel/obj/telnet (#25)
> > > 197 receive_message /kernel/lib/connection (/kernel/obj/telnet#25)
> > > 232 receive_message /usr/System/obj/user (#26)
> > > 37 input /usr/System/obj/wiztool (#27)
> > > 763 call_limited /kernel/lib/auto (/usr/System/obj/wiztool#27)
> > > 100 process /usr/System/obj/wiztool (#27)
> > > 917 cmd_code /kernel/lib/wiztool (/usr/System/obj/wiztool#27)
> > > 10 exec /usr/admin/_code
> > > 39 do_parse /usr/admin/parser_test
> > >
> > > Line 39 is just where I call parse_string() so it doesn't really help
> > > with finding in which LPC function this runtime error ocurred.
> >
> > Line 39 is where the error is. Had it been in a LPC function called
> > by parse_string(), the error trace would have included that function.
> >
> > Regards,
> > Felix Croes
> > ___________________________________________
> > https://mail.dworkin.nl/mailman/listinfo/dgd
> >
> ___________________________________________
> https://mail.dworkin.nl/mailman/listinfo/dgd
--
Created with Open WebMail at http://www.bartsplace.net/
Read my weblog at http://soapbox.bartsplace.net/
More information about the DGD
mailing list