I'm building an Intellij plugin for AngelScript, quick question about the grammar!

Started by
8 comments, last by cmann 2 years, 1 month ago

I'm building an Intellij plugin for Angel Script. Starting with syntax highlighting, and hoping to add code completion and other features. Here is a video demo:

My question is about the grammar. I'm basing it on this page:

https://www.angelcode.com/angelscript/sdk/docs/manual/doc_script_bnf.html

Is this grammar up-to-date? I noticed it was missing comments for example. Besides scouring the web for random angel script files and running it through the parser, how can I ensure my plugin covers all the grammar?

Advertisement

Yes, it is up to date. You're right however that it is missing definition of the comments and white spaces in general. I'll add that for the next release.

The only way to ensure your parser covers all the grammar is to build up a library of scripts that cover everything. You have a slightly more difficult task in that your parser needs to be sufficiently relaxed to work even with invalid scripts, so it can still provide code completion and identify errors while the user is updating the code.

I have a large test suite for doing the regression testing of the library, perhaps you can think of some intelligent way of extracting the script snippets used in that to run through your parser. However, don't think it is complete. Even though it is built up over nearly 2 decades, every now and then new bug reports come up, proving that I haven't covered everything.

I look forward to seeing the end result of this ?

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

MATHOP        ::= '+' | '-' | '*' | '/' | '' | '**'

Np experience at all with AngelCode but an empty math operator seems weird. I am guessing it should be a %, since there is also a %= .

You're right. Thanks for pointing it out.

This is a problem with doxygen comments used to generate the manual. I'll have it fixed.

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

I am really excited to see this come to fruition!

Thanks! That’s super helpful, I will extract the scripts and build a test suite based on it. I will definitely share it here when I get something released!

This would be amazing!

Any updates?

cmann said:

This would be amazing!

Any updates?

Yes! I released it! https://plugins.jetbrains.com/plugin/18276-angelscript-language-support​

Awesome thanks!

This topic is closed to new replies.

Advertisement