From: TONGARI J <ton...@gm...> - 2015-06-17 13:18:03
|
2015-06-17 20:35 GMT+08:00 MM <fin...@gm...>: > On 17 June 2015 at 13:23, Seth <bu...@se...> wrote: > >> On 06/17/2015 10:30 AM, MM wrote: >> > Hi, >> > >> > Is there a more compact way to express this parser? >> > With the target of having 'char' as an attribute? >> > >> > 1. char_('A') | char_('E') | char_('X') >> > >> Yes >> > >> > 2. char_("AEX") // does this parse any of A or E or X? >> Yes >> > >> > According to the rules, the synthetized attribute of 1. is variant< >> > char, char, char >. >> Yes >> >> > Does it simplify to char ? >> Yes >> >> >> ------------------------------------------------------------------------------ >> > Thanks. > How would I go about updating the 5th row here: > > http://www.boost.org/doc/libs/1_58_0/libs/spirit/doc/html/spirit/qi/quick_reference/qi_parsers/char.html > ? > to make it clearer? > It's in the 7th row (charset), you should look at this: http://www.boost.org/doc/libs/1_58_0/libs/spirit/doc/html/spirit/qi/reference/char/char.html#spirit.qi.reference.char.char.char__def_ |