Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C syntax checker using Java [closed]

Tags:

java

c

syntax

For my java project I need to check a code written in C for errors and syntax ... Is there any API or anyother Java implementation of C syntax and error checker?

like image 833
Sai Sunder Avatar asked Jul 12 '26 14:07

Sai Sunder


2 Answers

You could invoke a C compiler in Java and parse the results.

An alternative could be Ideone.com, since they offer an API.

What is ideone? Ideone is something more than a pastebin; it's an online compiler and debugging tool which allows to compile and run code online in more than 40 programming languages.

like image 177
Konrad Reiche Avatar answered Jul 15 '26 04:07

Konrad Reiche


That's pretty broad, but it looks like antlr might be the tool you need. There's a load of grammars available, including one for C.

like image 28
fvu Avatar answered Jul 15 '26 03:07

fvu



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!