-
Notifications
You must be signed in to change notification settings - Fork 0
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
compilers, ast, #13
Comments
compilers are also translators from "high-level languages" to bits and bytes |
in python: https://github.com/jayconrod/gypsum - nice examples of using lexers, combinators, ast, |
in js, https://github.com/substack/node-falafel acorn ... |
translation of code is related to recursively walking the abstract syntax tree. in fact recursion happens on a very small scale for expressions for example, the total program is then "combined" results from smaller recursions. |
8cc compiler https://github.com/rui314/8cc and bflisp https://github.com/shinh/bflisp |
if compiler writing is about recursion, the correct syntax is a question where the recursion breaks. |
some jison tricks:
|
jison parsers from the browser with browserify transform: https://github.com/schmich/jisonify |
arrays with jison http://stackoverflow.com/questions/28511760/making-arrays-in-jison |
18:26] <> And PEG. :)
Your first attempt may not be too nice, but your second one probably will be. :) ah, i found this http://stackoverflow.com/questions/13367545/flex-isnt-generating-the-yyflexlexer-h-header |
programs are based on interpretations of "abstract syntax tree" by computers.
that might give a good blog post incl references to:
James Halliday - What can you do with an AST? A whole lot
Video for What can you do with an AST? A whole lot.▶ 18:52
https://www.youtube.com/watch?v=X8W2Le60up8
Most of the things you can do are terrible hacks but sometimes there is no other way. This talk will cover some ...
let's build a compiler:
http://compilers.iecc.com/crenshaw/
The text was updated successfully, but these errors were encountered: