Lolcode Execution

read the Project instructions document and rest other attachments are part of my Assignment 1 which we need to build it from there

In this project, you will develop a minimalistic compiler for a procedural programming language. You will build on the work you did in Assignment 1 and will create compiler that accepts a nontrivial subset of LOLCODE programming language: http://www.lolcode.org/

This assignment is worth 200 points, and covers two areas: syntax-directed translation, and code generation. There are 2 stages of the project, each worth 100 points:

1) Grammar and intermediate representation. Language specification is described here:

https://github.com/justinmeza/lolcode-spec/blob/master/v1.2/lolcode-spec-v1.2.md

a. Using your LOLCALC Bison grammar specification as a starting point, extend the grammar to properly recognize valid LOLCODE programs. Minor deviations are OK (eg., I would not deduct points if you do not handle comments). The grammar should be complete enough that your language subset is (1) proper LOLCODE and (2) sufficient to write nontrivial programs

b. Create a data structure for a rudimentary Abstract Syntax Tree (AST), or possibly another intermediate representation, and add code to your program to construct it. At this point, do not worry too much about having all the attributes for subsequent code generation.

c. Submit your project to Blackboard. Due date is November 8, 2021

  1. Extend your project to generate working low-level code for programs. Code should be capable of execution directly or in a simulator. Due date: November 30, 2021

For syntax-directed translation, pick an intermediate representation that you see fit (such as an Abstract Syntax Tree). For code generation, output should be into a real low-level language: MIPS assembly code that run on the SPIM simulator; JVM code, LLVM assembly, or Knuth’s MIX code using appropriate emulator. Translations to another high-level language (C, JavaScript, etc.) won’t be accepted.

Submissions will be graded on how complete your implementation is. Approximate points allocation is (for info purposes only):

Accept relevant syntax and construct valid AST or another IR – 40 %.

Construct and output a valid Symbol Table – 30 %.

Generate code for variable declarations (NUMBER type) – 20 %

Generate code for expressions – 20 %

Generate code for Conditional statements – 20 %

Generate code for loops – 20 %.

Generate code for input/output (VISIBLE/GIMMEH) and string constants – 20 %.

Generate code for procedures – 20 %

Generate code for additional language features (YARN type, TROOF type, type casting, local variable scope etc.) – 10 %. each.

Optimizations – 10-50 %.

Clear report accompanying submission – 20 %.

Features above the minimum workable language subset can earn points above 100%; these points are extra credit.

Note: you should work on assignment on your own. Sharing code with other students is not allowed. Using code from the Internet is allowed and encouraged; however, you must show your significant efforts to build upon the code you downloaded, respect copyright (if code is not in public domain), and give proper referencing.

Resources:

  1. LOLCODE: http://www.lolcode.org/
  2. Run LOLCODE online: https://www.tutorialspoint.com/execute_lolcode_online.php
  3. FLEX reference: ftp://ftp.gnu.org/old-gnu/Manuals/flex-2.5.4/html_mono/flex.html
  4. BISON reference: https://www.gnu.org/software/bison/manual/

A book on BISON and FLEX is available at http://web.iitd.ac.in/~sumeet/flex__bison.pdf

  1. Using SPIM with Modern Compiler Implementation – https://www.cs.princeton.edu/~appel/modern/spim/ .
  2. Assemblers, Linkers, and the SPIM simulator – on Blackboard
  3. https://busy.org/@drifter1 (scroll down to see his “Writing a simple Compiler on my own” tutorial series, which links to GitHub with code samples).

Calculate the price of your order

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
$26
The price is based on these factors:
Academic level
Number of pages
Urgency
Basic features
  • Free title page and bibliography
  • Unlimited revisions
  • Plagiarism-free guarantee
  • Money-back guarantee
  • 24/7 support
On-demand options
  • Writer’s samples
  • Part-by-part delivery
  • Overnight delivery
  • Copies of used sources
  • Expert Proofreading
Paper format
  • 275 words per page
  • 12 pt Arial/Times New Roman
  • Double line spacing
  • Any citation style (APA, MLA, Chicago/Turabian, Harvard)

Benefits of our college essay writing service

  • 80+ disciplines

    Buy an essay in any subject you find difficult—we’ll have a specialist in it ready

  • 4-hour deadlines

    Ask for help with your most urgent short tasks—we can complete them in 4 hours!

  • Free revision

    Get your paper revised for free if it doesn’t meet your instructions.

  • 24/7 support

    Contact us anytime if you need help with your essay

  • Custom formatting

    APA, MLA, Chicago—we can use any formatting style you need.

  • Plagiarism check

    Get a paper that’s fully original and checked for plagiarism

What the numbers say?

  • 527
    writers active
  • 9.5 out of 10
    current average quality score
  • 98.40%
    of orders delivered on time
error: