[DGD] Parse_string confusion

S. Foley s_d_foley at hotmail.com
Fri Jan 18 22:59:01 CET 2002




Noah Lee Gibbs <angelbob at monkeyspeak.com> wrote:
>return !!parse_string("regstring = /[^A-Z]+/\n\nfull: regstring\n",  > 
>str);

I'm not 100% sure I understand the problem, but it seems to me like this 
grammar would result in a lot of 'Bad token at offset <number>' errors.  
Basically, if you feed parse_string a string it can't fully 'tokenize' it 
will generate an error.

Try this grammar instead:

return !!parse_string("regstring = /[a-zA-Z]+/     "+
                       "notregstring = /[^a-zA-Z]+/ "+
                       "full : regstring",
                       str
                      );

Ignore this if I'm not correctly understanding your problem.

--Steve

_________________________________________________________________
Join the world’s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com

_________________________________________________________________
List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list