Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A toy bytecode VM, assembler, and self-hosting compiler for a scheme-like high-level language.

License

NotificationsYou must be signed in to change notification settings

hellcoderz/toy-bytecode

 
 

Repository files navigation

This project implements a simple bytecode virtual machine, assembler,and self-hosting compiler for a scheme-like high-level langauge. It isintended as a vehicle for playing with ideas in bytecode interpretingand compilation.  It is not intended for any sort of real orproduction use.  To build the project,  simply type     $ makeYou will need gcc installed as well as GNU guile, a schemeimplementation used to bootstrap the compiler.  This will build the following products:    interpreter:       the standard bytecode interpreter.    trace_interpreter: a version of the bytecode interpreter that          prints a log describing the machine state as            each instruction is executed    assembler:         the assembler for building executable bytecode           files from bytecode assembly files.     schemer.bytecode:  the scheme-like language compiler, built from           its own image, that can be run using the           interpreter.    A bytecode program can be run using either the regular or tracinginterpreter as:    $ ./[trace-]interpreter program.bytecodeTo use the compiler, a source program should be directed into theinterpreter's standard input, the bytecode assembly will be written tostandard output:    $ ./interpreter schemer.bytecode < program.sch > program.asmTo assemble the compiled program into executable bytecode, send it asinput to the assembler command:    $ ./assembler <program.asm >program.bytecodeNote: The interpreter does not provide any standard-error like outputstream, so the compiler will write its error messages to standard-outwhich will confuse the assembler and lead to bizarre error messages.

About

A toy bytecode VM, assembler, and self-hosting compiler for a scheme-like high-level language.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp