#NEWLINE# def compile_path_match( route_pattern ) : #NEWLINE# #INDENT# 'tokens: / or literal or match or *' #NEWLINE# tokenizer = RouteTokenizer ( ) #NEWLINE# ( tokens , unmatched ) = tokenizer . scan ( route_pattern ) #NEWLINE# assert ( unmatched is '' ) , unmatched #NEWLINE# compiler = RouteCompiler ( ) #NEWLINE# return compiler . compile ( compiler )