Boost logo

Boost :

From: moshebox_at_[hidden]
Date: 2001-05-24 06:11:48


Hi John,

the output you sent me made by your version of my program gave
exactly what I though it would , that is becuase it is supposed to
match either expr A or expr B which ever comes first ( I sent you a
more complete explanation to your email box )

the RE is suppose to search for 2 possible patterns and match them
both , both represent 1st or 2nd level of a table of contents ,which
means :

-Start search
-LABEL : start
-Match A or B
   -Found A? good ,print
   -Found B? good ,print
   -Nothing ? goto end
-goto start
-LABEL end:
-finsh

the expression works , and if I use the formating scheme of ?
1exprA:exprB it works correctly , look at the output file I sent
you , you see the two different levels (I added tab for the second
level so it should be easy to see the difference).

the problem is when I used the second formating scheme :
1?exprA2?exprB

I get only exprA , and exprB is ignored.

I hope I made clear , if not please let me know what additional
information I can send you to make it clearer.

I really appreciate the time you are putting into this , I just hope
I not waisting your time with my ignorance of how RE works , but
since the only diferrence between the working/non-working state I
guess it could either be me not understaning how format strings work
or its a bug in the formating code.

thank you very much

hope to hear from you soon

Moshe

>From: John Maddock <John_Maddock_at_[hidden]>
>To: "Moshe m" <moshebox_at_[hidden]>
>Subject: Re: Conditional expressions
>Date: Sun, 20 May 2001 07:34:46 -0400
>
>Moshe,
>
> >I'm afraid this is not the correct output , you see , the output is
>suppose
>to be a tree-like , with 2 levels at this point , your output
includes only
>
>the second level (the first RE expression of the two ) while
ignroing the
>first level which should have resulted from the second RE expression.
>
>I am including the correct output as an attachment , this output was
>achieved using the boolean methond (?1\t$2\n:$5\n) . the output I
get from
>the (?1expr?2expr) is exactly like you got , but as I said it is
only half
>the correct output.
><
>
>Well the output is correct for the expressions given, I guess I don't
>really understand what it is you want to have happen - can you
please come
>up with a *simple* test case the illustrates the issue.
>
>Remember that if you use something like (?1e1)(?2e2) then there are
four
>output options:
>
>$1 $2 output
>n n ""
>y n "e1"
>n y "e2"
>y y "e1e2"
>
>Is this what you want?
>
>- John Maddock
>http://ourworld.compuserve.com/homepages/john_maddock/


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk