Skip to content

XCaminhante/meta

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

82 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Meta, a straightforward compiler-compiler

This project is based on META-II by Val Schorre.

Meta generates C code implementing a parser/compiler for a EBNF-like grammar file.

Meta is written in itself so it needs to be bootstrapped from a C implementation. I provide meta.c so you just need to compile it.

Build and use

To bootstrap:

make meta

To compile a grammar in the same directory (for test purposes):

make grammar

To compile it directly:

./meta grammar.meta grammar.c
gcc grammar.c -o grammar

TODO

  • Refactoring with literate programming
  • More Wirth-like metasyntax
  • Better command line interpreter
  • Better error and warning messages
  • Create useful grammar examples
  • Create a demonstration compiler

About

Metacompiler based on Val Schorre's META-II

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 98.1%
  • Makefile 1.9%