[EMAIL PROTECTED] wrote:

> Okay, granted.  Here's the same rule with a different word...
>
> headrule: [some
>         [thru "=== " copy header to newline
>         (       append header " (FIRST LEVEL)"
>                 append full-contents header)            |
>         thru "--- " copy header to newline
>         (       append header " (SECOND LEVEL)"
>                 append full-contents header)    ]
> ]
>
> Now, I still only see FIRST LEVEL stored in full-contents while
> it's a fact lines with "--- " exist in the file being used...
>

Aha, so I am sorry as I am not too skilled in grammar creation. The problem
seems to be with "find this value OR that value", as string will be parsed
thru first occurance of "===", and if "---" occured first, it will not be
reflected. That would require some "parralel" searching for parser or what,
so I am sorry I can't help. Anybody?

-pekr-

>
>   Fiestiness,
>
>                                         ------EAT
>
> [EMAIL PROTECTED] wrote:
> >
> > [EMAIL PROTECTED] wrote:
> >
> > >   Okay, question is simple:
> > >
> > >   Here's my rule:
> > >
> > > headrule: [some [
> > >         [thru "=== " copy head to newline
> > >         (       append head " (FIRST LEVEL)"
> > >                 append full-contents head)      ]       |
> > >         some
> > >         [thru "--- " copy head to newline
> > >         (       append head " (SECOND LEVEL)"
> > >                 append full-contents head)      ]
> > >         ]
> > > ]
> >
> > OK, not sure, but "append head ... what?"
> >
> > help head:
> >
> > Returns the series at its head.
> > Arguments:
> >     series --  (series port)
> >
> > So, head is the name of REBOL Native function, and you tried to use it
> > here as a word-name. Could it cause a problem? I think so. The
> > expression enclosed in () is in different context! The REBOL one, where
> > 'head is defined as a function ...
> >
> > >
> > >   Here's the question.  Why does the above only find and append
> > > to full-contents lines with "=== " and completely ignore lines
> > > with "--- "?????????????????????????????????????????????
> > >
> > >   Any help will be VASTLY appreciated.
> > >
> >
> > Let's see if it helps ... :-)
> >
> > Regards,
> >
> > -pekr-
> >
> > >
> > >   Cheerfulness,
> > >
> > >                                         -----EAT

Reply via email to