BMX parser test

BlitzMax Forums/BlitzMax Programming/BMX parser test

ziggy(Posted 2007) [#1]
I'm rebuilding the BMX parser of BLIde to make it work faster. I would like to know if any of the BLIde users here can give the new parser a try. It is just a simple application (no set up required) that shows a window where you can edit text, copy and paste any BMX code and see if it is properly hilighted and outlined (folding regions). I would like to know if it performs parsing faster than current BLIde version (as instance, opening miniB3d on BLIde and pasting it on this test parser reveals some big CPU differences). This is part of the first alpha testing for the new BLIde rendering engine comming soon.

You can download the application here:
http://www.blide.org/bmxparser.rar

You will need BLIde 0.8.15 or 0.8.16 installed on your computer to test this new parser. To intall it, just unrar on any folder and run the file BMXDemo.exe

Let me know how it performs for you.

Thanks!


Cartman(Posted 2007) [#2]
I found that this text didn't collapse well:

Function Shutdown()
TGame.MakeGoodExit()
ShowMouse() 'just in case it was hidden.
CleanUp() 'Free up memory

'Exit the program
End
End Function

It collapses into:
Function Shutdown() ...
End Function

Other than that, it seems to be very fast and responsive. No pauses when I scrolled up and down. Overall, I'm excited to see it put into place.

Let me know if you need anything else tested. This was tested on my laptop by the way. :)


ziggy(Posted 2007) [#3]
Ok, I think the End keyword is confusing the outliner. I'll fix it.


GfK(Posted 2007) [#4]
To open a 131k (5,300 line) program takes over 20 seconds in BLIde.

With the new parser, it happens in under 1 second.

So, a slight improvement. ;)


Paul "Taiphoz"(Posted 2007) [#5]
yeah like gfk I found it faster, but also hadd some slight problems with the folding.

its deff an improvement tho.


Derron(Posted 2007) [#6]
an include from a project (5100 lines, 430kb)...
in blide .15 (after startup) 4 secs
in your new parser: ~1 sec.

But blide is surely doing more than highlighting and placing foldermarks on the correct spots... I do not know how about intellisense-like things and online debugger.


bye
MB


ziggy(Posted 2007) [#7]
BLIde does intellisense and things like that when the document is loaded, in a low priority secondary thread, So integrating this new parser on BLIde shouldn't produce a very different CPU usage (it can be a little bit slower on BLIde, but not much).

I'm fixing the End keyword issue.

the folding updating is not being done at real time. This was one of the things that was improving a lot CPU usage. So when editing outline sections, outlining can be shown in a wrong place, but the parser will fix it automatically, so just a little outlining delay. I supose you don't fold regions as you type them. This could be changed to work realtime, but it would introduce a CPU hit.

@Yavin: Wich problems with folding? I would really like to fix them.


GfK(Posted 2007) [#8]
How long until this is integrated into BLIde?

Or are you planning a non-.NET dependent BLIde Lite? ;)


computercoder(Posted 2007) [#9]
That would rock... Good question GfK! Ziggy? :P


ziggy(Posted 2007) [#10]
This will be integrated as soon as possible. There are some fixes pending on the parser, and the auto-capitalization is being developed. No release date yet. The first version will be an alpha version, then a pair of betas, and then the official release. I hope everything will be put together in a couple of months or so. Depending on how complicated it is to integrate the quantum whale API to the BLIde internal API.

a non .NET version is not planed and will surely not be ever done. Maybe a mono version.


ziggy(Posted 2007) [#11]
New BMX parser test available. Please, test it and tell me if it works for you well, and if it is fast enough to be used as a regular editor (copy and paste any BMX code to the this new parser).
You can get it via FPT:

server: ftp.blide.org
username: scy4250
password: beta

please provide feedback as it will be integrated on BLIde soon.


SebHoll(Posted 2007) [#12]
Yep - that's really fast! It managed to do approx 20,000 lines in less than a second on my computer. ;-)


ziggy(Posted 2007) [#13]
Is it being correctly folded?


GfK(Posted 2007) [#14]
Used the same 5,300 line file as before. Still very fast.

Hurry up and get this into BLIde!


ziggy(Posted 2007) [#15]
Can you please press Ctrl+F and tell me if the find dialog works?


GfK(Posted 2007) [#16]
Seems to work fine. Folding appears to work, too.


SebHoll(Posted 2007) [#17]
Regarding folding, folding "For" loops basically means the entire loop goes (i.e. it doesn't leave the first line For Local i% = 0 Until 100 so you know it's a for loop - just ...). Also, it doesn't highlight Return as a keyword.


ziggy(Posted 2007) [#18]
The first Alpha version is closer, here's a little snapshot of BLIde using the new parser, and hilighting a BMX file, a HTML file, a C file, a C++ file and a XML file.

I'll let you know when it is available for download, there are some important things things to migrate from one engine to the other.



Intellisense is integrated on the parser, and there has not been any performance hit. but folding needs a little bit of work. There will be also a new security check for BLIde Plus accounts, and a new username and password will be sent to BLIde Plus users.