Safe Languages :-)

Alfie John alfiejohn at acm.org
Fri Apr 2 22:02:55 CST 2004


> I am writing a module in our Portal which allows the execution of code 
> from people we do not trust - students.
> 
> The idea is to provide a module that allows languages to be programmed 
> with very simple inputs and outputs.
> Ideally I would have some of the following:
> 
> 	* Perl - maybe just a tiny subset of perl

How about using split() to find parse each statement and then use eval()
if the statement falls within an allowable list? This way, perl is being
used, but only an allowable subset.

If you decide to go this way, how about using a bison/flex combo or its
perl equivalent?

int 20h;
Alfie John




More information about the Melbourne-pm mailing list