Jump to content
Excelsior Forums
Bijo

Syntax highlighting

Recommended Posts

Hi,

I was looking for a good free text editor (for a while) that has built-in support for Modula-2 source files, and can be easily adjusted to fit your highlighting colors, fonts, and size, etc. The only one I've found that comes a bit close is Notepad++, but it has no standard highlighter and recognizer. Making one manually is a bit tedious and flawed, and I can't find any good language files anywhere that are premade for use with Notepad++.

Any ideas?

Thanks in advance.

Share this post


Link to post
Share on other sites

PSPad, including built-in Modula-2 support? I haven't seen it.

It's so difficult to find ANY text editor that has good support for Mod-2 let alone Ob-2 without a hassle!

Share this post


Link to post
Share on other sites

Thanks, I got it :)

Any chance there's also Oberon-2 syntax highlighting to be found?

Thanks, I got it :)

Any chance there's also Oberon-2 syntax highlighting to be found?

1) Create file $(PS PAD folder)\syntax\Oberon-2.ini

2) Paste lines below into it and save

===cut===

;PSPad user HighLighter definition file

[settings]

Name=Oberon-2

HTMLGroup=0

Label=1

FileType=*.ob2,*.mod,*.obn

CommentString=

ANSIComment=1

SQLComment=1

IndentChar=

UnIndentChar=

TabWidth=2

CaseSensitive=1

SingleQuote=1

DoubleQuote=1

KeyWordChars=_

CodeExplorer=ftUnknown

[KeyWords]

ARRAY=

BEGIN=

BY=

CASE=

CONST=

DIV=

DO=

ELSE=

ELSIF=

END=

EXIT=

FOR=

IF=

IMPORT=

IN=

IS=

LOOP=

MOD=

MODULE=

NIL=

OF=

OR=

POINTER=

PROCEDURE=

RECORD=

REPEAT=

RETURN=

THEN=

TO=

TYPE=

UNTIL=

VAR=

WHILE=

WITH=

[ReservedWords]

[KeyWords2]

ABS=

ASH=

CAP=

CHAR=

CHR=

COPY=

DEC=

ENTIER=

EXCL=

HALT=

INC=

INCL=

LEN=

LONG=

MAX=

MIN=

NEW=

ODD=

ORD=

SET=

SHORT=

SIZE=

[KeyWords3]

BOOLEAN=

CHAR=

INTEGER=

LONGINT=

LONGREAL=

REAL=

SET=

SHORTINT=

===cut===

3) Choose Settings / Highlighter settings

Scroll down to "<not assigned>", select it.

On a tab "Specification" in the list "user highlighter" choose "Oberon-2"

4) On tab "Colors" choose colors (font attributes) you like

Key - Oberon keywords like "BEGIN"

Key 2 - built in procedures like "ABS"

Key 3 - built in datatypes like "BOOLEAN".

5) Enjoy

Share this post


Link to post
Share on other sites

I've made a syntax highlighter form Notepad++, an API definition for XDS and ISO libraries and a parser rule for FunctionList.

I'm using Notepad++ v. 4.7.5 and FunctionList v. 2 (alfa).

If you are interested send your email to: utumno1@yahoo.it

Daniele Marangoni

Share this post


Link to post
Share on other sites

Hi.

I've donwloaded the syntax highlighter from Notepad++ but i don't know how to make it works.

The readme file talks about add the information to FunctionListRules.xml and userDefineLang.xml but i don?t have this files.

I'm using notepad++ 5.1

Can you help me?

Thanks

Share this post


Link to post
Share on other sites

I initially used TextPad which supports Modula-2 syntax:

http://www.textpad.com/add-ons/synh2m.html

After a few months' use that was not enough as I also wanted more language-specific features:

a) Automatic keyword capitalisation

B) Procedure indexing / cross-referencing / code navigation

c) Open files automatically from IMPORT lists

etc.

That initially led to the creation of CPIde (for Component Pascal)

http://www.cfbsoftware.com/cpide

and then Armaide (for ARM Oberon-07)

http://www.cfbsoftware.com/armaide

I have an experimental M2Ide (for, you guessed it - Modula-2). If there is sufficient interest I could finish it off and release it.

Chris

Share this post


Link to post
Share on other sites

I was working with the Gardens Point and Logitech M2 compilers when experimenting with M2Ide. However it was designed to be usable with any command-line compilers. I just tried it with XDS and it worked OK with the Hello.mod example so it looks promising.

Chris

Share this post


Link to post
Share on other sites

I am pretty sure a lightweight (compared to Eclipse) IDE would be very important for Modula-2. A few years ago an IDE for the FST Modula-2 compiler got quite a lot of interest (http://sourceforge.net/projects/mide3de2/) but development stopped at a very early stage and the sourcecode was never published.

Maybe you can make something available?

Regards

Christoph

Share this post


Link to post
Share on other sites

Nearly a week has passed and, apart from yourself, the silence has been deafening.  :(

I would need to be convinced that the number of people interested was significantly higher than 1 if the project is to get anywhere near the top of my 'list of things to do'.  As there is such a varied range of M2 compilers currently in use (e.g. XDS, JPI, Logitech, Stony Brook, FST, M2MPC etc. just for MS-DOS) there would probably be more interest if it targeted as many as possible.

If you want to lobby for supporters elsewhere (e.g. via a petition, newsgroups etc.) then go for it and let me know the results.

Chris Burrows

CFB Software

http://www.cfbsoftware.com/modula2

Share this post


Link to post
Share on other sites
I've made a syntax highlighter form Notepad++, an API definition for XDS and ISO libraries and a parser rule for FunctionList.

If you are interested send your email to: utumno1@yahoo.it Daniele Marangoni

I tried contacting the author, but he does not reply. Did anyone get those API-files?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×