[apparmor] [patch 4/3] libapparmor: adjust %pure-parser directive

Seth Arnold seth.arnold at canonical.com
Thu Sep 4 18:35:50 UTC 2014


On Thu, Sep 04, 2014 at 09:17:11AM -0700, Steve Beattie wrote:
> On Wed, Sep 03, 2014 at 06:04:59PM -0700, Seth Arnold wrote:
> > On Wed, Sep 03, 2014 at 07:39:39AM -0700, Steve Beattie wrote:
> > > [Sorry, meant this patch to go out with the others.]
> > > 
> > > This patch adjusts libapparmor's aalogparse bison grammer to use the
> > > %pure-parser keyword instead of the deprecated %pure_parser keyword.
> > > Bison had been warning about this:
> > > 
> > >   libraries/libapparmor/src/grammar.y:71.1-12: warning: deprecated directive, use ‘%pure-parser’ [-Wdeprecated]
> > >    %pure_parser
> > >     ^^^^^^^^^^^^
> > 
> > Heh, the webpage says %pure-parser is also deprecated and the replacement
> > is:
> > 
> > %define api.pure
> > 
> > http://www.gnu.org/software/bison/manual/bison.html#g_t_0025define-Summary
> > 
> > (It says the 'full' option was introduced in 2.7 but doesn't say how far
> > back the 'true' option (same as no option) works; Ubuntu's oldest is 2.3,
> > which probably works since other %define api.* things were introduced in
> > 2.3 but there's no mention of 'true'...)
> > 
> > This patch is probably fine as-is but we might be back here again soon.
> 
> Heh, with three different bison grammars in the tree, it seems like
> there's always a warning about some directive being deprecated.

Ooh ooh I wonder what it'll be next :)

> It looks like lucid's (ubuntu 10.04 lts) bison supports 'api.pure' but not
> 'api.pure true'. While we don't claim to support as far back as that
> release, that seems a reasonable compromise for other platforms that may
> not have a bison newer than that.
> 
> Updated patch follows:
> 
> This patch adjusts the bison grammer in libapparmor and the parser
> to use the %define api.pure directive instead of the deprecated
> %pure_parser and %pure-parser keywords.  Bison had been warning about
> the former:
> 
>   libraries/libapparmor/src/grammar.y:71.1-12: warning: deprecated directive, use ‘%pure-parser’ [-Wdeprecated]
>    %pure_parser
>     ^^^^^^^^^^^^
> 
> Signed-off-by: Steve Beattie <steve at nxnw.org>

Acked-by: Seth Arnold <seth.arnold at canonical.com>

Thanks

> ---
>  libraries/libapparmor/src/grammar.y |    2 +-
>  parser/libapparmor_re/parse.y       |    2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> Index: b/libraries/libapparmor/src/grammar.y
> ===================================================================
> --- a/libraries/libapparmor/src/grammar.y
> +++ b/libraries/libapparmor/src/grammar.y
> @@ -68,7 +68,7 @@ aa_record_event_type lookup_aa_event(uns
>  %}
>  
>  %defines
> -%pure_parser
> +%define api.pure
>  %lex-param{void *scanner}
>  %parse-param{void *scanner}
>  
> Index: b/parser/libapparmor_re/parse.y
> ===================================================================
> --- a/parser/libapparmor_re/parse.y
> +++ b/parser/libapparmor_re/parse.y
> @@ -55,7 +55,7 @@ static inline Chars* insert_char_range(C
>  
>  %}
>  
> -%pure-parser
> +%define api.pure
>  /* %error-verbose */
>  %lex-param {YYLEX_PARAM}
>  %parse-param {Node **root}
> 
> -- 
> Steve Beattie
> <sbeattie at ubuntu.com>
> http://NxNW.org/~steve/



> -- 
> AppArmor mailing list
> AppArmor at lists.ubuntu.com
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/apparmor

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20140904/d6e385ab/attachment-0001.pgp>


More information about the AppArmor mailing list