comments and code rewrite

various comments for Rule and State objects
rename .consume and .consumeRule to .consumeTerminal and
.consumeNonTerminal to use the common names
rewrite .consumeTerminal from logical expression to if-then-else tree;
don't rely on order of evaluation of booleans (well, make it explicit)