
                             S r SSKJr  SSKJr  SSKJr  SSKrSr " S S	\5      r	 " S
 S\R                  5      r
 " S S\R
                  5      rS rg)z5A wrapper around the generated Groc parser and lexer.    )absolute_import   )	GrocLexer)
GrocParserNzarb@google.com (Anthony Baxter)c                       \ rS rSrSrSrg)GrocException    z6An error occurred while parsing the groc input string. N)__name__
__module____qualname____firstlineno____doc____static_attributes__r
       /lib/googlecloudsdk/appengine/googlecron/groc.pyr   r       s    >r   r   c                       \ rS rSrSrS rSrg)GrocLexerWithErrors$   z+An overridden Lexer that raises exceptions.c                     [        U5      ezRaise an exception if the input fails to parse correctly.

Overriding the default, which normally just prints a message to
stderr.

Arguments:
  msg: the error message

Raises:
  GrocException: always.
r   selfmsgs     r   emitErrorMessage$GrocLexerWithErrors.emitErrorMessage'        
r   r
   Nr   r   r   r   r   r   r   r
   r   r   r   r   $   s
    3r   r   c                       \ rS rSrSrS rSrg)GrocParserWithErrors6   z,An overridden Parser that raises exceptions.c                     [        U5      er   r   r   s     r   r   %GrocParserWithErrors.emitErrorMessage9   r   r   r
   Nr   r
   r   r   r!   r!   6   s
    4r   r!   c                     [         R                  " U 5      n[        U5      n[         R                  " U5      n[	        U5      nU$ )zCreates a Groc Parser.)antlr3ANTLRStringStreamr   CommonTokenStreamr!   )parse_stringinput_stringlexertokensparsers        r   CreateParserr.   H   s;    )),7,
l
+%##E*&'&	-r   )r   
__future__r    r   r   r&   
__author__	Exceptionr   r   r!   r.   r
   r   r   <module>r3      sR   ( < &   .
?I ?)-- $:00 $r   