liwei606 / c2java Goto Github PK
View Code? Open in Web Editor NEWA translator of c to java.
A translator of c to java.
Hi! Hi have Ubuntu 14.04 and in order to make the project I needed to install bison and flex.
I solved with the following:
bison:
wget http://launchpadlibrarian.net/140087283/libbison-dev_2.7.1.dfsg-1_amd64.deb
wget http://launchpadlibrarian.net/140087282/bison_2.7.1.dfsg-1_amd64.deb
dpkg -i libbison-dev_2.7.1.dfsg-1_amd64.deb
dpkg -i bison_2.7.1.dfsg-1_amd64.deb
From: here
flex:
sudo apt-get install flex
Then after the make I obtained:
make
cd src && bison -d c2java.y && flex c2java.l
c2java.y: conflicts: 1 shift/reduce
cc -o c2java src/translate_ast.c src/main.c src/ast.c src/print_ast.c src/check_ast.c src/c2java.tab.c -g -std=c99
/tmp/ccbAEyMj.o: In function
yyparse':
/home/eracle/git/c2java/c2java.tab.c:1565: undefined reference to yylex'
collect2: error: ld returned 1 exit status
make: *** [c2java] Error 1
Then after the make c2java I obtained:
make c2java
cd src && bison -d c2java.y && flex c2java.l
c2java.y: conflicts: 1 shift/reduce
cc -o c2java src/translate_ast.c src/main.c src/ast.c src/print_ast.c src/check_ast.c src/c2java.tab.c src/lex.yy.c -g -std=c99
lex.yy.c: In function ‘yy_init_buffer’:
lex.yy.c:1710:9: warning: implicit declaration of function ‘fileno’ [-Wimplicit-function-declaration]
Then tests gone:
make test
./runtest.sh
Testing euclid data/0 ...
Testing euclid data/1 ...
Testing euclid data/2 ...
Testing fib data/0 ...
Testing fib data/1 ...
Testing fib data/2 ...
Testing naive_io data/0 ...
Testing naive_io data/1 ...
Testing naive_io data/2 ...
Testing naive_io data/3 ...
Testing naive_io data/4 ...
Testing queen data/0 ...
Testing queen data/1 ...
Testing queen data/2 ...
Testing queen data/3 ...
Testing queen data/4 ...
Testing struct data/0 ...
Testing struct data/1 ...
Testing test data/1 ...
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.