Skip to content

Parsing binary data #68

@udoschneider

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?

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