¡@

Home 

python Programming Glossary: dedent

How do I parse indents and dedents with pyparsing?

http://stackoverflow.com/questions/1547944/how-do-i-parse-indents-and-dedents-with-pyparsing

'else' ' ' suite suite simple_stmt NEWLINE INDENT stmt DEDENT You can read the full grammar in the Python SVN repository http.. I am having trouble with is how to express the INDENT and DEDENT tokens as pyparsing objects. Here is how I have implemented.. # The Grammar just has the tokens NEWLINE INDENT and DEDENT scattered accross the rules. # A single NEWLINE would be translated..

How would you parse indentation (python style)?

http://stackoverflow.com/questions/356638/how-would-you-parse-indentation-python-style

a clever approach for parsing it by generating INDENT and DEDENT tokens in the lexer. I will go deeper on this problem and post..