[DGD] Re: parse string difficulties
Michael McKiel
crashnbrn71 at yahoo.ca
Sun Mar 28 23:20:48 CEST 2004
--- Robert Forshaw <iouswuoibev at hotmail.com> wrote:
> If this is the case, what is the point in having production rules that
> don't
> call functions?
>
Heres one of Noah's from unq_parser.dpd:
regularstring =
/((\\\v)|(\\\f)|(\\\a)|(\\\r)|(\\\b)|(\\\t)|(\\\n)|(\\\{)|(\\\})|(\\\~)|(\\\\)|([^~{}\\]))*/
unq_document: unq_string
unq_document:
substring: regularstring
substring: substring regularstring ? concat_strings
unq_tag: '{' unq_string '}' ? anon_tag
unq_tag: '~' regularstring '{' unq_string '}' ? named_tag
unq_tag: '{' '}' ? empty_anon_tag
unq_tag: '~' regularstring '{' '}' ? empty_named_tag
unq_string: substring ? simple_anon_tag
unq_string: unq_tag
unq_string: unq_string substring ? concat_ustring_string
unq_string: unq_string unq_tag
Not that I fully understood it, but with Erwin's explanation/example
parse_string is making more sense.
I believe production rules that don't call functions are for making kindof an
if/else situation and more precise ways the 'label:' can be produced...though
I may have that wrong/and/or not explaining well.
______________________________________________________________________
Post your free ad now! http://personals.yahoo.ca
_________________________________________________________________
List config page: http://list.imaginary.com/mailman/listinfo/dgd
More information about the DGD
mailing list