http://www.cs.dartmouth.edu/~mckeeman/cs48/mxcom/gem/html/GrowingCompiler.html

by Bill McKeeman and Lu He

MathWorks and Dartmouth, May 2009

Contents

Abstract

Self-compiling compilers are common. The question is: How far can one go, bootstrapping a (very) small compiler-compiler into more capable compilers?

Context-free grammars are extended to accomodate output. A grammar executing machine (GEM) is introduced which accepts an input text and a grammar, and outputs another text. Both the input text and the output text can also be grammars, permitting the production of ever more powerful grammars. GEM itself can be extended to build-in the capabilities of the previous grammars. The rules of the game require that changing GEM does not add to its original capability -- it merely makes the implementation more robust or faster.

The grammars and the machine have some simple symmetries that lead to actions such as backtracking and decompiling. It is also possible to directly execute bit-strings in the Intel x86 hardware.

Chapters

  1. Base GEM

    • statement of the problem
    • executable grammars
    • simple examples
  2. Robust GEM
    • pre-entered character classes
    • using nowhite, pretty, invert
  3. GEM with builtin nowhite and chars
    • using multi-character input and output symbols
    • left-associative arithmetic expressions
    • X86 floating point stack
  4. GEM with builtin multichar symbols
    • using Kleene * and + in executable grammars
  5. Running Intel X86 code
    • X86 Assembler
    • calculator
    • atoi
  6. Plenty Phrase Names
    • BNF
    • self
    • pretty

Notes

The origin of the idea is a undergraduate thesis (UC Santa Cruz, 1978) written by Doug Michels under the supervsion of Bill McKeeman.

The title is inspired by: Guy Steele's 1998 OOPSLA talk Growing a Language.

Thanks to Steve Johnson for critical advice in the preparation of this presentation.

The default font sizes in Firefox are uncomfortably large for this paper. Try [view][edit][zoom][text only][zoom out][zoom out].

References

Signatures

  • Bill McKeeman , MathWorks Fellow
  • Lu He, Computer Science Department, Dartmouth

An earlier version was presented to the Computer Science Colloquium, Stanford, March 4, 2009

ComPiler200002:Growing a Compiler的更多相关文章

  1. Eclipse编译Android项目时出现的问题:Android requires compiler compliance level 5.0 or 6.0. Found '1.8' instead.

    Consle: Android requires compiler compliance level 5.0 or 6.0. Found '1.8' instead. Please use Andro ...

  2. Maven错误:[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?的解决方法

    错误: [ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather tha ...

  3. myeclipse 报错:Set project compiler compliance settings to '1.5'

    myeclipse 报错:Set project compiler compliance settings to '1.5' 解决方法:项目右击-->properties-->java c ...

  4. Thrift报错:Error: Thrift compiler: Failed to translate files. Error: Cannot run program thrift error=2

    文章目录 报错: 原因: 解决: 报错: Error: Thrift compiler: Failed to translate files. Error: Cannot run program th ...

  5. 导入项目报错:Type Java compiler level does not match the version

    1,导入项目报错一般是因为缺少jar包或者是jar包冲突 2,导入的jar包版本问题 3,环境需要重新修改,比如build path 中重新add libararies 遇到这种compiler环境问 ...

  6. 给阿里云主机添加swap分区,解决问题:c++: internal compiler error: Killed (program cc1plus)

    前言 今天安装spdlog,一个快速得C++日志库,按照文档步骤,不料出现了一堆错误,像c++: internal compiler error: Killed (program cc1plus)等一 ...

  7. caffe-ssd编译runtest时候报错:g++: internal compiler error: Killed (program cc1plus)

    大哥,你的内存不够了,删点儿东西吧

  8. Device Tree(二):基本概念

    转自:http://www.wowotech.net/linux_kenrel/dt_basic_concept.html 一.前言 一些背景知识(例如:为何要引入Device Tree,这个机制是用 ...

  9. .NET跨平台:在Linux Ubuntu上编译coreclr/corefx/dnx(20150617)

    编译时间:北京2015年6月17日上午 操作系统:Ubuntu 14.04.2 LTS Mono版本:Mono JIT compiler version 4.3.0 (master/3445ac5 T ...

  10. Java:Remote Debug

    Java  Remote Debug -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,add ...

随机推荐

  1. linux移植问题记录

    问题一 ~/linux/linux-5.2.8$ make s3c2410_defconfig  HOSTCC  scripts/basic/fixdep/bin/sh: 1: scripts/bas ...

  2. 面向对象程序设计A第一次blog

    一.前言 第一次题目集总结-- 题量:较多 难度:较低 知识点: 简单的输入输出 一些简单的运算和类型转换 一些简单的循环.选择.字符串.数组的使用 总结:题目比较简单,题量较多,内容就是一些简单的输 ...

  3. python 获取docker容器内存使用率

    # -*- encoding: utf-8 -*- from subprocess import Popen, PIPE, STDOUTimport time def Run_Cmd(cmd): # ...

  4. 单个Java文件连接数据库demo

      在单个java文件中,尝试连接数据库,跟python的模块包安装方式很接近,已经测试成功,把博客写一下,记录下来.   首先把jdb的驱动包下载下来,就是一个jar包,下面是官网下载地址 官网下载 ...

  5. Windows2016安装.NetFramework 3.5

    Windows2016安装.NetFramework 3.5 Windows2016服务器默认安装的是 .Net 4.6.2版本,但是有时候我们经常会需要用到.Net 3.5版本.以下介绍的是在线和离 ...

  6. SQL server自动创建日历表。

    做日报功能需要统计每个月的上班天数,节假日因为每年的日期都不一样,所以需要自己手动更新这些节假日 1:首先先自动创建一个日历表,选择开始年月日和结束的年月日 不要同时执行,先执行创建表之后CREATE ...

  7. Java程序(数组扩容的尝试)

    import java.util.Scanner; public class ArrayAdd { public static void main(String[] args) { int arr[] ...

  8. 【Linux】从零开始学Linux -01

    总结自<鸟哥的linux私房菜> BIOS与BootLoader 一般而言,对于嵌入式系统,BootLoader是写在flash上,开机运行的最底层的引导软件,初始化主板的基本设置,为接收 ...

  9. react native 布局问题

    1. Text组件里面的 文字垂直居中 <Text style={styles.confirmButtonStyle}>确认</Text> confirmButtonStyle ...

  10. unity简单物理系统

    目录 技术概述 技术详述 2D物理系统组件 刚体 碰撞器 物理材质 碰撞检测函数 在主角中的使用 移动 长跳跃与短跳跃 二段跳 攀爬(蹬墙跳) 技术使用中遇到的问题和解决过程 技术概述 物理系统,就是 ...