Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does Pegged have support for binary? #114

Open
enjoysmath opened this issue May 29, 2013 · 2 comments
Open

Does Pegged have support for binary? #114

enjoysmath opened this issue May 29, 2013 · 2 comments

Comments

@enjoysmath
Copy link

Can you make parsers that can parse pure binary with Pegged?

Is this a good place to contact you?

Thank you!

Daniel Donnelly

@enjoysmath
Copy link
Author

What I mean is could you do

WORD <- BYTE BYTE

etc
and pass in ubyte[]'s to your grammar/parser? Or if you can't is there some known way to do this with D strings?

It would be a great feature to have if it doesn't, since binary formats need parsin' too!

@PhilippeSigaud
Copy link
Collaborator

Hmm, I don't know. Do a ubyte and a char have the same size? I yes, you can
convert them easily using std.conv.to and use Pegged to parse the resulting
string, I guess.

On Wed, May 29, 2013 at 8:06 AM, Enjoys Math [email protected]:

What I mean is could you do

WORD <- BYTE BYTE

etc
and pass in ubyte[]'s to your grammar/parser? Or if you can't is there
some known way to do this with D strings?

It would be a great feature to have if it doesn't, since binary formats
need parsin' too!


Reply to this email directly or view it on GitHubhttps://github.com//issues/114#issuecomment-18597759
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants