[Bro] Activating a scanner within a scanner?

Richard Hartmann richih at net.in.tum.de
Fri May 11 10:38:22 PDT 2007


To elaborate on options to parse newlines which I can think of in the
order I would prefer to be able to do this:

1) Define a type like
type SIP_Headers = SIP_Header[] &until(foo);
where foo would be some way to tell the parser 'until you hit a blank
line'

2) Use a case statement to decide how to continue parsing of the data

3) Try to parse parts of the remaining buffer and continue with another
branch in the parsing tree if that first attempt fails

4) If all else fails, I will probably try to just grab the first letter
of the current line and decide based on what is in that field. This
would be an extremely kludgy (think several strings starting with the
same letter, resulting in even more branching) and hacky (just ugly,
hard to read and generally bad style)


Best regards,
Richard



More information about the Bro mailing list