|From:||"Thomas Goorden" <email@example.com>|
|Date:||Wed, 29 Aug 2007 12:44:23 +0200|
|Posted-Date:||29 Aug 2007 15:55:18 EDT|
[Note to compiler types: Flex is Adobe's development framework,
not the lexer generator. -John]
We're trying to find the best approach to write/create a fairly simple
rules parser for the Flex 2 environment. The idea is to create a sort
of advanced validation engine that can process Drools-like notation,
specifically the left hand side (conditional) part, eg:
Cheese( type == "stilton" && price < 10, age == "mature" )
This would then be used for writing dynamic input validation. However,
because the running environment will be the Flex (Flash) engine, we
need to create something in ActionScript. (yes, I know, don't shoot
I have had some successes with the javacc parser before, but I can't
seem to find a precompiler that has ActionScript as the target
Failing that, what would be the best approach to write a parser like
that from scratch? My guess is to follow a simple design pattern for
it, keeping the target environment in mind. Since I don't want to
reinvent the wheel, a simple but proven idea would be best.
PS: Interestingly, the rules engine we're going to (partly) emulate
has its parser written with javacc and those sources are available.
Return to the
Search the comp.compilers archives again.