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

Compiler Project - Code Graph Compiler #8

Merged
merged 18 commits into from
May 10, 2023
Merged

Compiler Project - Code Graph Compiler #8

merged 18 commits into from
May 10, 2023

Conversation

LBF38
Copy link
Owner

@LBF38 LBF38 commented May 10, 2023

First version of the Code Graph Compiler.
This is a minimal version. It can be improved a lot.

LBF38 added 18 commits April 5, 2023 14:47
introduce ast and compiler class
still in the making.
created a README file for the compiler project
fully reworked the lexer rules to make them cleaner and easier to manage
across the codebase. The rules' names are now defined in classes to make
them easier to access and to avoid name collisions or typing errors.

BREAKING CHANGE: the lexer rules' names have changed.
- the lexer is fully operational
- the parser is partially done. It needs more methods to be implemented
or refactored.
- for the minimal compiler, I need to add at least one visitor
(PrettyPrinter or CodeGeneration)
- Also added a playground to make some tests for ideas
before implementing them in the compiler.
update vscode settings for default python formatter
made a first simple pretty printer to rewrite the input code.
This is part of the minimal compiler for the project.
This is still in progress. I need to implement more in each parts.
(lexer, parser, visitors)
The next steps will be to add more supported Dart syntax and a simple
code generator. (visitor for converting the AST to a UML diagram).
adding simple version of code generator visitor for code graph compiler.
The visitor generates a UML class diagram (in Mermaid format).
wrote more about the project and my experimentation with it.
📝 update README for project.
Also modified compiler to match main.py usage.
fixed the issue when the option --output was in last position.
The filename wasn't removed from the args array and the compiler used it
as an input file. => error

:memo: fixed some typos in README
add support for abstract classes syntax.
It can support the minimal syntax of abstract classes.
This could be more improved to make it more relevant.
Also, enhanced the pretty printer.
fixed some small bugs/errors.
@LBF38 LBF38 self-assigned this May 10, 2023
@LBF38 LBF38 added documentation Improvements or additions to documentation enhancement New feature or request labels May 10, 2023
@LBF38 LBF38 merged commit 526f8a7 into master May 10, 2023
@LBF38 LBF38 deleted the compiler-project branch May 10, 2023 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant