I may eventually get around to it. I'm thinking of an input syntax kind of like this:
TOKEN "sector" : "[1-9][0-9]+";
TOKEN "timeLeft" : "[0-9]{2}:[0-9]{2}:[0-9]{2}";
PRODUCTION "commandPrompt" : "\[35mCommand \[\[1;33mTL\[0;33m=\[1m" timeLeft "\[0;35m\]\[1;37m:\[0;35m\[\[1;36m" sector;
Productions could contain regular expression syntax for repetition, etc. The string literals in the production would generate anonymous tokens, and productions would produce methods in the parser interface that would receive the named tokens:
public void commandPrompt(String timeLeft, String sector);
By itself this is not much different from existing parser generators. But it would also have JPlex's unique characteristics of "loose" lexing and the ability to generate push parsers.
Yeah, someday...
No comments:
Post a Comment