Is there a syntax highlighting extension for Neuron C in VScode? - vscode-extensions

There are many extensions in VSCode that do syntax highlighting for .nc files, like Liao-LNC-NC for example . However, these is for G-Code files used on CNC manufacturing machines, not .nc files for Neuron C.
Is there a VSCode extension, or otherwise VSCode compatible syntax highlighter for Neuron C .nc files?

Related

Can ANTLR4 generate separate Cpp files for a parser?

I'm working on a parser that's getting a complex/large file in C++. Since each rule gets its own class created, for rules that are not dependent on each other I was wondering if there's a way to instruct the antlr tool to generate the C++ code in separate .cpp files.
Regards,
JZ
I was wondering if there's a way to instruct the antlr tool to generate the C++ code in separate .cpp files
No, there is no such thing possible out of the box.

Are there any resources which provides ANTLR grammar for excel functions?

I came across this resource (link to pdf) which lists the EBNF grammar for excel functions. However conversion of such a big ebnf grammar to antlr grammar is time consuming and is giving errors. Are there any resources where we can download ANTLR grammar (preferable the .g4 file) for excel functions ?
Not directly the .g4 file, but there is a paper you can download. The EBNF grammar for excel functions is listed from page 6.
Title: Parsing Excel formulas: A grammar and its application on four
large datasets
Download link: https://fenia266781730.files.wordpress.com/2019/04/smrdoc.pdf#

Xtext based language within Intellij Idea

I want to make a plugin for a language for the Intellij Idea IDE. The language has been developped using Eclipse Xtext and is open source. A plugin already exists for Eclipse.
My goal is to port this language to Intellij Idea. I want to be able to use Intellij to create source files, to have the specific syntax highlighting and to be able to compile and run programs written with this language.
Is there a simple way to generate the Intellij Idea plugin using the Xtext project?
If not is there an efficient solution to be able to have the specific syntax highlighting in Intellij? (an automatic way if possible, I would prefer not rewriting everything everytime the Xtext project is updated)
Short answer
Yes, with a bit of work.
Long Answer
Sadly, Xtext uses antlr in the background and IntelliJ use their own grammar kit based on Parsing Expression Grammars. As such, the parsing and editor code generated by XText, as you might have guessed, will not work.
In order to get your language working in IntelliJ you will need to:
Create grammar *.bnf file
Generate lexer *.flex file, possibly tweak it and then run JFlex generator
Implement helper classes to provide, among others, file recognition via file extension, syntax highlighting, color settings page, folding, etc.
The *.flex file is generated from the bnf. Luckily, most of the classes in step 3 follow a very similar structure so they can be easily generated (more on that later). So basically, if you manage to generate the *.bnf file, you are 80% there.
Although from different technologies, the syntax of bnf files is very similar to XText files. I recently migrated some antlr grammars to IntelliJ's bnf and I had to do very small changes. Thus, it should be possible to autogenerate the bnf files from your XText ones.
That brings me back to point 3. Using XTend, Epsilon's EGL, or similar, it would be easy to generate all the boiler plate classes. As part of the migration I mentioned before I also did this. I am in the process of making the code public, so I will post it here when done and add some details.

How to Programme PIC Microcontroller without Using MPLAB X

I am Making a MicroPLc and has choosen PIC24FJ series as controller. IN PLC World People use LAD, FBD, STL ,etc for Programming not c or c++.
There a Lot of Open software which converts PLC language to 'C'. My Question is how to convert that C code in .Hex file without Using MPLAB X . or is there any method of procedure by which we can Invoke XC 16 Compiler for compiling and generation .HEX File.
a Internet Search reveals there is an SDK for Mplab but that just help to Burn .Hex file in to the Chip. Nothing about converting 'c' to .Hex
Any suggestion or Link to an Api, Dll etc will be appreciated.
Thanks
I'm unsure exactly what you're asking for but do you just mean a toolchain to compile your C file into a hex binary file?
In that case you should be able to run the XC16 compiler from command line.
MPLAB X just generates a GCC makefile if I'm not mistaken.
Check the XC16 C Compiler manual:
http://www.microchip.com/stellent/groups/techpub_sg/documents/devicedoc/en559023.pdf
And this resource may also be of use:
http://adamsiembida.com/how-to-compile-mplabx-projects-from-the-command-line/

Web publishing system with code highlighting

I'd like to publish some of the many programs I've written on the web.
Is there a syntax highlighting Linux web publishing application (CMS/Blog/RoR app)
that displays syntax for C++, Python, Bash scripts, SQL, VBA, awk,
Erlang, java, makefiles, Ruby, Pascal and other languages?
The more syntax settings configuration files, the better.
The extensions I have in Textpad (for which I have syntax highlighting -- syn files) are
.as, .asm, .asp, .awk, .bas, .bat, .c, .conf,
.cpp, .cs, .ctl, .dfm, .dsc, .erl,
.fnc, .h, .hpp, .inf, .ini, .jav, .java,
.mak, .nsh, .nsi, .ora, .pas, .pkb, .pks,
.pl, .prc, .py, .reg, .rsp, .sh, .sql, .syn,
.tcl, .trg, .vw, .xml, .xsl, .xslfo
There are 100% JavaScript solutions for this so it can be independent of the CMS.
Example: SyntaxHighlighter
And here's a list...
Try the Joomla CMS: http://www.joomla.org/
It has built-in support for Geshi: http://qbnz.com/highlighter/
https://gist.github.com/ is pretty nice.