编程语言实现模式

  • f6_484085
    了解作者
  • 2.9MB
    文件大小
  • zip
    文件格式
  • 0
    收藏次数
  • VIP专享
    资源类型
  • 0
    下载次数
  • 2022-04-28 01:32
    上传日期
NULL 博文链接:https://guanping1.iteye.com/blog/2028801
tpdsl-code.zip
  • code
  • semantics
  • safety
  • GlobalScope.java
    555B
  • MethodSymbol.java
    881B
  • Def.g
    3.5KB
  • CymbolErrorNode.java
    1.1KB
  • Scope.java
    754B
  • t.cymbol
    671B
  • SymbolTable.java
    11.8KB
  • Def.java
    30.7KB
  • Test.java
    4.8KB
  • Types.java
    43.8KB
  • Type.java
    548B
  • CymbolLexer.java
    47.1KB
  • ScopedSymbol.java
    1.6KB
  • ClassSymbol.java
    1.7KB
  • LocalScope.java
    570B
  • VariableSymbol.java
    597B
  • Types.g
    2.6KB
  • BuiltInTypeSymbol.java
    801B
  • Symbol.java
    1.1KB
  • u.cymbol
    340B
  • CymbolListener.java
    517B
  • build.xml
    1.1KB
  • Cymbol.g
    3.4KB
  • StructSymbol.java
    1.1KB
  • BaseScope.java
    1.2KB
  • CymbolAST.java
    1.4KB
  • ArrayType.java
    716B
  • CymbolParser.java
    169KB
  • types
  • GlobalScope.java
    555B
  • MethodSymbol.java
    881B
  • Def.g
    3.4KB
  • CymbolErrorNode.java
    1.1KB
  • Scope.java
    754B
  • t.cymbol
    175B
  • SymbolTable.java
    3.1KB
  • Def.java
    30.6KB
  • Test.java
    3.3KB
  • Types.java
    33.9KB
  • Type.java
    548B
  • CymbolLexer.java
    47KB
  • ScopedSymbol.java
    1.6KB
  • ClassSymbol.java
    1.7KB
  • LocalScope.java
    570B
  • VariableSymbol.java
    597B
  • Types.g
    2.5KB
  • BuiltInTypeSymbol.java
    801B
  • Symbol.java
    1.1KB
  • CymbolListener.java
    517B
  • build.xml
    1KB
  • Cymbol.g
    3.4KB
  • StructSymbol.java
    1.1KB
  • BaseScope.java
    1.2KB
  • CymbolAST.java
    1.1KB
  • ArrayType.java
    716B
  • CymbolParser.java
    168.8KB
  • oo
  • GlobalScope.java
    555B
  • MethodSymbol.java
    881B
  • Def.g
    3.8KB
  • CymbolErrorNode.java
    1.1KB
  • Scope.java
    754B
  • t.cymbol
    740B
  • SymbolTable.java
    12.1KB
  • Def.java
    31.5KB
  • Test.java
    4.8KB
  • Types.java
    43.2KB
  • Type.java
    595B
  • CymbolLexer.java
    49KB
  • ScopedSymbol.java
    1.6KB
  • ClassSymbol.java
    2.2KB
  • LocalScope.java
    570B
  • w.cymbol
    100B
  • VariableSymbol.java
    597B
  • Types.g
    2.6KB
  • BuiltInTypeSymbol.java
    870B
  • Symbol.java
    1.1KB
  • u.cymbol
    301B
  • PointerType.java
    1.9KB
  • CymbolListener.java
    517B
  • build.xml
    1.3KB
  • Cymbol.g
    4.2KB
  • BaseScope.java
    1.2KB
  • CymbolAST.java
    1.4KB
  • v.cymbol
    71B
  • CymbolParser.java
    187.1KB
  • promote
  • GlobalScope.java
    555B
  • MethodSymbol.java
    881B
  • Def.g
    3.5KB
  • CymbolErrorNode.java
    1.1KB
  • Scope.java
    754B
  • t.cymbol
    338B
  • SymbolTable.java
    8KB
  • Def.java
    30.7KB
  • Test.java
    4.7KB
  • Types.java
    41.4KB
内容介绍
This directory contains the source code for the Language Implementation Patterns book. Feel free to change the sources and experiment! Here's a description of what you'll find: README.txt This file antlr-3.2.jar ANTLR 3.2 with ANTLR 2.7.7 and StringTemplate 3.2.1 stringtemplate-3.2.1.jar build-macros.xml ANT related files (see below) build.properties build.xml These are the code subdirectories for the individual chapters (some of the directories contain code for multiple chapters): parsing IR walking symtab semantics interp trans Here's a sample of how to build and run the register-based bytecode interpreter manually (using the uber antlr-3.2.jar): $ cd code/interp/reg $ java -cp ../../antlr-3.2.jar org.antlr.Tool Assembler.g $ javac -cp ../../antlr-3.2.jar *.java $ java -cp .:../../antlr-3.2.jar Interpreter t.rcode 9 $ If you put the jar into your CLASSPATH (from unix), life is much easier: $ export CLASSPATH="$CLASSPATH:/full-path-to-book/code/antlr-3.2.jar" $ java org.antlr.Tool Assembler.g $ javac *.java $ java Interpreter t.rcode 9 $ Enjoy! Terence Parr, September 2009 ------------------------------------------------------------------------- How to use Ant to build the code samples for this book By Martijn Reuvers -- Ant files and this description (http://www.javalid.org to add validatation to your java objects) All source code can be compiled, generated and executed using a few Ant commands. To get Ant: Download it from http://ant.apache.org and follow the instructions on how to install it. Make sure that your JAVA_HOME points at least to a JDK 1.5 or newer installation. Commands available: ant clean -> Cleans entire project ant generate -> Generates all antlr source files (based on the grammars) ant compile -> Compiles everything (and generates) ant run -> Executes all tests that Terence wrote (and compiles and generates) Each of these commands can be executed from *any* directory, when run in the root it for instance compiles all projects. You can also run it from e.g. sub-directory tree where it will compile all sub-projects of the tree directory. Finally you can run all commands in each specific project, for example inside tree/asm.
评论
    相关推荐