| Author |
Utility like generic compiler
|
chetan dhumane
Ranch Hand
Joined: Jan 07, 2009
Posts: 628
|
|
I am looking for a utility rather a compiler which will execute the user defined scripts.There should be provision in the utility to define the syntax and grammar rules of the script.
The script is something like this
[Nitesh: Please UseCodeTagsa]
|
http://www.androcid.com/
|
 |
Pat Farrell
Rancher
Joined: Aug 11, 2007
Posts: 4422
|
|
How is this not a compiler or interpreter for a user defined syntax?
Have you studied compilers and parsers? Making your own is not that hard.
|
 |
Nitesh Kant
Bartender
Joined: Feb 25, 2007
Posts: 1638
|
|
|
Have a look at antlr
|
apigee, a better way to API!
|
 |
Pat Farrell
Rancher
Joined: Aug 11, 2007
Posts: 4422
|
|
or Lex and Yacc for old school.
I had a compiler text book that used a pure-Java replacement for Bison/Antlr or Lex/Yacc. Clearly building a parser in Java is not that tough. And you can either emit assembly or byte-code for the JVM.
|
 |
William Brogden
Author and all-around good cowpoke
Rancher
Joined: Mar 22, 2000
Posts: 12269
|
|
It might be easier to have your "compiler" output in a scripting language - see Jython or Groovy or Ruby.
This gives you an intermediate product that is easier to study and verify as opposed to the code-compile-crash cycle you would get if compiling to bytecodes.
Bill
|
Java Resources at www.wbrogden.com
|
 |
 |
|
|
subject: Utility like generic compiler
|
|
|