Catalog · How the catalog works
compiler
The Compiler Principles, 2017 Fall.
- ★ 2 on GitHub
Anyone may press Interesting, signed in or not. It helps others find this project.
README
LICENSE:
Copyright (c) 2017 XiangChen
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Introduction:
This repository maintains the coding tasks of "Compiler Principles", FZU, 2017 Fall.
The basic of this repository is a compiler for Pascal language. We make some efforts
on accommodating to the additional requirements of this experiment, including:
Lexer:
* 1.Analysing specific integer number, such as Oct, Bin, Hex.
* 2.Warning if an integer is bigger than 2^31;
* 3.Analysing type "string".
Grammatical Analysis:
* Based on the subset of "grammar.txt", create the SLR(1) analyse table;
* Output the error to assigned log file;
* Print the processing messages during analysing statements, including the
contents of stack and applied actions.
* Append:
* Grammar of "Grammatical Analysis": grammar/parser_tasks/grammar.txt
* Test data: slr1_tests/given_example.pas
IR Generating:
* Based on the subset of "grammar.txt", create the SLR(1) analyse table;
* Output the error to assigned log file;
* Print the processing messages during analysing statements, including the
contents of stack and applied actions;
* Write the SDD of given grammar;
* Generate the corresponding TAC(Three Address Code) based on SDD.
* Append:
* Grammar of "IR Generating": grammar/ir_tasks/grammar.txt
* Test data: ir_tests/example.pas
Running our demonstration:
* See ROADMAP for details.
References:
* [1]Wikipedia: https://en.wikipedia.org/wiki/Pascal_%28programming_language%29
* [2]Pascal-Interpreter: https://github.com/kevallakhani95/Pascal-Interpreter/
* [3]P4-HLIR: https://github.com/p4lang/p4-hlir
Author: Wasdns, syayao, Wowkiee.
Any issues:
* Please notice that we are not responsible for answering your issues.
We will not answer the questions like "how to ...", however, if you have
some issues/suggestions on code/directory organization or are willing to
donate your efforts to this project, welcome to mail the following address.
* Wasdns: wasdnsxchen@gmail.com
