[DGD] Working with parse_string()

Kamil N kamiln at gmail.com
Tue Jul 21 11:17:07 CEST 2009


2009/7/20 Felix A. Croes <felix at dworkin.nl>:
> This is normal.  The parser is trying to match the entire sentence,
> and if the last two words don't describe a valid LIV_DAT, it will try
> again with the last 3 words, thus leaving the first two for OBJI_ACC.

Ok, good to know.

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.

Is it possible to get more detailed runtime error trackback for cases
like parse_string, or its just impossible? I must admit its really
painful to debug some complex LPC functions called by the parser when
there are many different ways something can be parsed and it causes
some strange runtime errors sometimes.

Thanks,

KN



More information about the DGD mailing list