[Bro-Dev] [JIRA] (BIT-67) Grammar ambiguity with "local" for introducing "when" variables

Jon Siwek (JIRA) jira at bro-tracker.atlassian.net
Mon Feb 10 09:04:38 PST 2014

    [ https://bro-tracker.atlassian.net/browse/BIT-67?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15520#comment-15520 ] 

Jon Siwek commented on BIT-67:

I don't think the change in the commit fully resolves the grammar ambiguity, but just makes a workaround of declaring the local w/ an attribute outside the when stmt actually work for more cases.

Generally, I consider my work on that branch more of a sandbox to play around w/ fixing the various problems with attributes.  It fixes many common usages to be more intuitive, but makes some other things a bit weird.  There's a lot of discussion scattered over the tickets referenced in that commit, but no one's come up w/ a definitive solution for all the attribute weirdness in Bro.

So no: don't merge that in order to fix the problem in this ticket.

> Grammar ambiguity with "local" for introducing "when" variables
> ---------------------------------------------------------------
>                 Key: BIT-67
>                 URL: https://bro-tracker.atlassian.net/browse/BIT-67
>             Project: Bro Issue Tracker
>          Issue Type: Problem
>          Components: Bro
>            Reporter: Vern Paxson
>            Assignee: Robin Sommer
> Currently there are two ways in the grammar to parse "local", one as a variable declaration (including a type, initialization, and attributes), and the other as an expression (no type or attributes, just essentially an initialization).  I believe we added this second to support introducing variables to hold the delayed values resulting from "when" expressions.  However, this leads to parsing ambiguities and in particular the inability to associate attributes with "local" declarations.  (One such attribute we need is &raw_output.)  So we instead need to use a different keyword for "when" values.

This message was sent by Atlassian JIRA

More information about the bro-dev mailing list