3 ms·
This is, in large part, something the FSF did not want to happen without the app being GPLv3. The other interesting thing is that this is only really an issue
by DannyBee 14y ago
This is, in large part, something the FSF did not want to happen without the app being GPLv3.
The other interesting thing is that this is only really an issue due to difficulty in properly parsing/semantically analyzing languages like C++.
For languages like Java, it simply isn't necessary, or in some cases, desirable.
- protomyth 14y ago"For languages like Java, it simply isn't necessary, or in some cases, desirable." Why would it not be desirable? Also, if I have an idea for a great tool, why should I have to write my own parser? I have more faith the actual compiler will have bugs fixed quicker in this regard.
- mjn 14y agoIf your goal is non-compiler analysis, like refactoring or verification, it's often more flexible to use a framework specifically designed to analyze source code and give you a nice AST with various options, rather than pulling the parser out of a compiler front-end. For languages with reasonably simple grammar there are usually one or more such packages, usually pretty well debugged. For example, for Java you could use http://spoon.gforge.inria.fr/ http://spoon.gforge.inria.fr/
- npsimons 14y agoAs a counter-example/argument, CEDET/Semantic (http://cedet.sourceforge.net/semantic.shtml http://cedet.sourceforge.net/semantic.shtml) will use Clang/LLVM and/or GCC if you tell it to. It only makes sense, if someone has already gone to the trouble of not only writing a full up parser and lexer for your language, but also exposing things through modularization, you might as well use it.
- DannyBee 14y agoAgain, the argument i've made is that this is only because C/C++ are so difficult to otherwise parse and auto-complete. Can you find a java example (for example :P)? AFAIK, all the java IDE's use their own incremental parsers and completers.
- DannyBee 14y agoIt wouldn't be desirable in a lot of cases for the reason the other person mentioned. I don't believe you should have to write your own parser mind you, just that your compiler's parser may not be the one you want. In general, most languages are stable enough that you don't really get parsing/semantics bugs, so you wouldn't really need to worry about your last concern. C++ is simply so complicated that the implementations end up with a bugs due to necessary complexity of implementation, but this is not generally true of languages.