473,503 Members | 1,804 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

scripting language

Hi!
I'm writing a small game engine in c# and I'm in great
need of a scripting language. Does anyone know of such a
language?

Would it be possible to use the VSA in some way to do this?

Best regards,
/Michael
Nov 15 '05 #1
4 4418
Hi Ron,
If it's possible to C# thats OK... all I need is a
scripting language so that I can write particle system
effects etc. without having to use subclassing. Runtime
recomping i just fine.

Do you know of any good documentation on how to use the
System.CodeDom.Compiler?

Best regards,
/Michael
-----Original Message-----
Michael,

Why not use C#? (See namespaces System.CodeDom.Compiler how to compile C#source to Assembly and System.Reflection and System how to create types ofobjects from the Assembly).
Ron
"Michael Andersson" <a9******@nospam.ida.his.se> wrote in messagenews:01****************************@phx.gbl...
Hi!
I'm writing a small game engine in c# and I'm in great
need of a scripting language. Does anyone know of such a
language?

Would it be possible to use the VSA in some way to do this?
Best regards,
/Michael

.

Nov 15 '05 #2
This is something I've recently engaged upon myself, and let me tell you,
it's no small effort. I'm probably about a third of the way there (I'm
currently building a parse tree). Mind you I haven't looked at the
System.CodeDom.Compiler namespace though I now intend to - it's the first
I've heard about it.

Here is a good tutorial on one way to go about it,

http://www.flipcode.com/tutorials/tut_scr01.shtml

That uses the old Lex/Yacc tools, or at least their win32 counterparts and
implements it in C/C++. Those tools still only get you about half way and
learning to use them again requires a bit of effort. Personally I've read up
on compiler theory and design and am coding everything from the start
myself. So far so good I just need to dedicate more hours (days/weeks) to
the job.

BTW, the basic constituents of any scripting engine are the

Lexer -> Abstract Syntax Tree/Parse Tree -> Byte Code Generator -> Virtual
Machine

The Tree can be optional but it avails you a nice structure for analysing
the code (debugging etc) and probably simplifies the process of getting from
token stream to byte code.

As for C# generating compiler tools there is
http://www.scifac.ru.ac.za/coco/. All the tools require you to learn a bit
about compiler theory (grammars and BNF notation etc) so you can specify
your language and also of course there own usage and in the end they only
get part of the job done, hence of chosen to avoid them.

That said if I can get System.CodeDom.Compiler to do it for me I will be
taking a new route.
"Michael Andersson" <a9******@nospam.ida.his.se> wrote in message
news:01****************************@phx.gbl...
Hi!
I'm writing a small game engine in c# and I'm in great
need of a scripting language. Does anyone know of such a
language?

Would it be possible to use the VSA in some way to do this?

Best regards,
/Michael

Nov 15 '05 #3
This MS knowledgebase article appears to be a good start

HOWTO: Programmatically Compile Code Using C# Compiler
http://support.microsoft.com/default...b;en-us;304655

"Dmand" <da*************@imxsoftware.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
This is something I've recently engaged upon myself, and let me tell you,
it's no small effort. I'm probably about a third of the way there (I'm
currently building a parse tree). Mind you I haven't looked at the
System.CodeDom.Compiler namespace though I now intend to - it's the first
I've heard about it.

Here is a good tutorial on one way to go about it,

http://www.flipcode.com/tutorials/tut_scr01.shtml

That uses the old Lex/Yacc tools, or at least their win32 counterparts and
implements it in C/C++. Those tools still only get you about half way and
learning to use them again requires a bit of effort. Personally I've read up on compiler theory and design and am coding everything from the start
myself. So far so good I just need to dedicate more hours (days/weeks) to
the job.

BTW, the basic constituents of any scripting engine are the

Lexer -> Abstract Syntax Tree/Parse Tree -> Byte Code Generator -> Virtual
Machine

The Tree can be optional but it avails you a nice structure for analysing
the code (debugging etc) and probably simplifies the process of getting from token stream to byte code.

As for C# generating compiler tools there is
http://www.scifac.ru.ac.za/coco/. All the tools require you to learn a bit
about compiler theory (grammars and BNF notation etc) so you can specify
your language and also of course there own usage and in the end they only
get part of the job done, hence of chosen to avoid them.

That said if I can get System.CodeDom.Compiler to do it for me I will be
taking a new route.
"Michael Andersson" <a9******@nospam.ida.his.se> wrote in message
news:01****************************@phx.gbl...
Hi!
I'm writing a small game engine in c# and I'm in great
need of a scripting language. Does anyone know of such a
language?

