Re: asciidoctor and pygments not working under cygwin64
Posted by
mojavelinux on
Dec 30, 2019; 8:45pm
URL: https://discuss.asciidoctor.org/asciidoctor-and-pygments-not-working-under-cygwin64-tp5212p7463.html
If something that works on Linux works on cygwin without any issues, then I expect it to work. That means you should not have start writing lexers immediately. I'm not really sure what else to tell you, other than check your environment.
> A better way would be to allow the use of something like Antlr4 files or
some other independent lexer specification file that can be re-used
across any particular implementation - e.g. how gvim does it, and how
most parser builders work.
That's certainly a good idea. I've voiced my opinion in the past about the lack of portability with grammars for syntax highlighters. But we're not in the business of making syntax highlighters here, so you'd have direct your feedback at those projects. Asciidoctor is merely integrating what's out there.
Best,
-Dan
On Mon, Dec 30, 2019 at 11:58 AM wolandscat [via Asciidoctor :: Discussion] <
[hidden email]> wrote:
I have had a look at the Rouge approach. It appears that this involves writing lexers as Ruby source files. I'm not personally against setting up a Ruby environment and learning enough Ruby to make that work, but it is not a very generic approach.
A better way would be to allow the use of something like Antlr4 files or some other independent lexer specification file that can be re-used across any particular implementation - e.g. how gvim does it, and how most parser builders work.
Ideally, one would be able to write a universally re-usable lexer file for any language that any syntax highlighting system, as well as other tools could use.
Aside: cygwin is much closer to a posix environment than Windows; everything runs inside bash, so testing on Windows native won't reveal anything about what might happen in cygwin. Generally speaking, if it works on Linux it works on cygwin. Which is why this anomaly is a surprise.
--