Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
0 registered members (), 984 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
LucasJoshua, Baklazhan, Hanky27, firatv, wandaluciaia
19053 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
scripting language: sequential #164836
11/01/07 00:07
11/01/07 00:07
Joined: Aug 2005
Posts: 1,230
M
MichaelGale Offline OP
Serious User
MichaelGale  Offline OP
Serious User
M

Joined: Aug 2005
Posts: 1,230
Hey,

I spent the last few hours to develop this small scripting language, which I call "Sequential".

Website with information

You can download the parser including a small sample from this website, the source code is also available (written in C#).

The language supports simple functions with parameters as well as if/else conditions. A full reference of the language can be found on the website.

I'd be glad to hear some feedback and what you think about this small approach to code a parser


Your friendly mod is at your service.
Re: scripting language: sequential [Re: MichaelGale] #164837
11/01/07 00:08
11/01/07 00:08
Joined: Aug 2003
Posts: 7,439
Red Dwarf
Michael_Schwarz Offline
Senior Expert
Michael_Schwarz  Offline
Senior Expert

Joined: Aug 2003
Posts: 7,439
Red Dwarf
I already tried it out, its very simple and easy to use! Try it out!


"Sometimes JCL reminds me of Notch, but more competent" ~ Kiyaku
Re: scripting language: sequential [Re: Michael_Schwarz] #164838
11/09/07 17:37
11/09/07 17:37
Joined: Aug 2005
Posts: 1,230
M
MichaelGale Offline OP
Serious User
MichaelGale  Offline OP
Serious User
M

Joined: Aug 2005
Posts: 1,230
Thanks.

Update:
+ Added support for functions
+ Added mathematical functions such as add, sub, div and mul
* Fixed a bug with if/else that allowed the user to begin a new if condition inside an existing one

Reference
Download Binaries + Examples
Download Sources

Feedback is welcome


Your friendly mod is at your service.
Re: scripting language: sequential [Re: MichaelGale] #164839
11/16/07 15:53
11/16/07 15:53
Joined: Aug 2005
Posts: 1,230
M
MichaelGale Offline OP
Serious User
MichaelGale  Offline OP
Serious User
M

Joined: Aug 2005
Posts: 1,230
Added class support:

Code:

echo Starting

.myclass:
echo Constructor
ret

blub:
echo Function
ret
.end

echo Middle

mov x new(myclass)
jmp x:blub

echo End

; Output:
; Starting
; Middle
; Constructor
; Function
; End



I'll upload the new binaries/sources and an updated documentation later today or tomorrow


Your friendly mod is at your service.
Re: scripting language: sequential [Re: MichaelGale] #164840
11/17/07 17:07
11/17/07 17:07
Joined: Aug 2005
Posts: 1,230
M
MichaelGale Offline OP
Serious User
MichaelGale  Offline OP
Serious User
M

Joined: Aug 2005
Posts: 1,230
Download v.0.5
Download Sources v.0.5
Syntax Reference including several examples
Function Reference
Version History

Added public/private and internal to the class system:

Code:

echo Starting

.myclass:
echo Constructor
ret

private:bla:
echo Private Function
ret

internal:blub:
echo Function
jmp x:bla
ret
.end

echo Middle

mov x new(myclass)
jmp x:blub

; Out-comment the following line to produce a compiler error showing an access violation, since bla is private.
; jmp x:bla

; Out-comment the following line to produce a compiler error showing an access violation, since blub can only be called from the current file.
; Note: abc.seq just contains "jmp x:blub"
; init abc.seq

echo End

; Output:
; Starting
; Middle
; Constructor
; Function
; Private Function
; End






Your friendly mod is at your service.
Re: scripting language: sequential [Re: MichaelGale] #164841
11/17/07 17:08
11/17/07 17:08
Joined: Aug 2003
Posts: 7,439
Red Dwarf
Michael_Schwarz Offline
Senior Expert
Michael_Schwarz  Offline
Senior Expert

Joined: Aug 2003
Posts: 7,439
Red Dwarf
Awesome!


"Sometimes JCL reminds me of Notch, but more competent" ~ Kiyaku
Re: scripting language: sequential [Re: Michael_Schwarz] #164842
11/17/07 17:40
11/17/07 17:40
Joined: Jul 2004
Posts: 1,924
Finland
Ambassador Offline
Serious User
Ambassador  Offline
Serious User

Joined: Jul 2004
Posts: 1,924
Finland
Got to try it too, has a nice "high level" asm feel in it .

Re: scripting language: sequential [Re: Ambassador] #164843
11/18/07 16:43
11/18/07 16:43
Joined: Aug 2005
Posts: 1,230
M
MichaelGale Offline OP
Serious User
MichaelGale  Offline OP
Serious User
M

Joined: Aug 2005
Posts: 1,230
Thanks =)

Last night I rewrote the parser a bit, all native commands are imported dynamically from dll's now. Added a ftp library as well:

Code:

ftp_open localhost anonymous anonymous
ftp_status $e

if $e != 230
echo Login failed
exit 0
else
echo Login successful
end




Your friendly mod is at your service.
Re: scripting language: sequential [Re: MichaelGale] #164844
11/18/07 17:00
11/18/07 17:00
Joined: Apr 2005
Posts: 952
Cologne
padrino Offline
User
padrino  Offline
User

Joined: Apr 2005
Posts: 952
Cologne
Nice
You know I do not understand most of it, but I am happy to see that it is coming along good

Re: scripting language: sequential [Re: padrino] #164845
11/22/07 23:19
11/22/07 23:19
Joined: Aug 2005
Posts: 1,230
M
MichaelGale Offline OP
Serious User
MichaelGale  Offline OP
Serious User
M

Joined: Aug 2005
Posts: 1,230


'small' update:

Code:

.myclass
set this:x 50
set this:y 70

ret

public:ToString:
echo x
ret
.end

set x new(myclass)
set x:z 30
jmp x:ToString

exit 0



You can set and work with class variables now. The example above will show the following output:

Quote:


Instance of 'myclass' (`x`='50' `y`='70' `z`='30' )





Classes can inherit from other classes now:

Code:

.mother
ret

public:ToString:
echo x
ret
.end

.child:mother
set this:x 50
set this:y 30

ret
.end

set x new(child)
jmp x:ToString



The example above will show the following output:

Quote:


Instance of 'child' (`x`='50' `y`='30' )





Last edited by MichaelFriedrich; 11/22/07 23:19.

Your friendly mod is at your service.

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1