Spirit & Karma | 10 Aug 02:53

[Spirit & Karma] #27: Parse result (match-no-match) to bool attribute (Rene's suggestion)

#27: Parse result (match-no-match) to bool attribute (Rene's suggestion)
--------------------+-------------------------------------------------------
 Reporter:  djowel  |       Owner:  djowel   
     Type:  defect  |      Status:  new      
 Priority:  major   |   Milestone:  Spirit V2
Component:  Spirit  |     Version:  Spirit V2
 Keywords:          |  
--------------------+-------------------------------------------------------
 [14:52] Rene Rivera:  (
  ch_p('`') [assign_a(actions.template_escape,true_)]
  |
  eps_p [assign_a(actions.template_escape,false_)]
  )
 [14:52] djowel64: ah yeah! my bad!
 [14:53] djowel64: jeez. i'm starting to forget spirit1 :(
 [14:53] Rene Rivera: so is spirit2 better at this?
 [14:53] djowel64: well, it's just phoenix
 [14:54] djowel64: so:    [var(b) = true]
 [14:55] Rene Rivera: well not really... i meant can it handle the zero-or-
 one match case.
 i.e. set true when there's one match false if zero match?
 [14:55] djowel64: hmm
 [14:55] Rene Rivera: seems like it would be a common use case.
 [14:56] djowel64: yeah
 [14:57] Rene Rivera: the "const" tag on C++ methods is the most immediate
 real world use
 case i can think of.
 [14:57] djowel64: in spirit2, the appropriate way would be to set the
 attribute of
 the parser to its match result. alas, there's no way to do that yet, but
(Continue reading)


Gmane