Giter VIP home page Giter VIP logo

tiny_scanner_parser's Introduction

TINY Language Scanner and Parser

  • A program in TINY has a very simple structure:
    • it is just a sequence of statements separated by semicolons.
    • There are no procedures and no declarations.
    • All variables are integer variables, and variables are declared simply by assigning values to them.
  • There are only two control statements:
    • an if-statement and a repeat-statement.
    • Both control statements may themselves contain statement sequences.
    • An if-statement has an optional else part and must be terminated by the keyword end.
    • There are also read and write statements that perform input/output.
  • Comments are allowed within curly brackets; comments cannot be nested.
  • Expressions in TINY are also limited to Boolean and integer arithmetic expressions.
    • A Boolean expression consists of a comparison of two arithmetic expressions using either of the two comparison operators < and =.
    • An arithmetic expression may involve integer constants, variables, parentheses, and any of the four integer operators +, -, * and /(integer division), with the usual mathematical properties.
    • Boolean expressions may appear only as tests in control statements-there are no Boolean variables, assignment, or I/O.

  • From the book Compiler Construction: Principles and Practice (1997) by Kenneth C. Louden

TINY Scanner

TINY Parser


Usage

  1. Compile using either the Makefile or included batch file run.bat
  2. Open GUI.exe

tiny_scanner_parser's People

Contributors

zelmoghazy avatar

Watchers

 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.