Re: Basic-Like PCODE Compiler and Virtual Host/Interpreter

alex@iliasov.org (alessio)
21 Apr 2004 00:49:52 -0400

          From comp.compilers

Related articles
Basic-Like PCODE Compiler and Virtual Host/Interpreter chris.cranford@tkdsoftware.com (2004-04-15)
Re: Basic-Like PCODE Compiler and Virtual Host/Interpreter tdk@thelbane.com (Timothy Knox) (2004-04-21)
Re: Basic-Like PCODE Compiler and Virtual Host/Interpreter bonzini@gnu.org (2004-04-21)
Re: Basic-Like PCODE Compiler and Virtual Host/Interpreter lex@cc.gatech.edu (Lex Spoon) (2004-04-21)
Re: Basic-Like PCODE Compiler and Virtual Host/Interpreter alex@iliasov.org (2004-04-21)
Basic-Like PCODE Compiler and Virtual Host/Interpreter chris.cranford@tkdsoftware.com (2004-04-21)
Re: Basic-Like PCODE Compiler and Virtual Host/Interpreter chris.cranford@tkdsoftware.com (2004-04-28)
Re: Basic-Like PCODE Compiler and Virtual Host/Interpreter chris.cranford@tkdsoftware.com (2004-04-28)
Re: Basic-Like PCODE Compiler and Virtual Host/Interpreter kenrose@tfb.com (Ken Rose) (2004-04-28)
Re: Basic-Like PCODE Compiler and Virtual Host/Interpreter freitag@alancoxonachip.com (Andi Kleen) (2004-04-28)
Re: Basic-Like PCODE Compiler and Virtual Host/Interpreter arargh404@NOW.AT.arargh.com (2004-04-29)
[4 later articles]
| List of all articles for this month |

From: alex@iliasov.org (alessio)
Newsgroups: comp.compilers
Date: 21 Apr 2004 00:49:52 -0400
Organization: http://groups.google.com
References: 04-04-041
Keywords: interpreter
Posted-Date: 21 Apr 2004 00:49:52 EDT

chris.cranford@tkdsoftware.com (JA Peele) wrote
> I need to embed a BASIC-like BYTECODE/PCODE host engine in my
> application framework so customers can write simple BASIC-like scripts
> to customize the application.


I am the author of Lemick project, it is an open source Basic-like
programming language project. It has compiler from source into to
lemick VM bytecode and run-time environment with just-in-time
compiler.
Links: http://lb.to.kg/, http://sourceforge.net/projects/lemick
In your case you would have first to compile source code, create a VM
instance and execute the code.


> An example of a BASIC-Like script would
> be:
>
> // Test script
> Dim x as Integer = 2
> Print "Hello World From my test script."
> Print "X was initialized to a value of "; x
>


Lemick equivalent for the code above is the following:
      ' Test script
      Use io.console
      Dim x as Integer = 2
      Println "Hello World From my test script."
      Println "X was initialized to a value of " + x


Lemick has OOP, multitasking, packages and etc. It is written in C and
it should be not very hard to make libraries from the compiler and
run-time for embedded use. Thanks to JIT compiler it is very
efficient, times faster then any interprter. Since it is open-source
you can adopt grammar and syntax to your needs.


Hope this is helpful,
Alex


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.