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

Refactor parsing and compiler around List type #28

Open
pliniker opened this issue Jul 7, 2020 · 0 comments
Open

Refactor parsing and compiler around List type #28

pliniker opened this issue Jul 7, 2020 · 0 comments
Labels
book-section Describes a part or chapter of the book that needs to be written easy Little experience and/or subject matter knowledge required parser Area: lexing and parsing

Comments

@pliniker
Copy link
Member

pliniker commented Jul 7, 2020

I originally wrote the parser to generate a nested Pair tree data structure, just like Lisp uses cons cells. I did this to simplify bootstrapping into a compiler when I didn't have more complex data structures (like the Array types) available yet.

Since this Lisp-style cons cell data structure is archaic, is it worth refactoring the parser and compiler around the List type?

  • the List type is an Array<TaggedCellPtr> so, like most dynamic language arrays is a heterogenous array
  • the book chapter(s) on parsing will have to be (re)written around the List type rather than Pairs
@pliniker pliniker added easy Little experience and/or subject matter knowledge required book-section Describes a part or chapter of the book that needs to be written parser Area: lexing and parsing labels Jul 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
book-section Describes a part or chapter of the book that needs to be written easy Little experience and/or subject matter knowledge required parser Area: lexing and parsing
Projects
None yet
Development

No branches or pull requests

1 participant