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

Rewrite to use Aaron Hsu's Data-Parallel Architecture #76

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from
Draft

Conversation

A1Liu
Copy link
Owner

@A1Liu A1Liu commented Apr 30, 2023

NOTE: MUST NOT SQUASH MERGE

A1Liu added 9 commits April 25, 2023 12:36
Setting up a basic system, still incomplete, for a rewrite that may or
may not finish successfully.
- Added Lexer for raw tokens, befor macro expansion
- Added test harness which reads C source and parses expected output
- Moved previous test cases into source, without actually enabling them
yet
- AST based on the structure described in
https://scholarworks.iu.edu/dspace/handle/2022/24749
, using [vickenty's implementation](https://github.com/vickenty/lang-c/)
as a reference
- Added some Visual Studio Code something or other because... idk
- Rewrote some of the readme to be a lil bit cuter
- Tiny version of macro expansion that just removes newlines
- Added basic parser for simple stuff, which outputs nodes in post-fix
order with parent indices.
- Separated WASM output into separate crate
- Basic Playground
- Easy to create errors
- Easy to create a new kind of error
- Error stack traces in debug mode
- AST printing
- Slightly prettier playground
- Error console formatting
- Ok-ish error support in playground
- Added an index to `ErrorKind::Todo`
- Added a pass to do declaration specifier checks
- Created crate for test files with build script
- Deleted some old code
- Moved C library code again
- Moved test runner to the test crate
- Moved lexer, macros, and parser to the `parser` module
- Re-organize derived declarator system to be nested, so that it's easier to ride the parent-pointer chain to the declaration w/ the base type
- Removed `print_err` from internals of `run_compiler`, and instead the
full error gets returned to the `StageOutput`
- Made `display_tree` accept `Vec<AstNode>` instead of `AstNodeVec`
- Fixed `display_tree` to print roots in order instead of reversed order
- Add basic type database system
- Add types for AstDeclarator
- Removed test running for projects that don't really do testing
- Add type display for AST identifier nodes
- Add `AstNodeKind::ParamDecl`
- Finish initial code for `validate_declarations`
- Make type printing a little nicer
- Make `Symbol` not an `enum`
- Add `id` field to `Ast` and use it to write `rebuild_indices` function
- "Parallelized" `validate_declarations`
- Add some basic int handling
- Add walrus-based codegen, at least for now
- Simplified `AstInterpretData` system
- Removed `ByKindAst` stuffs
- Added basic `int` parsing
- Added some design notes
@A1Liu A1Liu changed the title Finished Rewrite Rewrite to use Aaron Hsu's Data-Parallel Architecture May 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant