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. 解决Idea 中Java编译器的版本自动变成1.5的问题

    可在pom文件中加入以下配置: <build> <plugins> <plugin> <groupId>org.apache.maven.plugins ...

  2. Iperf参数详解

    IperfIperf是一个网络性能测试工具,可以测试TCP和UDP最大带宽,具有多种参数和UDP特性,可以根据需要调整,报告带宽,延迟,数据包丢失 通用参数-b(bandwidth):指定UDP模式使 ...

  3. web基础(5): CSS3介绍

    chapter5 CSS3 新性能 (一)圆角边框与阴影 1.border-radius属性 例1 border-top-left-radius:40px 20px ; 两个值分别表示水平方向.垂直方 ...

  4. Excel VBA实例

    有个朋友让帮忙看下excel数据怎么处理,初步一看有点复杂,难以下手.进一步分析.搜索,发现VBA可以很好地解决这个问题,总结记录一下. 问题描述:如下图,有N个sheet,每个sheet记录了一个公 ...

  5. Mac上好用的app们

    记录下自己在mac上用的一些很不错的app,大多免费. 排名随缘. 不定期更新. Amphetamine 来源 AppStore 说明 欢迎使用Amphetamine,一款为macOS打造的最棒的防睡 ...

  6. Win10 U盘不自动显示

    Win+R,在窗口中输入 命令services.msc,然后点击确定按钮:这时就会打开Windows10的服务列表,在列表中找到Plug and Play服务项.双击后看一下该服务是否启动,先停止,然 ...

  7. SpringMVC学习day03

    第1个springmvc程序 这是根据狂神说视频和资料学习的,用于加强自己的记忆 入门学习 1. 步骤: 1.新建一个Moudle , springmvc-02-hello , 添加web的支持! 2 ...

  8. vue 3 引入 scss

    安装必要的依赖: 调用: 效果:

  9. jboss单机环境搭建

    1.操作系统:centos7 2.需要的包:apache,wildfly,postgres(要初始化),activemq 3.安装流程: 一.安装依赖包并部署服务:httpd,wildfly,mq,p ...

  10. 【java数据结构与算法】直接戳中"希尔排序"要点,学不会你打我~

    希尔排序: 也叫增量递减排序 是插入排序的优化,分组+排序 Get到重点,那么我们开剖析一下 结合图表和代码,总结如下~public class ShellSort { public static v ...