
Parser Combinators Made Simple - apgwoz
http://sigusr2.net/2011/Apr/18/parser-combinators-made-simple.html
======
CodeMage
A nice and friendly way to explain a concept that has a scary-sounding name.
One little correction, though: your example for "alt" function says

    
    
      >>> iforwhileorfor = alt(matchstr('if'), matchstr('while'), matchstr('for'))
      >>> if_while_for('if')
      ('if', '')
      >>> if_while_for('while')
      ('while', '')
      >>> if_while_for('for')
      ('for', '')
      >>> if_while_for('foof')
      None
    

You need to either rename the variable to "if_while_for" or modify your
function calls accordingly.

~~~
apgwoz
Oops! Thanks for noticing this. I'll make a fix.

