<s> """<STR_LIT>""" <EOL> import google <EOL> import antlr3 <EOL> import GrocLexer <EOL> import GrocParser <EOL> class GrocException ( Exception ) : <EOL> """<STR_LIT>""" <EOL> class GrocLexerWithErrors ( GrocLexer . GrocLexer ) : <EOL> """<STR_LIT>""" <EOL> def emitErrorMessage ( self , msg ) : <EOL> """<STR_LIT>""" <EOL> raise GrocException ( msg ) <EOL> class GrocParserWithErrors ( GrocParser . GrocParser ) : <EOL> """<STR_LIT>""" <EOL> def emitErrorMessage ( self , msg ) : <EOL> """<STR_LIT>""" <EOL> raise GrocException ( msg ) <EOL> def CreateParser ( parse_string ) : <EOL> """<STR_LIT>""" <EOL> input_string = antlr3 . ANTLRStringStream ( parse_string ) <EOL> lexer = GrocLexerWithErrors ( input_string ) <EOL> tokens = antlr3 . CommonTokenStream ( lexer ) <EOL> parser = GrocParserWithErrors ( tokens ) <EOL> return parser </s>
