Skip to content

Feature Request: Add ability to generate lazily generated list of data structures. #338

Description

@noahmartinwilliams

It would be nice if happy were able to create a list of data structures that's read lazily, rather than having to read in all the tokens before returning any kind of result. Something like some kind of extra syntax that could be added to a rule to indicate that it can be generated lazily.

For example:

Structs : Struct { [$1] } | Struct Structs { $1 : $2 } 
Struct : foo bar number 

would be able to parse an infinite number of Structs even if all the tokens can't strictly fit into memory.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions