I'm learning YACC and I like to learn new languages having an editor pointing out my errors live.
Any suggestion?
You can try xcode,it can compile lex and yacc and you can debug with it.
Related
While coding Java one can set the configuration "Proceed on errors" for example on the eclipse compiler in Intellij.
Is there an equivalent for Kotlin?
My specific case right now: all code (written in Java) is build OK, junit tests (written in Kotlin) are broken. I'm trying to fix and build the tests one by one.
Kind regards,
GJS
I use an ANTLRv4 grammar to parse my DSL. I would like to create a plugin to support code highlighting and code completion in IntelliJ IDEA for my DSL.
As far as I can tell, IntelliJ uses BNF and Flex formats for parsing.
Is it possible to:
use an ANTLR grammar, or
convert an ANTLR grammar to BNF and Flex ...
... to make an IntelliJ plugin for my DSL?
Updated on 2020-Dec-22
Question #1: Is it possible to directly use an ANTLR grammar to generate a JetBrains plugin for language support?
Yes, to some degree. It looks like the antlr4-intellij-adaptor library will help. I don't have firsthand experience. It describes itself as "A library to support the use of ANTLRv4 grammars for custom languages in IntelliJ-based IDEs plug-in development."
Just for clarification, a different tool, the ANTLRv4 Plugin for IntelliJ is designed to aid in the development of ANTLRv4 grammars. It does not support using an ANTLRv4 grammar to generate a lexer and parser for use by the JetBrains editors (e.g CLion, GoLand, IntelliJ, PyCharm, RubyMine, and so on).
Question #2: Is it possible to convert an ANTLR grammar to some other forms (e.g. BNF and Flex) which can be used to generate a JetBrains plugin for language support?
Yes, but this is a large topic. I would direct you to this Stack Overflow post: Are there tools to convert between ANTLR and other forms of BNF?
Related Tooling: You may find Grammar Kit by Jetbrains useful, it is "An IntelliJ IDEA plugin for language plugin developers."
Recommended Docs: Also, JetBrains provides extensive documentation on how to extend language support for its editors.
I just wanna to know what is the good IDE to start coding with all of the languages mentioned here such as: Java, JavaScript, HTML, CSS, PHP, Android, C#, and SQL.
Thanks in advance..
Netbeans is a good choice. You can code in the following languages with it:
Java(for mobile, desktop and Web)
C/C++
PHP
HTML5
JavaScript
CSS
You can download NetBeans here
I come from a unixy background, so tend to prefer command-line style automation over ide's.
I'm tryng to get deeper into windows development. I have previously written programs on Windows just using the cl compiler to compile the c code. I'd like to move to an automated build system like cmake.
I can get cmake to create an Visual Studio solution, which will compile. But that is not quite what I am looking for. What I am looking for is for cmake to invoke to cl to compile/link the code itself, just like make invokes gcc.
Is cmake able to do this or would Scons be better suited for me?
Once you have your project created with CMake, cmake can also run the build.
cd builddir
cmake --build .
You can also use CMake to create nmake or jom (parallel nmake) makefiles, or even gmake. So, it is certainly possible to use CMake from the command line and use VS compilers.
Found out, as per Peter's comment, that cmake is a build-generator tool. It's generates makefiles that external build tools can run. So I'll either use cmake+namke or scons.
Im not so sure about cmake, but SCons has some builders dedicated just to Microsoft Visual Studio.
Look for the following in the SCons builder documentation:
MSVSProject()
MSVSSolution()
Plus SCons has a much nicer syntax, its python! :)
I've found a blog post that describes how to use CPD on an Objective-C project. The author also provided a CPD language library for ObjectiveC. Unfortunately, the GUI provided by the Violations plugin in Jenkins is rather ugly. The visualization that Sonar uses is much more helpful in analyzing the code.
The following command is used to generate the corresponding CPD output:
java
-Xmx512m
-classpath pmd-4.2.5.jar:ObjCLanguage-0.0.6-SNAPSHOT.jar
net.sourceforge.pmd.cpd.CPD
--minimum-tokens 100
--files [Path to XCode project classes]
--language ObjectiveC
--encoding UTF-8
--format net.sourceforge.pmd.cpd.XMLRenderer > cpd-output.xml
As far as I know, the project language can be configured in the Sonar plugin configuration at Jenkins. But how can I tell Sonar to use the ObjCLanguage library? I only need this for detecting code duplication and visualization by Sonar (since it is so much prettier).
If you want to have analysis results in Sonar, you need to install a Sonar plugin that brings support for the language. However, there's currently no plugin for Objective-C, so you won't be table to get what you're trying to achieve... unless you develop this plugin! ;-)
There seems to be ongoing work on an Objective-C plugin for Sonar. You may find it at https://github.com/fhelg/sonar-objective-c
I have also seen another Objective-C plugin for Sonar:
https://github.com/octo-technology/sonar-objective-c