Syntax Highlighter

Announcements, comments, ideas, feedback, and "How do I... ?" questions
User avatar
euler
Administrator
Posts: 5095
Joined: Sun Mar 05, 2006 4:49 pm
Location: Cheshire, England
Contact:

Re: Syntax Highlighter

Post by euler »

Absolutely, Mr. Wizard. The website uses an adapted form of the GeSHi engine, so if you want to head over to http://qbnz.com/highlighter/ you might be able to take one of their templates for another language as a starting ponit and work with it. I am sure that your efforts would be appreciated by Mathematica users at PE, and you might be able to submit it to the GeSHi community.
Image
impudens simia et macrologus profundus fabulae
Mr.Wizard
Posts: 26
Joined: Sun Jan 02, 2011 9:20 am

Re: Syntax Highlighter

Post by Mr.Wizard »

I have not used PHP before. What is the easiest way to preview the results of a Language File I create?
ImageImage
User avatar
euler
Administrator
Posts: 5095
Joined: Sun Mar 05, 2006 4:49 pm
Location: Cheshire, England
Contact:

Re: Syntax Highlighter

Post by euler »

I sent you a PM.
Image
impudens simia et macrologus profundus fabulae
Aethec
Posts: 1
Joined: Sat Nov 12, 2011 12:48 pm

Re: Syntax Highlighter

Post by Aethec »

Hi,
There's a small bug in the C# highlighter: The "let" keyword is not recognized. It's used in LINQ queries, e.g. "from s in myArray let i = int.Parse(s) select i*i;" (random code, not a solution to any problem)
User avatar
PurpleBlu3s
Posts: 75
Joined: Mon Sep 19, 2011 6:49 pm

Re: Syntax Highlighter

Post by PurpleBlu3s »

The APL/J/K syntax highlighter is either wrong or has a bug in it somewhere as it goes a bit funny with unmatched double quotes, which in J are common. It also doesn't really look right in many areas.
Image
User avatar
Francky
Posts: 90
Joined: Sat May 07, 2011 3:49 pm
Location: South of France

Re: Syntax Highlighter

Post by Francky »

Is it here to ask for
//
not to be the start of a comment in python code ?

Thanks.
ImageEntia non sunt multiplicanda praeter necessitatem
xoru
Posts: 3
Joined: Sun May 13, 2012 12:09 pm

Re: Syntax Highlighter

Post by xoru »

I would love some PureBasic support, however I'm not sure how many PureBasic coders
are on the Euler Project.
capra.hircus
Posts: 3
Joined: Wed May 16, 2012 8:05 am

Re: Syntax Highlighter

Post by capra.hircus »

Hi all,

Would it be possible to deactivate highlighting for a specific language ? I use Ada, and default highlighting really does not work, because of automatic recognition of strings on single quote characters, which are used in Ada for very different purposes. See for example my post on http://projecteuler.net/thread=22&page=8#last
Amndeep7
Posts: 2
Joined: Tue Dec 28, 2010 11:05 pm
Location: VA, USA

Re: Syntax Highlighter

Post by Amndeep7 »

Francky wrote:Is it here to ask for
//
not to be the start of a comment in python code ?

Thanks.
I have to second this - if you need an example of where this is happening, please look for my Python solution on page 8 at the forum for Problem 65.

Would it also be possible to add Python3 as an alias for Python? Since, even though it is has the same syntax, there has been a break in backwards compatibility, so if there were a visual indicator of which version was being used, I presume it might help some people.

Thank you for reading.
Post Reply