Coder Social home page Coder Social logo

pl0-compiler's Introduction

PL0-compiler

bin文件夹下面是生成的程序compiler 以及输出的文件输出的结果文件等 不过在windows没法运行

文件夹 src下面是源程序 main.c 是主程序 调用scanner.h parser.h vm.h 里边声明的函数进行语法分析 词法分析 语义分析(这个做的不多)还有代码生成

glodef.h 声明了一些常量量 全局变量 以及对scanner.h parser.h vm.h将要定义的函数进行声明

scanner.h 词法分析部分 将pl0程序(bin文件夹下面的input.txt)读入 进行词法分析 并生成词法分析结果 scanout.txt

parser.h 进行语法分析 语义分析 以及代码生成 读入scanout.txt 输出 parserout.txt(语法分析结果)以及 genout.txt(代码)

vm.h 将genout.txt 读入 在一个堆栈中存储变量 在模拟机器运行

pl0-compiler's People

Contributors

dp9u0 avatar

Stargazers

Eason Wang avatar

Watchers

James Cloos avatar Friedhold Matz avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.