There are two versions of assignments(Java or C++) for the CS143-Compiler course, this repo is my Java-version solution.

Overview

Intro

There are two versions of assignments(Java or C++) for the CS143-Compiler course, this repo is my Java-version solution.

Course resources:

  • This course is available in bilibili.

  • You can download the student-dist in edx.org.

Here are my notes:

PA

PA2J

This assignment is to write a lexical analyser for COOL, using jlex(Java).

By the way, the jlex framework is a bit outdated, you can install jflex to replace it:

> brew install jfelx
> apt-get install jfelx

Generate lexer:

> jflex --jlex cool.lex
> make lexer
> make dotest

To test if the lexer generated works, you can run diff.sh which compares the output of our own lexer and the standard lexer(./bin/lexer) with all cool files in ./examples as input:

> ./diff.sh
You might also like...

Feature Flags for Java made easy

Feature Flags for Java made easy

✨ ✨ ✨ FF4J - Feature Flipping for Java ✨ ✨ ✨ FF4j, is an implementation of the Feature Toggle pattern. 🤘 Features Feature Toggle: Enable. and disable

Dec 25, 2022

A Java to iOS Objective-C translation tool and runtime.

J2ObjC: Java to Objective-C Translator and Runtime Project site: https://j2objc.org J2ObjC blog: https://j2objc.blogspot.com Questions and discussion:

Dec 29, 2022

Make Slack and Facebook Bots in Java.

Make Slack and Facebook Bots in Java.

JBot Make bots in Java. JBot is a java framework (inspired by Howdyai's Botkit) to make Slack and Facebook bots in minutes. It provides all the boiler

Dec 18, 2022

An in-memory file system for Java 7+

Jimfs Jimfs is an in-memory file system for Java 7 and above, implementing the java.nio.file abstract file system APIs. Getting started The latest rel

Jan 3, 2023

API gateway for REST and SOAP written in Java.

Membrane Service Proxy Reverse HTTP proxy (framework) written in Java, that can be used as an API gateway as a security proxy for HTTP based integrati

Dec 31, 2022

A lightweight, simple FTP server. Pure Java, no dependencies.

MinimalFTP A lightweight, simple FTP server. Pure Java, no libraries. Features Although it's named "minimal", it supports a bunch of features: 100% Ja

Jan 5, 2023

Detect uses of legacy Java APIs

Modernizer Maven Plugin Modernizer Maven Plugin detects uses of legacy APIs which modern Java versions supersede. These modern APIs are often more per

Dec 12, 2022

A lightweight command processing pipeline ❍ ⇢ ❍ ⇢ ❍ for your Java awesome app.

PipelinR PipelinR is a lightweight command processing pipeline ❍ ⇢ ❍ ⇢ ❍ for your awesome Java app. PipelinR has been battle-proven on production, as

Jan 8, 2023

An extensible Java framework for building XML and non-XML streaming applications

Smooks Framework This is the Git source code repository for the Smooks Project. Build Status Building Pre-requisites JDK 8 Apache Maven 3.2.x Maven gi

Dec 1, 2022
Owner
F4DE
sleeping...
F4DE
Java serialization library, proto compiler, code generator

A java serialization library with built-in support for forward-backward compatibility (schema evolution) and validation. efficient, both in speed and

protostuff 1.9k Dec 23, 2022
Java version a* pathfinding algoritm

This respatory contains java versions of various pathfinding scripts all written by me. You are free to use them as long as credit is given.

null 1 Feb 20, 2022
A basic implementation of a Ray Tracer that has been developed for the course GFX

This is a basic implementation of a Ray Tracer that has been developed for the course "GFX - Foundations of Computer Graphics" at the University of Vienna.

null 2 Mar 4, 2022
A template repo for a command style robot

Phil A template repo for a command style robot. To Use Click Use this template in GitHub and create your new repository using the Phil template.

StuyPulse 3 Dec 15, 2022
Modern Java - A Guide to Java 8

Modern Java - A Guide to Java 8 This article was originally posted on my blog. You should also read my Java 11 Tutorial (including new language and AP

Benjamin Winterberg 16.1k Jan 5, 2023
icecream-java is a Java port of the icecream library for Python.

icecream-java is a Java port of the icecream library for Python.

Akshay Thakare 20 Apr 7, 2022
JPassport works like Java Native Access (JNA) but uses the Foreign Linker API instead of JNI. Similar to JNA, you declare a Java interface that is bound to the external C library using method names.

JPassport works like Java Native Access (JNA) but uses the Foreign Linker API instead of JNI. Similar to JNA, you declare a Java interface t

null 28 Dec 30, 2022
From Java To Kotlin - Your Cheat Sheet For Java To Kotlin

From Java To Kotlin From Java To Kotlin - Your Cheat Sheet For Java To Kotlin 中文支持 Português Español Print to Console Java System.out.print("Amit Shek

MindOrks 5.8k Dec 29, 2022
Ultra-fast SQL-like queries on Java collections

CQEngine - Collection Query Engine CQEngine – Collection Query Engine – is a high-performance Java collection which can be searched with SQL-like quer

Niall Gallagher 1.6k Dec 30, 2022
Design patterns implemented in Java

Design patterns implemented in Java Read in different language : CN, KR, FR, TR, AR Introduction Design patterns are the best formalized practices a p

Ilkka Seppälä 79k Dec 31, 2022