Skip to content

Parsing binary data #68

Description

@udoschneider

I basically have a parser ready to parse text input. However another representation of the source is binary - although with the exact same AST structure. It seems that adding those two methods allow me to treat ByteArray as byte sequences and Integers as bytes:

ByteArray>>#asPParser
	^ PP2LiteralSequenceNode on: self

Integer>>#asPParser
	^ PP2LiteralObjectNode on: self

Thinking about it doing something like

SequencableCollection>>#asPParser
	^ PP2LiteralSequenceNode on: self

would even allow parsing "numeric collection" in general ...

Is this the way to go?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions