parameters: (self, lexer=None, **kwargs)
docstring: Constructs the JsonParser based on the grammar contained herein.
  
          Successful construction builds the ply.yacc instance and sets
          self.parser.
          
          Args:
          lexer: A ply.lex or JsonLexer instance that will produce JSON_TOKENS.
docstring_summary: Constructs the JsonParser based on the grammar contained herein.
docstring_tokens: Constructs the JsonParser based on the grammar contained herein .
function: def __init__(self, lexer=None, **kwargs):
          '''Constructs the JsonParser based on the grammar contained herein.
  
          Successful construction builds the ply.yacc instance and sets
          self.parser.
          
          Args:
          lexer: A ply.lex or JsonLexer instance that will produce JSON_TOKENS.
          '''
          if lexer is not None:
              if isinstance(lexer, Pub1Lexer):
                  self.lexer = lexer.lexer
              else:
                  # Assume that the lexer is a ply.lex instance or similar
                  self.lexer = lexer
          else:
              self.lexer = Pub1Lexer().lexer
          self.parser = ply.yacc.yacc(module=self, **kwargs)
function_tokens: def __init__ ( self , lexer = None , * * kwargs ) : if lexer is not None : if isinstance ( lexer , Pub1Lexer ) : self . lexer = lexer . lexer else : # Assume that the lexer is a ply.lex instance or similar self . lexer = lexer else : self . lexer = Pub1Lexer ( ) . lexer self . parser = ply . yacc . yacc ( module = self , * * kwargs )