uniBASIC syntax for Atom text editor

359 views
Skip to first unread message

frosty

unread,
Feb 14, 2017, 4:46:25 PM2/14/17
to Pick and MultiValue Databases
Before I dive into this, has any user of uniBASIC (or similar BASIC) built a syntax highlighter for the Atom text editor?

Rick Weiser

unread,
Feb 14, 2017, 4:55:48 PM2/14/17
to Pick and MultiValue Databases
I did for Crimson.

frosty

unread,
Feb 14, 2017, 4:59:49 PM2/14/17
to Pick and MultiValue Databases
I've got one for TextMate. Thought I could import it into Atom, but that doesn't look easy.
Also it has shortcomings which I'm hoping to fix in my Atom version. Some day. 

MAV

unread,
Feb 15, 2017, 4:19:16 AM2/15/17
to Pick and MultiValue Databases
Hi,

VSCODE (Visual Studio Code  https://code.visualstudio.com/) is similar to Atom. There is a extension with PICK BASIC syntax highlighter:


For Sublime Text there are some alternatives:


Marcos Alonso Vega

Gysie de Bruyn

unread,
Feb 15, 2017, 10:50:33 AM2/15/17
to Pick and MultiValue Databases
I use Sublime Text 3 took the best of these to build syntax highlighting for us:


This could help with the conversion from Sublime to Atom:

frosty

unread,
Feb 15, 2017, 12:08:14 PM2/15/17
to Pick and MultiValue Databases
Thanks for the two replies that point to the Jordan Brill syntax for Sublime.

Atom uses coffeescript notation, which looks like Python-flavored json and I found this:
"You should notice that the regex contains more backslashes than usualon this page.
So all my regex needed more backslashes, and now I'm making progress again. =`:^>

I'm gonna hack at this a bit more and put it up into gitHub at some point.

frosty

unread,
Feb 16, 2017, 12:46:23 AM2/16/17
to Pick and MultiValue Databases
On Tuesday, February 14, 2017 at 2:46:25 PM UTC-7, frosty wrote:
Before I dive into this, has any user of uniBASIC (or similar BASIC) built a syntax highlighter for the Atom text editor?

Burney Hoel

unread,
Feb 27, 2017, 10:15:37 AM2/27/17
to Pick and MultiValue Databases
I published that package. I would be happy to work together if your interested.

Burney

frosty

unread,
Feb 28, 2017, 2:37:10 PM2/28/17
to Pick and MultiValue Databases
On Monday, February 27, 2017 at 8:15:37 AM UTC-7, Burney Hoel wrote:
> On Tuesday, February 14, 2017 at 2:46:25 PM UTC-7, frosty wrote:
>
> Before I dive into this, has any user of uniBASIC (or similar BASIC) built a syntax highlighter for the Atom text editor?

On Thursday, February 16, 2017 at 12:46:23 AM UTC-5, frosty wrote: 
>
> Found some recent development here! 
 
On Monday, February 27, 2017 at 8:15:37 AM UTC-7, Burney Hoel wrote:

I published that package. I would be happy to work together if your interested.


What I've got there is very basic, and somewhat flawed. In particular, that
syntax doesn't handle a comment appended to the end of a line of code 
with a semicolon + an asterisk/bangsign, which I'd love to see fixed. 

I'm not very handy with these syntax definitions. =':^/

-- 
frosty

Burney Hoel

unread,
Mar 1, 2017, 10:20:44 AM3/1/17
to Pick and MultiValue Databases
Below are the regex patterns I used for comments, the last pattern in each looks for a preceding ";"

(^\\s*\\*.*|^(\\*).*|(?<=;)\\s*\\*.*)

(^\\s*\\!.*|^(\\!).*|(?<=;)\\s\\*!.*)

My grammar package "language pick basic" is actually a Unibasic grammar. I called it pick basic as that's what we call it at work but our environment is Unidata 7.3

The only issue i am having with my package is the auto indentation, I have worked out everything except for CASE statements. I am working on adding a custom function for it now.

Feel free to contact me at burne...@gmail.com, we should chat on discord or skype to see if there may be a more efficient way to work on our projects together.

Thanks,
Burney

Burney Hoel

unread,
Mar 1, 2017, 11:01:31 AM3/1/17
to Pick and MultiValue Databases
Sorry there was an extra asterisk in the bang example.

(^\\s*\\!.*|^(\\!).*|(?<=;)\\s\\!.*)

Bill Crowell

unread,
Mar 6, 2017, 12:00:57 PM3/6/17
to Pick and MultiValue Databases
I did a lot of work with Atom before changing direction. The issue with any of these editors is the ability to save to a remote and be MV aware- the ability to compile and do other things that I can do with WED.

This is why I created the Redaktor tool. I can edit within the browser and compile on the remote.

frosty

unread,
Mar 7, 2017, 3:22:36 PM3/7/17
to Pick and MultiValue Databases
On Wednesday, March 1, 2017 at 9:01:31 AM UTC-7, Burney Hoel wrote:
Sorry there was an extra asterisk in the bang example.

(^\\s*\\!.*|^(\\!).*|(?<=;)\\s\\!.*)

Asterisk version worked perfectly. I cloned it and tweaked it for bang-sign
and would up with this, which works perfectly, too:
'match': '^\\s*\\!.*|^(\\!).*|(?<=;)\\s*\\!.*'

Burney you've been very helpful, thanks!

I think mvTalk for Slack would be a good place to continue this conversation.

-- 
frosty

frosty

unread,
Mar 7, 2017, 3:45:05 PM3/7/17
to Pick and MultiValue Databases
On Tuesday, March 7, 2017 at 1:22:36 PM UTC-7, frosty wrote:
I think mvTalk for Slack would be a good place to continue this conversation.

I should add: this link should take to you a page with a link to get signed up to mvTalk in Slack.

-- 
frosty 

Burney Hoel

unread,
Mar 7, 2017, 3:57:13 PM3/7/17
to Pick and MultiValue Databases
I have the same issues with atom, I have created some tools in our unidata system to help bridge the gap. I am also looking at the linter package by steel brain to accomplish real time compilation error alerts. I would love to work with anyone interested in building out these capabilities. I will heading over to mvTalk for Slack if anyone is interested in collaborating.

Thanks,
Burney
Reply all
Reply to author
Forward
0 new messages