[Spirit & Karma] #12: Fix attribute extraction for alternatives

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[Spirit & Karma] #12: Fix attribute extraction for alternatives

Hartmut Kaiser
#12: Fix attribute extraction for alternatives
--------------------+-------------------------------------------------------
 Reporter:  djowel  |       Owner:  djowel  
     Type:  defect  |      Status:  new      
 Priority:  major   |   Milestone:  Spirit V2
Component:  Spirit  |     Version:  Spirit V2
 Keywords:          |  
--------------------+-------------------------------------------------------
 See $$$ fixme $$$ in alternativ.cpp

--
Ticket URL: <http://fortytwo.cct.lsu.edu:8000/SpiritKarma/ticket/12>
Spirit &amp; Karma <http://spirit.sourceforge.net>
Development of the Boost::Spirit V2 libraries
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Spirit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-devel
Reply | Threaded
Open this post in threaded view
|

Re: [Spirit & Karma] #12: Fix attribute extraction for alternatives

Hartmut Kaiser
#12: Fix attribute extraction for alternatives
---------------------+------------------------------------------------------
  Reporter:  djowel  |       Owner:  djowel  
      Type:  defect  |      Status:  new      
  Priority:  major   |   Milestone:  Spirit V2
 Component:  Spirit  |     Version:  Spirit V2
Resolution:          |    Keywords:          
---------------------+------------------------------------------------------
Comment (by djowel):

 This regression was exposed after i fixed the Jamfile for duplicate test
 names. For example, alternative.cpp both in karma and qi were not being
 tested. BJam prints an obscure error message but he real deal is that we
 cannot have the same names. I changed the target names to deal with this
 and a couple of tests (that were not being tested) fired.

--
Ticket URL: <http://fortytwo.cct.lsu.edu:8000/SpiritKarma/ticket/12#comment:1>
Spirit &amp; Karma <http://spirit.sourceforge.net>
Development of the Boost::Spirit V2 libraries
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Spirit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-devel
Reply | Threaded
Open this post in threaded view
|

Re: [Spirit & Karma] #12: Fix attribute extraction for alternatives

Hartmut Kaiser
In reply to this post by Hartmut Kaiser
#12: Fix attribute extraction for alternatives
---------------------+------------------------------------------------------
  Reporter:  djowel  |       Owner:  djowel  
      Type:  defect  |      Status:  closed  
  Priority:  major   |   Milestone:  Spirit V2
 Component:  Spirit  |     Version:  Spirit V2
Resolution:  fixed   |    Keywords:          
---------------------+------------------------------------------------------
Changes (by hkaiser):

  * status:  new => closed
  * resolution:  => fixed

Comment:

 The problem is fixed now.

 It was the result of our decision to let fully defined literal parsers
 have unused attributes: lit("something") returnes unused.

 The flipside is, that fully defined parsers in alternatives can't return
 any value anymore as well:

     (lit("something") | int_)[ref(v) = _1]

 never returnes "something" even if "something" was matched.
 I'm not sure anymore if the mentioned decision was a good one in the first
 place. I'll close this ticket anyway for now, please feel free to reopen
 it.

--
Ticket URL: <http://fortytwo.cct.lsu.edu:8000/SpiritKarma/ticket/12#comment:2>
Spirit &amp; Karma <http://spirit.sourceforge.net>
Development of the Boost::Spirit V2 libraries
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Spirit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-devel
Reply | Threaded
Open this post in threaded view
|

Re: [Spirit & Karma] #12: Fix attribute extraction for alternatives

Hartmut Kaiser
In reply to this post by Hartmut Kaiser
#12: Fix attribute extraction for alternatives
---------------------+------------------------------------------------------
  Reporter:  djowel  |       Owner:  djowel  
      Type:  defect  |      Status:  closed  
  Priority:  major   |   Milestone:  Spirit V2
 Component:  Spirit  |     Version:  Spirit V2
Resolution:  fixed   |    Keywords:          
---------------------+------------------------------------------------------
Comment (by hkaiser):

 The alternative code is completely re-written now.

 The list of attributes in the resulting variant now get's an unused_type
 prepended whenever at least one unused_type attribute was present in the
 list of attributes of the sub_parsers. If the attribute is provided
 explicitely the user '''must''' include a unused_type in the variant a
 type list to make it compile successfully.

 The parsing code doesn't use spirit::any anmore (uses fusion::any now),
 since we need to traverse over the sub-components of the alternative only.
 The attribute is a variant and we do not want to traverse over the variant
 types in parallel.

 Revision: 470

--
Ticket URL: <http://fortytwo.cct.lsu.edu:8000/SpiritKarma/ticket/12#comment:3>
Spirit &amp; Karma <http://spirit.sourceforge.net>
Development of the Boost::Spirit V2 libraries
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Spirit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-devel