Scheme file for ML

Discussion Forums discussion Scheme file for ML

This topic contains 0 voices and has 11 replies.

Viewing 12 posts - 1 through 12 (of 12 total)
Author Posts
Author Posts
February 23, 2012 at 4:33 pm #7653

Ian
Member

For one of my classes this semester we are learning various PLs and the section is on learning ML. We have a project at the end of the section and we need to turn in our file. I normally write my programs in Programmer’s Notepad but it appears that it doesn’t have a .scheme file for ML. So I was wondering if anyone had already created one, or if there were a simple way to adapt one already created so that it worked for the syntax of ML. Also would I also need a .schemedef file?

Thanks,

Ian

February 23, 2012 at 7:12 pm #18578

Sergeyka
Member

Hello.

What a language extension of ML?

You will make on base other language,imho. For example Pascal.

If you put a few examples of code in ml I’ll try to do. Where to read about operators etc?

February 23, 2012 at 8:43 pm #18579

Ian
Member

Thanks for your response. We’re using the Moscow ML extension. There is this webpage that will help with reserved words and comments and this also include the grammar:

http://www.itu.dk/people/sestoft/mosml/mosmlref.pdf

Some example of code would be:

fun sqr(r) = r*r;

(* defines a function int -> int*)

val a = 5;

(*initializes an identifer a to 5*)

“hello world”

(* string*)

#”h”

(*char*)

(* *) delimit comments.

Is there anything else specifically you needed to know?

February 23, 2012 at 9:00 pm #18580

Sergeyka
Member

Do you need highlight syntax? Which highlight do you like from Pnotepad?

I will try now. I need about 1 hour.

p.s. Moscow ML…I from Russia, but not from Moscow =)

February 23, 2012 at 10:33 pm #18581

Ian
Member

Yeah the main point would be for highlight syntax, I tend to use the common things for highlight syntax, comments, function name, keywords, brace matching, numbers, strings, unclosed single line string. Is that what you were asking?

February 23, 2012 at 10:46 pm #18582

Sergeyka
Member

I will try do it, at least partially. I hope I get to do it =)

February 24, 2012 at 4:08 am #18583

Sergeyka
Member

hum.. 3 times already wanted to write that does not work and throw this thing.

For 4 hour i made the such highlight:

http://img822.imageshack.us/img822/7526/201201s.jpg

Tomorrow I’ll try to fix comments..

to Author of Pnotepad:

1. Highlights not working, if there is a large letter keywords.

For example: Array do not work. array is OK.

2. How highlight the words Int.toString ? Int and toString separately – is OK, but Int.toString – does not work.

February 24, 2012 at 5:46 am #18584

Ian
Member

Yeah all that looks great so far! Can’t wait to see what it looks like finished. I’m not sure that the Int.toString needs to be highlighted though, since it would just be one instance of a function.

February 24, 2012 at 4:04 pm #18585

Sergeyka
Member

Hello Ian.

White highlight:

http://img807.imageshack.us/img807/8097/whitet.png

How to install this highlight:

1. Download it: http://depositfiles.com/files/fpnb1n27c or http://www.mediafire.com/?otm5myqjzuijtex

2. Close the PNotepad

3. Copy MoscowML.scheme from “White” folder in PNotepadschemes

4. Run PNotepad. Now you can select Moscow ML highlight

5. I do not know what the file extension in the Moscow ML. For example file.ml

Go Menu- “Tools” — “Options” — item “Files” — click the button “Add”

In editbox “File Extension” we will write:.ml and will select our Schemes Moscow ML. Press Ok.

Now, when we will open anyfile.ml the PNotepad used our highlight.

When i will fix syntax for commentary and break highlight for some keywords. Change color for Default (options–andvanced–tab Styles–Default), truth will not look good = ( Or select Obsidian highlight.

Obsidian highlight:

http://img402.imageshack.us/img402/8522/obsidian.png

How to install this highlight:

1. Download it: http://depositfiles.com/files/i4x2h1s6c or http://www.mediafire.com/?s33bh9dpp38qasy

2. Close the PNotepad

3. Copy MoscowML.scheme from “Obsidian” folder in PNotepadschemes

4. Copy MoscowML.cscheme and UserSettings.xml from “Obsidian” folder in PNotepadsettings

5. Run PNotepad. Now you can select Moscow ML highlight

6. How to automatically connect the highlight you can read in the Common tips.

7. I do not know what the file extension in the Moscow ML. For example .ml

Go Menu- “Tools” — “Options” — item “Files” — click the button “Add”

In editbox “File Extension” we will write:.ml and will select our Schemes Moscow ML. Press Ok.

Now, when we will open anyfile.ml the PNotepad used our highlight.

Common tips:

1. If the Moscow ML highlight is not found, then remove from the file “PNotepadsettingsUserSettings.ini” the two lines:

[Schemes]

NewestScheme=xxxxxxxxxxxxxxxx

2. You will may change highlight and will add a keywords self in options–andvanced. They will be save in UserSettings.xml

Or you will add keywords manually: Drag&Drop MoscowML.scheme in PNotepad.

3. When you will change colors in my highlight do not pay attention to the names. I.e. name Commentary <> color commentary. Guided only by the color. It happened because I have not found good documentation and made by the hit-and-miss method =)

Ian, i’m sorry, but it is better not get to do ..

February 24, 2012 at 4:54 pm #18586

Ian
Member

That looks great I’ll get around to downloading it and looking at it my self in a bit. Thanks !

February 27, 2012 at 2:47 pm #18587

simon
Key Master

Scheme now available from pnotepad downloads:

http://pnotepad.googlecode.com/files/MoscowML.scheme

Note that you should not need to distribute .cscheme files, PN generates these automatically based on the user’s selected colour presets and configuration.

February 28, 2012 at 2:29 am #18588

Sergeyka
Member

simon, without UserSettings.xml the Obsidion themes will be unreadable. Probably this my mistake, as no knowledge.

Viewing 12 posts - 1 through 12 (of 12 total)

You must be logged in to reply to this topic.