Would it be possible to use the VSA in some way to do this?

Best regards,
/Michael


Nov 15 '05 #4
Thanks Ron, I've briefly looked into the features that the framework has to
assist in this kind of thing and now expect that I will be using them
instead of my own code. I too am building a scripting engine and C# or VB
will be quite sufficient as a language to implement it. Great tip I should
have posted here first!

"Ron Bullman" <ro********@mail.com> wrote in message
news:eZ**************@TK2MSFTNGP11.phx.gbl...
Dmand,

Yes, it's a huge job to write a parser, but the question is if that's
needed. If you are creatinga new programming language then surely you need
to write a parser otherwise why should you write a parser? See namespace
System.CodeDom for alternative way to create AST.

If I understod correctly the OP's requirements we are just discussing about a few hours programming task. The framework do have all the goodies needed. Just stich them together. _No_ third party tools needed!
Ron
"Dmand" <da*************@imxsoftware.com> wrote in message
news:#D**************@tk2msftngp13.phx.gbl...
This is something I've recently engaged upon myself, and let me tell you, it's no small effort. I'm probably about a third of the way there (I'm
currently building a parse tree). Mind you I haven't looked at the
System.CodeDom.Compiler namespace though I now intend to - it's the first I've heard about it.

Here is a good tutorial on one way to go about it,

http://www.flipcode.com/tutorials/tut_scr01.shtml

That uses the old Lex/Yacc tools, or at least their win32 counterparts and implements it in C/C++. Those tools still only get you about half way and learning to use them again requires a bit of effort. Personally I've read
up
on compiler theory and design and am coding everything from the start
myself. So far so good I just need to dedicate more hours (days/weeks)

to the job.

BTW, the basic constituents of any scripting engine are the

Lexer -> Abstract Syntax Tree/Parse Tree -> Byte Code Generator -> Virtual Machine

The Tree can be optional but it avails you a nice structure for analysing the code (debugging etc) and probably simplifies the process of getting

from
token stream to byte code.

As for C# generating compiler tools there is
http://www.scifac.ru.ac.za/coco/. All the tools require you to learn a bit about compiler theory (grammars and BNF notation etc) so you can specify
your language and also of course there own usage and in the end they only get part of the job done, hence of chosen to avoid them.

That said if I can get System.CodeDom.Compiler to do it for me I will be
taking a new route.
"Michael Andersson" <a9******@nospam.ida.his.se> wrote in message
news:01****************************@phx.gbl...
Hi!
I'm writing a small game engine in c# and I'm in great
need of a scripting language. Does anyone know of such a
language?

Would it be possible to use the VSA in some way to do this?

Best regards,
/Michael



Nov 15 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

41
2756
by: Richard James | last post by:
Are we looking at the scripting world through Python colored glasses? Has Python development been sleeping while the world of scripting languages has passed us Pythonista's by? On Saturday...
33
2692
by: Quest Master | last post by:
I am interested in developing an application where the user has an ample amount of power to customize the application to their needs, and I feel this would best be accomplished if a scripting...
6
1829
by: Roger | last post by:
......ie in my application! Basically I want to add a scripting language to a cross platform application. The prime requirements are that it is: a) Small b) May be easily staticlly compiled...
15
4233
by: Birahim FALL | last post by:
Hi, I'm very fresh to PostgreSQL, coming from Oracle. I want to developp web applications based on apache and postgresql. Is there an equivalent of OWA server (Oracle Web Application server) for...
4
1610
by: Gene Jones | last post by:
So I'm starting to do some things where I'm going to want to add scripting in the application, and I can't find a scripting language to plug in that I like. So far I've looked at LUA and L-Sharp,...
0
946
by: ai | last post by:
We are looking for hard core web developers that are interested in checking out a new PHP like scripting engine. The scripting language is called LSP, which means Lua Server Pages. Lua is a very...
12
2925
by: Tony Belding | last post by:
I'm interested in using an off-the-shelf interpreted language as a user-accessible scripting language for a MUCK. I'm just not sure if I can find one that does everything I need. The MUCK must be...
3
2054
Banfa
by: Banfa | last post by:
The project I work on has a bespoke hardware platform which is designed to go into a variety of different situations. However to keep things simple we really want the software for the platform to...
3
4673
by: =?Utf-8?B?SmVzcGVyLCBEZW5tYXJr?= | last post by:
Hi, I've come to the conclusion that a scripting language will make a fine solution for a feature that I want to program for an app. I do not expect any problems parsing the script the old...
0
7274
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7323
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
5005
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4670
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3162
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3151
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1507
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
732
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
377
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.