21 November 2019, 16:55 | #1 |
Registered User
Join Date: Oct 2019
Location: Spain
Posts: 23
|
develop AMOS code in PC/Mac
Hi to all, After a long time I have started to coding again in this fabulous
language. My question is : Is there any text editor (for Windows or Mac OSx) to be able to write Amos code (any type of syntax checker, etc) ? This code would be saved in ASCII format and then imported into the AMOS own editor (with the "Merge ASCII" option. This can be done with editors like NotePAD++, etc but I would like it to have some kind of syntax control. Thank you very much in advance... |
21 November 2019, 21:12 | #2 |
Registered User
Join Date: Nov 2004
Location: Germany
Posts: 629
|
What do you mean with syntax control exactly ?
You could have syntax coloring, as seen on this picture (with amiga guide files) But for that, a list of Amos commands is needed, separated in commands, functions etc etc, for different colors. And autocompletition of commands with the scite editor could be done, as well. (provided that someone makes the language definition file) edit: The Amos-extensions have all their own syntax ... Last edited by Dan; 21 November 2019 at 21:38. |
22 November 2019, 15:46 | #3 |
Registered User
Join Date: Oct 2019
Location: Spain
Posts: 23
|
Hi Dan, thanks for your fast reply.
By "control sintaxis" I mean that the editor itself recognizes the keywords with different colors for example. Functions with one color, commands with other, strings with other color. Similar to how keywords are recognized in C++. Phyton, and other languages. Looking at your hardcopy, this is the Crimson Editor and I can remember that this editor supported AMOS syntax. I tried to look for it but I can't find it anywhere. Can you help me where to find it? If so, I would be eternally grateful Thank you very much in advance |
22 November 2019, 22:36 | #4 |
Registered User
Join Date: Nov 2004
Location: Germany
Posts: 629
|
Uhm, the thing with Amos Pro is, that this basic language does, what other languages do not !
And that is, one command can be separated by a space char. For example "RESERVE AS CHIP DATA" is a single command. But if i enter this into the specification file of CED, it will treat it as 4 different statements, because it assumes that a space char is a separator. So this will be colored too, but i think it would be better to have it as one command, because "DATA" and "AS" are used elsewhere too. And i do not know if CEd can do it. (the manual indicates that it can't) Anyway, i have used the HTML version of the manual to extract the commands, and attached is a 7zip file with the commands, in 13 different text files. Last edited by Dan; 22 November 2019 at 23:07. |
23 November 2019, 06:27 | #5 |
Registered User
Join Date: Feb 2007
Location: Melbourne, Australia
Age: 41
Posts: 3,773
|
I'd be surprised if vim can't do it. But even if it can't, you should still switch
|
23 November 2019, 11:23 | #6 |
Registered User
Join Date: Nov 2004
Location: Germany
Posts: 629
|
As i said, most basic languages do not do commands separated by space, because they use space to separate the commands from the rest.
CED could do Amos pro syntax coloring, but not per whole command, as it is. I mean, i could assemble a syntax coloring file, but for that i have to remove all the duplicates from the commands. The trouble, which i'm pointing at, is simply this: If you write, (as in my previous post), "RESERVE AS CHIP DATA", it would be colored. But you can, as well, write "RESERVE AS AS AS CHIP DATA" or "RESERVE AS BOB DATA" and it would be colored too, but these are not a valid commands in amos pro. Syntax coloring should be, well at least for me, a way to faster recognize keywords from other parts and so to easier identify (spelling) errors. And AMOS has a large command set, containing 800+ commands (without extensions) so few words are used double or triple times (if not more). Last edited by Dan; 23 November 2019 at 11:47. |
29 November 2019, 22:36 | #7 |
Registered User
Join Date: Nov 2004
Location: Germany
Posts: 629
|
I'v made a quick syntax file for the Crimson Editor.
Sure there may be a need of tweaking here and there, but it works, so far. Not included are: Amal,Interface and extra extension syntax. Like said in the previous post, it will color on the word basis, and not on the command basis. Included in the attachment is an AutoHotkey Program, which, when used in Crimson Editor or Notepad, opens a dialog box, in which you can type a letter, and it will display a list of available commands. The CapsLock (and Shift CapsLock) activates the box, After typing a letter, you can use arrow up and down to scroll (or type more letters to get the whole command), and enter will select the command and copy it into the Editor. (sometime focus may be lost and it will not work, but this is rare) - (The Editor has to have the focus) I'v included the Compiled exe and SourceCode, because virus total shows 4~5 red alerts of which i'm pretty sure that they are false alarms. So if you want, you can download autohotkey and compile it for yourself. P.S. The Code for this AutoHotkey Script was used from this www.autohotkey.com forum post, and i'v removed the parameter box. (Usage instructions are over there too ^^) Edit: Installing the Keywords in Ced: Copy the AmosPro.key and AmosPro.spc into the "CrimsonEditor/spec" folder. Then open CED, and open the menu: Tools/Preferences. There, in the dialog box, open file, syntax type. Choose an - empty - slot, then enter a description, Like "Amos Pro" or what ever you may recognize later. Then the LangSpec and Keywords procedure is the same: Click on the ... (to the far right) and select the AmosPro.key and .spc file. Click on apply or on Ok, then load an Amos ascii file, and from the "Document/Syntax Type" menue, chose the "Amos Pro" to activate the Coloring. Alternatively, if you want CED to always apply this coloring on a extension, then make a new text file in the spec folder, with the following text: Code:
LANGSPEC:AmosPro.SPC KEYWORDS:AmosPro.KEY Last edited by Dan; 29 November 2019 at 23:14. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Copy code/text from PC/Notepad to AMOS | Brick Nash | Coders. AMOS | 8 | 17 October 2018 09:05 |
Is there any way of modularize AMOS code? | darkhog | Coders. AMOS | 9 | 04 April 2017 23:54 |
AMOS (Editor) Source Code | SparkyNZ | request.Apps | 4 | 25 March 2017 00:49 |
Req: AMOS code for scrolling plasma thingy | Dunny | request.Other | 7 | 20 September 2010 14:51 |
Amos PRO source code availability ? | freddix | request.Other | 7 | 09 April 2010 21:22 |
|
|