Adding a programming language into Beaver Text editor.

For discussions about programming, programming questions/advice, and projects that don't really have anything to do with Puppy.
Post Reply
Message
Author
User avatar
flamesage
Posts: 214
Joined: Sat 02 Jul 2005, 00:39

Adding a programming language into Beaver Text editor.

#1 Post by flamesage »

How would I do it?
(example: in C++ mode if I type in if it lights up in blue, how would I create my own "Language")

User avatar
Ian
Official Dog Handler
Posts: 1234
Joined: Wed 04 May 2005, 12:00
Location: Queensland

#2 Post by Ian »

Do you mean a programming language or just changing the color of the highlights.

User avatar
flamesage
Posts: 214
Joined: Sat 02 Jul 2005, 00:39

#3 Post by flamesage »

an actual language.

User avatar
flamesage
Posts: 214
Joined: Sat 02 Jul 2005, 00:39

#4 Post by flamesage »

an actual programing language.

You see, theres this programing language claled DM
and since thres no linux compiler, I have to use Beaver text.

User avatar
Ian
Official Dog Handler
Posts: 1234
Joined: Wed 04 May 2005, 12:00
Location: Queensland

#5 Post by Ian »

If there is no Linux compiler how are you going to compile it.

User avatar
rarsa
Posts: 3053
Joined: Sun 29 May 2005, 20:30
Location: Kitchener, Ontario, Canada
Contact:

#6 Post by rarsa »

I think that you mean 'How do I define a syntaxt higlighting schema to Beaver?'. Is this correct?

Because you don't 'add a language' to an editor, unless you mean to add a script language to perform tasks inside the editor (like VBA in word). Beaver 0.3.1 has a macro language, I don't think 0.2.7 has one.

The editor and the compiler have NOTHING to do, except that you can edit the source files in the editor and some editors can be configured to work as development environments.

So assuming that you mean syntaxt highlighting:

I went to the official beaver page downloaded the source package and got the following information:

According to the Beaver 0.2.7 README file:
CURRENT FEATURES
----------------

- Syntax highlighting | All theses features are
- Automatic indentation \ configurable via a file
- Automatic completion / 100% compatible with
- Automatic case-correction | UltraEdit wordfile.txt's
- Languages supported by the default wordfile.txt provided:
C/C++, HTML, JavaScript, Perl, PHP and Bash
- You can choose your syntax highlighting mode
- Multiple documents management
- Preferences interface (you can also edit the config files, which are
intended to be very clear, if you want)
- Languages menus that can be created by users, through '.bl' files
- Recent documents menu
- Search & Replace capabilities
- A command line that works fine
- File informations window
- Read only mode
- Print function
- Popup Document list
- Menu accelerators that work
- Save window size
- Other configurable options: toolbar, document tabs, etc.
- A base converter
- A nice Color picker
- Lots of surprises
This means that you have to edit the following file:
/root/.beaver/wordfile.txt

I think once you see how the syntax highlighting is defined for the other languages, you will be able to figure out how to do it for the DM language. If not, Look into the UltraEdit documentation. UltraEdit is quite popular and I'm sure that you will find enough information by Googling.

If you actually want to create your own language, you will most likely have to compile the compiler in an existing language.

User avatar
flamesage
Posts: 214
Joined: Sat 02 Jul 2005, 00:39

#7 Post by flamesage »

Ok, thats just what I wanted thanks rarsa!

Post Reply