akimd / bison

GNU Bison
GNU General Public License v3.0
334 stars 90 forks source link

lalr1.cc and increased usage of noexcept #63

Closed donmac703 closed 3 years ago

donmac703 commented 4 years ago

lalr1.cc contains the following code fragment:

class context { public: context (const ]b4_parser_class[& yyparser, const symbol_type& yyla); const symboltype& lookahead () const { return yyla; } symbol_kindtype token () const { return yyla.kind (); }]b4_locations_if([[ const locationtype& location () const { return yyla.location; }

lookahead(), token(), and location() should be tagged with YY_NOEXCEPT.

Note that kind() is already tagged with YY_NOEXCEPT as shown below.

/// The symbol kind (corresponding to \a state). /// \a ]b4_symbol(-2, kind)[ when empty. symbol_kind_type kind () const YY_NOEXCEPT;

akimd commented 3 years ago

Fixed in master.