Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/marcosspessatto/compiler
- Owner: MarcosSpessatto
- Created: 2016-12-06T16:03:04.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2016-12-09T01:12:05.000Z (almost 8 years ago)
- Last Synced: 2024-04-28T05:17:13.818Z (6 months ago)
- Topics: compiler, java, jflex, lexical-analysis, parser
- Language: Yacc
- Homepage:
- Size: 4.88 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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 mediase (i=2) {
i<-3
}
total<-0
i<-0enquanto (i (numero2 * (numero1 / 2.0))){
escrever("Entrou no if." + numero1 + "" + numero2)
} senao {
escrever("Entrou no else.")
}_
}
}