Gaudi Framework, version v21r8

Home   Generated: 17 Mar 2010

simplejson::decoder Namespace Reference


Functions

def _floatconstants
def linecol
def errmsg

Variables

 c_scanstring = None
list __all__ = ['JSONDecoder']
 FLAGS = re.VERBOSE|re.MULTILINE|re.DOTALL
dictionary _CONSTANTS


Detailed Description

Implementation of JSONDecoder

Function Documentation

def simplejson::decoder::_floatconstants (  )  [private]

Definition at line 17 of file decoder.py.

00017                      :
00018     _BYTES = '7FF80000000000007FF0000000000000'.decode('hex')
00019     if sys.byteorder != 'big':
00020         _BYTES = _BYTES[:8][::-1] + _BYTES[8:][::-1]
00021     nan, inf = struct.unpack('dd', _BYTES)
00022     return nan, inf, -inf
00023 
00024 NaN, PosInf, NegInf = _floatconstants()
00025 
00026 
def linecol(doc, pos):

def simplejson::decoder::errmsg (   msg,
  doc,
  pos,
  end = None 
)

Definition at line 36 of file decoder.py.

00036                                    :
00037     # Note that this function is called from _speedups
00038     lineno, colno = linecol(doc, pos)
00039     if end is None:
00040         #fmt = '{0}: line {1} column {2} (char {3})'
00041         #return fmt.format(msg, lineno, colno, pos)
00042         fmt = '%s: line %d column %d (char %d)'
00043         return fmt % (msg, lineno, colno, pos)
00044     endlineno, endcolno = linecol(doc, end)
00045     #fmt = '{0}: line {1} column {2} - line {3} column {4} (char {5} - {6})'
00046     #return fmt.format(msg, lineno, colno, endlineno, endcolno, pos, end)
00047     fmt = '%s: line %d column %d - line %d column %d (char %d - %d)'
00048     return fmt % (msg, lineno, colno, endlineno, endcolno, pos, end)
00049 
00050 
_CONSTANTS = {

def simplejson::decoder::linecol (   doc,
  pos 
)

Definition at line 27 of file decoder.py.

00027                      :
00028     lineno = doc.count('\n', 0, pos) + 1
00029     if lineno == 1:
00030         colno = pos
00031     else:
00032         colno = pos - doc.rindex('\n', 0, pos)
00033     return lineno, colno
00034 
00035 
def errmsg(msg, doc, pos, end=None):


Variable Documentation

Definition at line 13 of file decoder.py.

Initial value:

{
    '-Infinity': NegInf,
    'Infinity': PosInf,
    'NaN': NaN,
}

Definition at line 51 of file decoder.py.

Definition at line 11 of file decoder.py.

simplejson::decoder::FLAGS = re.VERBOSE|re.MULTILINE|re.DOTALL

Definition at line 15 of file decoder.py.


Generated at Wed Mar 17 18:22:39 2010 for Gaudi Framework, version v21r8 by Doxygen version 1.5.6 written by Dimitri van Heesch, © 1997-2004