The BaCon Converter

Request Features and Feature Changes

The BaCon Converter

Postby konaexpress » Fri Mar 16, 2012 3:14 am

Hi, I have been following Editra for a couple of years now and haven't posted until now.

I was wondering if Editra could be setup to program in BaCon? It is a BASIC language but needs an editor for the Mac platform. People have tried to port the smalIDE to OS X but it doesn't really work that well. You program in BASIC and then it will convert it to "C" using Korn and then the GCC compiler in the OS X dev pack.

The developer is a really nice guy but uses Linux and doesn't have access to a Mac. I have been running it in Mint Linux in a VBox for now but would like to run it natively. I understand that you can't do much about Korn but maybe I can work up a script to do that part or con some one better than me to make a widget for it.

Any help would be great but I understand that very few people use BASIC any more so do what will get you the most user to get Editra a bigger audience first.

Best Regards -John
konaexpress
User
 
Posts: 8
Joined: Fri Mar 16, 2012 2:51 am

Re: The BaCon Converter

Postby cody » Fri Mar 16, 2012 1:49 pm

konaexpress wrote:Hi, I have been following Editra for a couple of years now and haven't posted until now.

I was wondering if Editra could be setup to program in BaCon? It is a BASIC language but needs an editor for the Mac platform. People have tried to port the smalIDE to OS X but it doesn't really work that well. You program in BASIC and then it will convert it to "C" using Korn and then the GCC compiler in the OS X dev pack.


Depending upon the language constructs it should be pretty easy to do. Links to documentation / sample code?

konaexpress wrote:The developer is a really nice guy but uses Linux and doesn't have access to a Mac. I have been running it in Mint Linux in a VBox for now but would like to run it natively. I understand that you can't do much about Korn but maybe I can work up a script to do that part or con some one better than me to make a widget for it.


What are you looking for exactly? Do you just want Editra to be able to highlighting or are you talking about something else? A little confused by the above.

konaexpress wrote:Any help would be great but I understand that very few people use BASIC any more so do what will get you the most user to get Editra a bigger audience first.

Best Regards -John


Editra already supports BASIC, so if the language is BASIC it may just be a matter of configuring the file associations in the preferences dialog. What file exentsions are commonly used? If you manually select the BASIC lexer from the Tools menu does it highlight correctly?


Cody
User avatar
cody
Site Admin
 
Posts: 1307
Joined: Mon Oct 09, 2006 2:49 am
Location: United States

Re: The BaCon Converter

Postby konaexpress » Wed Mar 21, 2012 4:03 am

Hi Cody,

I didn't see a lexer(?) for the BASIC language in Editra. ...........or am I screwing this up?

Tell me where to look and I will. :oops:

-John
konaexpress
User
 
Posts: 8
Joined: Fri Mar 16, 2012 2:51 am

Re: The BaCon Converter

Postby cody » Wed Mar 21, 2012 12:50 pm

Hi,

Sorry, I mis-spoke Editra has a Visual Basic lexer not sure how much different it is but still probably worth a try.

1) Tools->Lexers->Customize
2) Select Visual Basic Lexer in list on left
3) Click button to move it to list on right
4) Ok
5) Select Visual Basic from the menu when a file you want to test out is open.

OR

Have Editra automatically turn on the highlighting (if it looked good enough from above test)

1) Preferences=>Document=>Syntax Highlighting
2) Find Visual Basic lexer in the list
3) Click on the cell on the right column to edit the associated extensions
4) Add the file extensions used by your files you want highlighted with the lexer
5) Close dialog
6) Now Editra will automatically apply the lexer to all files with that extension upon opening them.
User avatar
cody
Site Admin
 
Posts: 1307
Joined: Mon Oct 09, 2006 2:49 am
Location: United States

Re: The BaCon Converter

Postby konaexpress » Wed Mar 21, 2012 2:20 pm

Hay, thanks Cody

Yea, VB is different from BASIC from what I understand. I will see what I can do to get this form http://editra.org/syntax_highlighting_customization filled out and figure out how to submit it.

Once again, thanks for the help. -John
konaexpress
User
 
Posts: 8
Joined: Fri Mar 16, 2012 2:51 am

Re: The BaCon Converter

Postby cody » Wed Mar 21, 2012 3:01 pm

Ok,

If you have some sample code or can point me to some on line I might be able to help point you the right direction.


Cody
User avatar
cody
Site Admin
 
Posts: 1307
Joined: Mon Oct 09, 2006 2:49 am
Location: United States

Re: The BaCon Converter

Postby konaexpress » Wed Mar 21, 2012 10:25 pm

OK, I grabbed a .bac file for you.

I pulled it into Editra and it opened it but nothing is highlighted yet.

-John

P.S. Sorry, I had to attach it as a .tar file. The forum will not allow me to send up a .bac file.
Attachments
vovmods31.tar
(8.84 KiB) Downloaded 148 times
konaexpress
User
 
Posts: 8
Joined: Fri Mar 16, 2012 2:51 am

Re: The BaCon Converter

Postby cody » Fri Mar 23, 2012 2:50 pm

Hi,

I wasn't able to open your tar file it kept complaining about something when trying to extract it.

I did find some examples here http://www.basic-converter.org/documentation.html#GENERAL_SYNTAX. Using this and the existing Visual Basic lexer in Editra the highlight seems to work quite well. see attached screenshot.

So it looks like that lexer can probably do the job. Only question would be to see if there are some differences in keywords or not that may need to be handled differently. Looks like NUMBER and PRINT are probably a few keywords in BaCon that are not in Basic?
Attachments
bacon_with_vblexer.jpg
bacon_with_vblexer.jpg (12.14 KiB) Viewed 2352 times
User avatar
cody
Site Admin
 
Posts: 1307
Joined: Mon Oct 09, 2006 2:49 am
Location: United States


Return to Feature Requests

Who is online

Users browsing this forum: Yahoo [Bot] and 0 guests

cron