[Spirit & Karma] #17: Allow token_set.add(regex, id) syntax

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

[Spirit & Karma] #17: Allow token_set.add(regex, id) syntax

Hartmut Kaiser
#17: Allow token_set.add(regex, id) syntax
---------------------+------------------------------------------------------
 Reporter:  hkaiser  |       Owner:  hkaiser  
     Type:  defect   |      Status:  new      
 Priority:  major    |   Milestone:  Spirit V2
Component:  lex      |     Version:  Spirit V2
 Keywords:           |  
---------------------+------------------------------------------------------
 Allow an alternative syntax to define tokens:

     token_set set;
     set.add
         ("regex1", tokenid1)
         ("regex2", tokenid2)
     ;

 and

     lexer lex;
     lex.add
         ("regex3", tokenid3)
         ("regex4", tokenid4)
     ;

 where the token id's are optional, just as in the existing syntax which is
 based on operator+=.

--
Ticket URL: <http://fortytwo.cct.lsu.edu:8000/SpiritKarma/ticket/17>
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] #17: Allow token_set.add(regex, id) syntax

Hartmut Kaiser
#17: Allow token_set.add(regex, id) syntax
----------------------+-----------------------------------------------------
  Reporter:  hkaiser  |       Owner:  hkaiser  
      Type:  defect   |      Status:  assigned
  Priority:  major    |   Milestone:  Spirit V2
 Component:  lex      |     Version:  Spirit V2
Resolution:           |    Keywords:          
----------------------+-----------------------------------------------------
Changes (by hkaiser):

  * status:  new => assigned

--
Ticket URL: <http://fortytwo.cct.lsu.edu:8000/SpiritKarma/ticket/17#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] #17: Allow token_set.add(regex, id) syntax

Hartmut Kaiser
In reply to this post by Hartmut Kaiser
#17: Allow token_set.add(regex, id) syntax
----------------------+-----------------------------------------------------
  Reporter:  hkaiser  |       Owner:  hkaiser  
      Type:  defect   |      Status:  assigned
  Priority:  major    |   Milestone:  Spirit V2
 Component:  lex      |     Version:  Spirit V2
Resolution:           |    Keywords:          
----------------------+-----------------------------------------------------
Comment (by hkaiser):

 The main feature is implemented now, but we need to allow for char_(ID) in
 qi, where ID is a enum or integer (the token id). Or, even better we need
 to allow ID as a component directly.
 This would be nice to have, because it allows to decouple the lexer
 definition fro the parser definition.

--
Ticket URL: <http://fortytwo.cct.lsu.edu:8000/SpiritKarma/ticket/17#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