ParseToken usage

Started by
6 comments, last by WitchLord 15 years, 3 months ago
Hi, In your description of ParseToken, it can use for intellisense, I can understand how to use for parse syntax and highlight. Can u give a example or hint on how to use as interllisense? Thanks.
Advertisement
ParseToken would only be a minor part of an IntelliSense solution.

In order to implement IntelliSense you need to scan the script to search for declarations that can be used for the auto-suggestions that IntelliSense provides for the user. The ParseToken comes into the picture during the scanning of the script.

If you're interested in implementing your own IntelliSense solution, you may get a basis for how to scan the script from the CScriptBuilder add-on. The way the builder add-on scans for meta-data and stores the class, functions, and variable declarations is very similar to what an IntelliSense solution would need to do.

Regards,
Andreas

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

Andreas, have you ever looked into Microsoft's DLR (Dynamic Language Runtime) for .NET? It is what IronPython and IronRuby is based upon. The idea is running dynamic languages (scripting) in .NET

What's interesting is the Microsoft.Scripting interface, which is how one interfaces with IronPython, etc. The interface is a little similar to AngelScript's interface. One of the things that exists is, through their "ParseToken" is a way to get, what they call, "Token Triggers" which would be:
* "Member select" for the "."
* "Function parameter start" for the "("
* "Function parameter next" for the "," (within function parameter list)
* "Function parameter end" for the ")"
* etc.

I bring this up for two reasons:
1) Microsoft did pretty well with their interface, generalized across "any" dynamic language. It may give you ideas for functions and interface.
2) You can write Angelscript.NET if you wanted ;)
I've yet to look into Microsoft's DLR, however now that you mentioned it I'll definitely take a look at it.

I'm not very interested in writing AngelScript.NET, at least not until the C++ version is more complete. Besides, AngelScript can already be used in .NET applications by writing a simple .NET layer on the library and compiling it with managed C++. SiCrane actually sent me a project for this, I may add this as an add-on in the SDK.

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

:)

Are you going to implement this into angelscript? If yeah, wat's the plan time to do it? I am considering to implement this as well, but I am also very busy to start this until I can finish my current job on hand, I don't want to start to implement something that you are going to introduce in the angelscript.

By the way, I already got a structure in my head, but I need to look at your source code for the tokenparsor and related parts of code to plug them into my design, that will take some time. It is really good if you can put some basic thing into angelscript.


:)

Cheers



Quote:Original post by WitchLord
I've yet to look into Microsoft's DLR, however now that you mentioned it I'll definitely take a look at it.

I'm not very interested in writing AngelScript.NET, at least not until the C++ version is more complete. Besides, AngelScript can already be used in .NET applications by writing a simple .NET layer on the library and compiling it with managed C++. SiCrane actually sent me a project for this, I may add this as an add-on in the SDK.


Quote:Original post by WitchLord
SiCrane actually sent me a project for this, I may add this as an add-on in the SDK.

It's been updated for AS 2.15 since the last time I mentioned it. I've reuploaded an archive in the same place. It contains both my .NET AngelScript bindings and my primitive AngelScript IDE.
Quote:Original post by dxj19831029
Are you going to implement this into angelscript? If yeah, wat's the plan time to do it? I am considering to implement this as well, but I am also very busy to start this until I can finish my current job on hand, I don't want to start to implement something that you are going to introduce in the angelscript.


I have no immediate intention of implementing this support. There are many other features with more importance than built-in support for intellisense.

I will however accept contributions, if you decide to implement it yourself. If you can keep the intellisense support separated from the core engine (similar to how I did it with the CScriptBuilder) the better.

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

Quote:Original post by SiCrane
It's been updated for AS 2.15 since the last time I mentioned it. I've reuploaded an archive in the same place. It contains both my .NET AngelScript bindings and my primitive AngelScript IDE.


Thanks for the update.

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

This topic is closed to new replies.

Advertisement