[antlr-interest] Re: Binary files with byte counts
ericch2003
eric.chastan at netcelo.com
Mon Nov 25 04:23:50 PST 2002
Hello,
I have the same problem, did you find that predicates are the better
way to manage it ?
Can someone explain me how to use the predicates in this case ?
Thanks in advance .
Eric.
--- In antlr-interest at y..., Jonathan Sergent <sergent at xxx.xxx.xxxx wrote:
> /// Doug Erickson <doug.erickson at P...>:
> ] If I understand your question correctly, the following solution
is one
> ] way to do it. I have a file format that has chunks of variable
length
> ] of unparsed binary data embedded in parsed text. In the lexer, I
create
> ] special tokens that hold the binary data, and syntactic predicates to
> ] count the bytes as I add it to the buffer. Maybe it's hunky, but it
> ] works, so it looks pretty good to me.
>
> Oops. Yeah. I didn't think about semantic predicates inside loops
> to terminate them. But this seems like what I want. I'll fiddle with
> it some.
>
> If other people have ideas, send to me, and I will summarize to the
> list (along with whatever sort of solution I find).
>
> Thanks.
>
>
> --
> Jonathan Sergent / sergent at E... / (650) 786-3952
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list