Giter Site home page Giter Site logo

compiler_platypus-2.0's People

Contributors

ryanlararr avatar

Watchers

 avatar

compiler_platypus-2.0's Issues

a3-1.2 Syntactic Grammar

To build a Recursive Descent Predictive Parser (RDPP) the syntactical part of the PLATYPUS 2.0 Grammar needs to be modified from LR grammar to LL grammar suitable for RDPP.
Left recursion must be eliminated and left factoring applied when necessary.

After grammar transformation, the FIRST set for each of the grammar productions must be built.
The final FIRST set must contain only terminals (tokens).
The elements of the set must be unique.

  • Do not remove the original productions. Write transformed productions below the original productions and indicate the type of transformation applied.

  • Include only the grammar productions.

  • Entire syntactic grammar and corresponding FIRST sets written.

L14 Final Test Parser

December 12, 2020 11:59pm

Demonstrate the completed development of the Parser.
All non-terminal functions should be implemented with solved left-recursion and left-factoring.

  • Output using a3r.pls matches a3r.sout

a3-3.1 Semantic Analysis

Optional implementation of semantic analysis in the parser.

The PLATYPUS language specification stipulates that by default, the type of a variable is defined by the first and last symbol of the variable identifier.

Implementation of semantic analysis is through the definition of values for some specific tokens.

For example:
AVID = integer or float
SVID = string

With this, it will be required to modify scanner.c and determine the type of variable during the scanning process.
The flags variable in AdditionalVidTokenAttributes stores the new variable types.

  • Initial parser fully completed
  • Documentation of the implementation
  • Test files with proof of working implementation

a3-2.3 Parser Implementation

Build the RDPP

Associated labs:

  • #3 Minimal Test Parser
  • #4 Final Test Parser

Complete the parser.h file (TODO Issue)
Complete the parser.c file (TODO Issue)

L13 Minimal Test Parser

Due December 5th 11:59pm

Demonstrate that the input of a3e.pls matches a3e.sout.
Not all the non-terminal functions need to be created for the minimal test implementation - only the basic functions for an empty Platypus program.

  • Steps 01 to 13 in the A3 specification will be used for the minimal test implementation.

  • a3e.pls test only

  • a3e.pls matches a3e.sout

Scanner Logical Operator Error

The scanner does not handle logical operator tokens as well as relational operator tokens as shown in a202r.sout differences.

image
image

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.