haskell / haskell/happy

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

Open
#338 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Haskell
Stars
322
Forks
86
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.