[antlr-interest] Binary support

Sam Barnett-Cormack s.barnett-cormack at lancaster.ac.uk
Thu Sep 15 10:51:27 PDT 2011


I did some work with ASN.1 a while back. If it weren't for some ethical 
issues, I'd go back to doing it on my own time, to try and make a 
java-based tool to handle ASN.1 stuff. The problem with ASN.1 is - what 
bit of it are you talking about? Which encoding? How feature-complete? 
Which version? It's all a bit foggy. It would also only be helpful for 
any binary format which could be described using ASN.1, which isn't 
quite all of them.

Sam

On 15/09/2011 18:36, The Researcher wrote:
> seems to be an uncharted territory?
>
> See: http://en.wikipedia.org/wiki/Abstract_Syntax_Notation_One
>
> There are ANTLR gramamars for it. http://www.antlr.org/grammar/list
>
> *ASN.1*<http://www.antlr.org/grammar/1231433381400/ASN.g>   and *SMI/SPPI/ASN.1
> parser*<http://www.antlr.org/grammar/1105770765162/parsesmi-v1-15jan05.zip>
>
> Of interest might be
> http://www.wireshark.org/docs/man-pages/wireshark-filter.html
>
> Eric
>
>
>
>
> On Thu, Sep 15, 2011 at 1:07 PM, andreas kleiber<kleibi at gmx.net>  wrote:
>
>> Hi Eric,
>> thanks for the prompt answer.
>>
>>> Something you might want to do, but this is reinventing the wheel, is to
>>> create your own grammar that defines binary layouts, and then use that as
>>> input into a driver that reads the binary file. I have done both of these
>>> and the latter is the better option.
>>
>> You're describing exact the situation I didn't want to face. ;-)
>>
>> The "ANTLR was not designed for binary files" point: This is why I think
>> "if ANTLR is another tool for language recognition -- are binary files not
>> also languages?". Or in other words: Wouldn't it be the least effort to add
>> the functionality to ANTLR? Of course I don't know the ANTLR code at all, so
>> I can't really comment on that but if it's designed well I could imagine
>> that it would be possible to add at least some of my proposed features.
>>
>> BTW I'm wondering that I found so less posts on binary topics. And at least
>> I'm not aware of another tool that's able to generate code for reading
>> binary files -- seems to be an uncharted territory?
>>
>> Andi
>> --
>> Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
>> belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de
>>
>
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address



More information about the antlr-interest mailing list