A compiler (or interpreter) has a few parts.
A parser converts a file full of source code into a data structure.
An interpreter traverses that data structure and executes the appropriate commands for each significant node in the structure.
A compiler transforms that data structure and emits something else. Perhaps this other is object code for a specific processor or perhaps it's binary code for a virtual machine or perhaps it's source code for another language entirely.
If you look at compiling and implementing languages this way, you already know the general technique. (everything is a compiler).
Improve your skills with Modern Perl: the free book.
In reply to Re^7: Writing a Programming Language in Perl
by chromatic
in thread Writing a Programming Language in Perl
by programmer99
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |