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

最新文章

  1. Joomla
  2. php 正则匹配中文(转)
  3. 网络数据包收发流程(二):不配置NAPI的情况
  4. Simplified CommonJS wrapper 与 AMD 标准定义模块差异
  5. SignalR —— Asp.net RealTime的春天
  6. 关于ibatis进行物理游标分页
  7. Composer生成PHP依赖包
  8. Extjs 树节点操作常用属性
  9. 基于三台主机部署phpwind
  10. SQL Server 中字段的精度问题
  11. JAVA常用API的总结(2)
  12. python3 第二十八章 - 内置函数之List相关
  13. Javascript中表达式和语句的区别
  14. Cherry.chen window.clipboardData实现剪切板操作总结 (好像只有ie好用)
  15. SPOJ 1812 LCS2
  16. js根据鼠标和键盘判断页面是否长时间未进行操作
  17. Gitlab 赋予某台机器git clone的权限 Deploy key
  18. 问题解决 -------- 解决YUM下Loaded plugins: fastestmirror Determining fastest mirrors 的问题
  19. python多进程(三)
  20. shell 按行读取文件

热门文章

  1. 如何利用fooview实现钉钉自动打卡
  2. kafak学习总结
  3. Cinder 对接本地LVM存储
  4. Java 复习篇2---jdk
  5. spider_爬取斗图啦所有表情包(图片保存)
  6. ENGG1310 Electricity and electronics P1.2 Electronic Communication
  7. python 小顶堆
  8. 图片上传插件WebUploader的坑
  9. 在C#中Release与Debug的区别小案例
  10. SQL Server修改表的时候出现错误:未更新任何行,未删除任何行