[DGD] Parse_string confusion
Noah Lee Gibbs
angelbob at monkeyspeak.com
Sat Jan 19 00:06:04 CET 2002
On Fri, 18 Jan 2002, S. Foley wrote:
> 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.
It does. I just had no idea what those mean.
> Basically, if you feed parse_string a string it can't fully 'tokenize' it
> will generate an error.
Interesting. I didn't realize you needed to be able to fully tokenize
any possible input, even if you wanted the parse to fail. I mostly assume
that anything not documented works basically like lex and yacc, a
questionable assumption :-)
> Try this grammar instead:
>
> return !!parse_string("regstring = /[a-zA-Z]+/ "+
> "notregstring = /[^a-zA-Z]+/ "+
> "full : regstring",
> str
> );
I will. Thanks!
--
angelbob at monkeyspeak.com
See my page of DGD documentation at
"http://www.angelbob.com/projects/DGD_Page.html"
If you post to the DGD list, you may see yourself there!
_________________________________________________________________
List config page: http://list.imaginary.com/mailman/listinfo/dgd
More information about the DGD
mailing list