I present you Lexiron or 'Lexi' and has entered the beta stage.
The purpose of Lexi is that you can extend your functionality of your application dynamicly.
Adding your functions hooked into Lexi, making it agile and a versatile tool for your applications.
Ever wanted to let your end-users change the behavior of your application or perhaps you want
to have a dynamic element on your own application to make it more functional?
Lexi could be your awnser.
Extended with scripts that can be build to serialized objects and even encrypted if you want it protected.
![[Image: ar2o8fz.png]](https://i.imgur.com/ar2o8fz.png)
How does it work?
I'm not gonna explain every detail but it uses the LL(1) top down parsing method.
You will find more details on this method here:
http://en.wikipedia.org/wiki/LL_parser
Lexi breaks down the character stream into tokens wich then are broken down to
seperate AST elements, after this is done Lexi can save this state of your script into a serialized object.
As you can see here:
![[Image: Tm7CzlH.png]](https://i.imgur.com/Tm7CzlH.png)
How can we use it?
You set a new reference of lexi in your project.
![[Image: Tb6Kw5Q.png?1?3504]](https://i.imgur.com/Tb6Kw5Q.png?1?3504)
Declare the engine
To load and build a script:
If no errors occoured you can save it to a serialized object:
To execute your finalized script object:
This function also returns a value if the script makes use of the 'return()'
How can we check if any errors occoured?
You can check the engine for errors as follows
If this is true, you wanna see what kind of errors occoured
Engine usefull routines
Properties:
Changelog
2.0 Initial Release
- Released
Download link
2.1
- Fixed: Return(Expression) will terminate any further execution and return to the caller
- Added: For-Loops
- Added: break() Will exit from the current active for-loop
- Added: Switch Case (With '..else' support)
- Added: Engine.Evaluate() will evaluate and execute direct input and return if any
- Added: Engine.Execute() Another execute signature for in combination with Engine.Open()
- Added: Engine.Break() Will forcefully stop a scipt execution
Download link
Qeustions and Feedback are welcome.
If you need help using my software you can pm me for skype.
(if ur planning to decompile my engine, go ahead, but your better of asking me how it works as i can explain to you how it works)
- Barret
The purpose of Lexi is that you can extend your functionality of your application dynamicly.
Adding your functions hooked into Lexi, making it agile and a versatile tool for your applications.
Ever wanted to let your end-users change the behavior of your application or perhaps you want
to have a dynamic element on your own application to make it more functional?
Lexi could be your awnser.
Extended with scripts that can be build to serialized objects and even encrypted if you want it protected.
![[Image: ar2o8fz.png]](https://i.imgur.com/ar2o8fz.png)
How does it work?
I'm not gonna explain every detail but it uses the LL(1) top down parsing method.
You will find more details on this method here:
http://en.wikipedia.org/wiki/LL_parser
Lexi breaks down the character stream into tokens wich then are broken down to
seperate AST elements, after this is done Lexi can save this state of your script into a serialized object.
As you can see here:
![[Image: Tm7CzlH.png]](https://i.imgur.com/Tm7CzlH.png)
How can we use it?
You set a new reference of lexi in your project.
![[Image: Tb6Kw5Q.png?1?3504]](https://i.imgur.com/Tb6Kw5Q.png?1?3504)
Declare the engine
Code
Private Engine As Lexiron.Engine
Private Sub FrmMain_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
Engine = New Lexiron.Engine
End SubTo load and build a script:
Code
Engine.Parse(Filename)If no errors occoured you can save it to a serialized object:
Code
Engine.Save(Filename)To execute your finalized script object:
Code
Engine.Execute(Filename,Parameters())This function also returns a value if the script makes use of the 'return()'
How can we check if any errors occoured?
You can check the engine for errors as follows
Code
if (Engine.HasError) then
..code...
End IfIf this is true, you wanna see what kind of errors occoured
Code
For Each Err As ParseError In Engine.Errors
...show errors...
NextEngine usefull routines
Code
Public Sub Parse(Filename As String)
Public Sub AddDelegate(Reference As String, Delegate As ScriptDelegate)
Public Sub RemoveDelegate(Reference As String)
Public Sub Open(Filename As String, Optional Key As String = "")
Public Sub Save(Filename As String, Optional Key As String = "")
Public Function Execute(Filename As String, ParamArray Params() As Object) As Object
Public Function Execute(ParamArray Params() As Object) As Object
Public Function Evaluate(Expression As String, ParamArray Params() As Object) As Object
Public Sub GenerateTreeview(Tv As TreeView)
Public Sub SerializeObject(Obj As Object, OutputFile As String, Compression As Boolean, Optional Key As String = "")
Public Function Deserialize(Obj As Object, Inputfile As String, Optional Key As String = "") As ObjectProperties:
Code
Public ReadOnly Property Tokenizer As Tokenizer
Public ReadOnly Property Tokens As List(Of Token)
Public ReadOnly Property HasError As Boolean
Public ReadOnly Property Errors As ParseError()
Public ReadOnly Property AstTree As Statement
Public Property Break() As BooleanChangelog
2.0 Initial Release
- Released
Download link
2.1
- Fixed: Return(Expression) will terminate any further execution and return to the caller
- Added: For-Loops
- Added: break() Will exit from the current active for-loop
- Added: Switch Case (With '..else' support)
- Added: Engine.Evaluate() will evaluate and execute direct input and return if any
- Added: Engine.Execute() Another execute signature for in combination with Engine.Open()
- Added: Engine.Break() Will forcefully stop a scipt execution
Download link
Qeustions and Feedback are welcome.
If you need help using my software you can pm me for skype.
(if ur planning to decompile my engine, go ahead, but your better of asking me how it works as i can explain to you how it works)
- Barret



![[Image: IQE6i8G.png]](https://i.imgur.com/IQE6i8G.png)
![[Image: 1zL3pDG.jpg]](https://i.imgur.com/1zL3pDG.jpg)

![[Image: 1riOqZa.png]](https://i.imgur.com/1riOqZa.png)