Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
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?
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.
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.
Real answer:
i used to do something liek this a few years ago... basically you need JFlex and CUP or some form of a scanner/parser combo.
take a look, i don't think i have the finished thing uploaded but you can take it from there... http://code.google.com/p/javamicko/
Coco/R[1] is a LL1 compiler generator available in Java.
You can define a language by your own (tokens + syntax) and parse/check a given input.
[1] http://ssw.jku.at/Coco/
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I am searching for an up-to-date java2html tool, which supports Java 8. In the past I used java2html.com which created created really useful HTML code. However, I am in trouble now, because this tool not even supports Java 7 language constructs, not mentioning Java 8. If you know any similar standalone tool, which not only transfers the Java code to HTML, but also generates a browser and even it is a piece of cake to integrate it with Ant/Maven/Gradle, please let me know.
One solution is to use javadoc's -linksource option, however, it does not colour the code. A workaround might be a javascript solution running on node.js and colouring the code with highlight.js. I chose this solution and automated the highlight.js integration with gradle.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I like OpenSCAD for teaching the rules of semicolons and curly braces. Within 20 minutes, students can write programs, learn about transformations, and see the results of misplaced semicolons and curly braces without worrying about other semantics. In other words, OpenSCAD is a great tool to teach the fundamentals of the C-family syntax rules to beginners.
But OpenSCAD lacks expressive power. There is no storage of shapes as variables -- everything has to be written as a function. I have found PLasM, based on Python to be much more powerful since python itself can be used in the script.
Does anyone know of a Java-based language, essentially where the underlying CGAL is embedded in Java functions? That would be ideal since I am using Processing and Arduino to teach programming.
SolidPython? Not Java based, but might just be what you are looking for?
It's a python frontend for solid modelling that compiles to OpenSCAD:
https://github.com/SolidCode/SolidPython
What about this - https://code.google.com/p/cgal-bindings/? It is a set of SWIG bindings for CGAL that supports Python and Java.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
Improve this question
I am looking for a translator for translate Java ByteCode to Machine Native Code before execution to improve performance.
I heard that OpenOffice is made with JAVA, but I can't see any jar file in his installation folder, therefore, maybe there is a translator but I can't find it.
Does anyone know some tool or comercial product to do that?
Thanks!
There are multiple solutions. All are not ideal.
Take a look here (exe4j). To learn more read this article.
Give a look to Avian JVM. See my reply here to this question for pointers on how to embed it and what class libraries you can use to generate your stand-alone executable.
if you just need a managed language/platform, you can also use .NET/Mono AOT. See the mkbundle tool included with Mono 2.x.
Please have a look into https://www.graalvm.org/.
It could build a native image from your jar and run it as binary (native code).
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
One thing I find very confortable with Numpy is the vectorization of operations with arrays (ie. the absence of any explicit looping), and the implicit element-by-element behavior of operations.
Since I have to move from Python to Java for a project, I was looking for any equivalent in well known math libraries (Colt, JScience, Apache Commons Math). But as far as I see it, none of them have equivalent capabilities.
Could anyone advise me?
I had the same problem as you but did not find a java solution. Java misses operator overloading for [] and has no slices. So you will not find a Java solution with the same, easy to read notation as numpy provides.
The nd4j library is essentially "NumPy for Java". It supports broadcasting and vector operations.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
What is the single best pretty-printing library for Java? I mean a library for printing formatted output with indentation, break hints, etc., not a library for beautifying/re-formatting Java code itself. Ideally, the library would "play nice" with System.out.println and friends.
For an idea of what I'm looking for, see OCaml's Format module, particularly Format.fprintf.
[UPDATE] I am not looking for a console windowing library. A pretty-printing library allows you to define methods for formatting arbitrary values such that indentation is preserved and line breaks are chosen at sensible locations. Such libraries exist for Haskell, Standard ML, OCaml, F#, and Scheme. The XTC library provides some of this functionality in xtc.tree.Printer, but it is not nearly as flexible as the libraries in other languages.
Is it jpplib?
Since you talk about boxes, break hints and so on I assume you mean to build a text-based windowing application. So I guess that you are looking for something similar to Ncurses but in Java. Maybe charva could help you.
You may also try javacurses.
According to Dr. Dobb's Code Talk it is cute.
I would say its still easier using Xalan + Sax, like in this example.