[Bro-Dev] BiF parsing index types

Gregor Maier gregor at icir.org
Thu May 12 12:49:44 PDT 2011


On 5/12/11 10:09 , Robin Sommer wrote:
> 
> On Thu, May 12, 2011 at 10:52 -0500, you wrote:
> 
>> Can type notation like "vector of string" and "set[addr]" be parsed in
>> BiF declarations?
> 
> D'oh! I never realized that that's reason for the type aliases. Seems
> something we should teach bifcl at some point.

having looked at bifcl recently, I might actually make sense to consider
extending the Bro language parser to be able to also parse bifs (i.e.,
having a "bif-mode" but still compiling a bifcl binary).

Type definitions in bro can be quite complex and one would have to
completely duplicate that in bif.

Similarly, when I was working on the bif syntax to make record types,
enums, etc. available to C++ I thought that it would have been great if
I could just specify the record in the BiF. Instead I have to specify
the record in a bro file and put a simple "type foo: record;" in the
BiF. Otherwise I would have had to copy all record-type-definition syntax.

I think the more we use BiFs the more we will encounter such situations
were the BiF-syntax is not powerful enough and were we would like to
have elements of the Bro syntax available.


Just my 2ct.
gregor
-- 
Gregor Maier
<gregor at icir.org>  <gregor at icsi.berkeley.edu>
Int. Computer Science Institute (ICSI)
1947 Center St., Ste. 600
Berkeley, CA 94704, USA
http://www.icir.org/gregor/


More information about the bro-dev mailing list