<s> '''<STR_LIT>''' <EOL> try : <EOL> import ply . lex as lex <EOL> except ImportError : <EOL> from sys import path as sys_path <EOL> from os . path import join as path_join <EOL> from os . path import dirname <EOL> sys_path . append ( path_join ( dirname ( __file__ ) , '<STR_LIT>' ) ) <EOL> import ply . lex as lex <EOL> tokens = ( <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> ) <EOL> states = ( <EOL> ( '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ) <EOL> t_COLON = r'<STR_LIT::>' <EOL> t_SPACE = r'<STR_LIT>' <EOL> t_WILDCARD = r'<STR_LIT>' <EOL> def t_COMMENT_ID ( t ) : <EOL> r'<STR_LIT>' <EOL> return t <EOL> def t_EVENT_ID ( t ) : <EOL> r'<STR_LIT>' <EOL> return t <EOL> def t_MODIFIER_ID ( t ) : <EOL> r'<STR_LIT>' <EOL> return t <EOL> def t_RELATION_ID ( t ) : <EOL> r'<STR_LIT>' <EOL> return t <EOL> def t_TEXT_BOUND_ID ( t ) : <EOL> r'<STR_LIT>' <EOL> return t <EOL> def t_NEWLINE ( t ) : <EOL> r'<STR_LIT:\n>' <EOL> t . lexer . lineno += <NUM_LIT:1> <EOL> t . lexer . line_tab_count = <NUM_LIT:0> <EOL> return t <EOL> def t_TAB ( t ) : <EOL> r'<STR_LIT:\t>' <EOL> t . lexer . line_tab_count += <NUM_LIT:1> <EOL> if t . lexer . line_tab_count == <NUM_LIT:2> : <EOL> t . lexer . begin ( '<STR_LIT>' ) <EOL> return t <EOL> def t_INTEGER ( t ) : <EOL> r'<STR_LIT>' <EOL> t . value = int ( t . value ) <EOL> return t <EOL> def t_TYPE ( t ) : <EOL> r'<STR_LIT>' <EOL> return t <EOL> def t_freetext_FREETEXT ( t ) : <EOL> r'<STR_LIT>' <EOL> return t <EOL> def t_freetext_TAB ( t ) : <EOL> r'<STR_LIT:\t>' <EOL> t . lexer . begin ( '<STR_LIT>' ) <EOL> return t <EOL> def t_freetext_NEWLINE ( t ) : <EOL> r'<STR_LIT:\n>' <EOL> t . lexer . lineno += <NUM_LIT:1> <EOL> t . lexer . line_tab_count = <NUM_LIT:0> <EOL> t . lexer . begin ( '<STR_LIT>' ) <EOL> return t <EOL> def t_error ( t ) : <EOL> print "<STR_LIT>" % t . value [ <NUM_LIT:0> ] <EOL> raise Exception <EOL> t . lexer . skip ( <NUM_LIT:1> ) <EOL> def t_freetext_error ( t ) : <EOL> return t_error ( t ) <EOL> lexer = lex . lex ( ) <EOL> lexer . line_tab_count = <NUM_LIT:0> <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> from sys import stdin <EOL> for line in stdin : <EOL> lexer . input ( line ) <EOL> for tok in lexer : <EOL> pass <EOL> print tok </s>
