Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/marcosspessatto/compiler

Transpiler from CT language to Java
https://github.com/marcosspessatto/compiler

compiler java jflex lexical-analysis parser

Last synced: about 9 hours ago
JSON representation

Transpiler from CT language to Java

Awesome Lists containing this project

README

        

# Transpiler from CT language to Java

Transpiler written using (Jflex and Byacc/J) , for academic purposes of computer science course.

#**RUN**
jflex LexicalAnalyzer.flex

yacc -J Parser.y

javac *.java

java Parser file

####Syntax of Ct Language
// Programa de teste da Linguagem CT

// Declaracao de Classes

classe Aluno {

inteiro num, num_notas

vetor inteiro notas[30]

// funcoes da classe aluno

real media()
{
inteiro total, i
real media

se (i=2) {
i<-3
}
total<-0
i<-0

enquanto (i (numero2 * (numero1 / 2.0))){
escrever("Entrou no if." + numero1 + "" + numero2)
} senao {
escrever("Entrou no else.")
}

_

}
}