martinezlucas98 / java2cpp Goto Github PK
View Code? Open in Web Editor NEWFLEX & BISON Java to C++ translator. NOTICE: it is still under development.
License: Apache License 2.0
FLEX & BISON Java to C++ translator. NOTICE: it is still under development.
License: Apache License 2.0
Implement Syntax Error
Description:
An error message must be printed when a syntax error occurs.
For now we will implement Panic-Mode Error Recovery. This can be upgraded in the future.
Print function grammar
Description:
The most common function is the print function, this is a MUST HAVE for any translator.
The following grammars must be added:
System.out.println(expr);
----->std::cout << expr << std::endl;
System.out.print(expr);
----->std::cout << expr ;
Text input function grammar
Description:
The following translations are needed and must be added:
Scanner my_input = new Scanner(System.in);
----->string my_input; std::cin >> my_input;
my_input = new Scanner(System.in);
----->std::cin >> my_input;
Required support for Java declarations:
Full support for the for loop
Description:
java2cpp translator does not support for loop grammar at the moment. This grammar must be implemented.
The followings must be implemented:
- 1. Classic C style for loop
- 2. For-each loop
Implement while and do while
Description:
The translator has no grammar for the while and do-while loops. These are major features that must be added.
The followings must be implemented:
- 1. while loop grammar
- 2. do while loop grammar
Implement symbol table and "variable not declared" error
Description:
An error message must be printed when a "variable not declared" or "variable not declared in scope" error occurs.
For now we will implement Panic-Mode Error Recovery. This can be upgraded in the future.
Title
Description:
A clear description of the issue.
Describe the solution you'd like.
Describe alternatives you've considered.
Additional context:
Add any other context or screenshots about the feature request here.
Full support for the if-else statement
Description:
java2cpp translator does not support if-else grammar at the moment. This grammar must be implemented.
The followings must be implemented:
- 1. if-else grammar
- 2. if-else if grammar
- 3. if-else if - else grammar
- 4. Embedded if-else statements
Title
Description:
A clear description of the issue.
Describe the solution you'd like.
Describe alternatives you've considered.
Additional context:
Add any other context or screenshots about the feature request here.
Implement Type Error
Description:
An error message must be printed when a type error occurs.
For now we will implement Panic-Mode Error Recovery. This can be upgraded in the future.
No impirmir el codigo, sino guardar en un archivo
Bug: variables are printed within [ ]
Description:
When a variable is detected as part of an expression it is printed within [ ]
To Reproduce:
Steps to reproduce the behavior:
public class Main {
public static void main(String[] args) {
int a =3+6;
int b = a+2;
}
}
int main(int argc, char **argv){
int a = 3+6;
int b = [a]+2;
}
Expected behavior:
The translation should be:
int main(int argc, char **argv){
int a = 3+6;
int b = a+2;
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.