First page Back Continue Last page Graphics
Quick insight to the implementation ...
XSH grammar is written in Parse::RecDescent – combination of lex/yacc with in-line Perl code
In fact, I have an XML source file from which I generate not only the actual RecDescent grammar but also the documentation, on-line help, and completion-data (hence I can use XSH to refactor the grammar)
RecDescent compiles to a parser (Perl module) that produces in-memory parse-trees
parse-trees are pre-processed (no optimizations yet, but here is where they would go), verified, and interpreted
all this is implemented in Perl