Exemple #1
0
   Identifier(u'series'),
   Identifier(u'title'),
   Identifier(u'type'),
   Identifier(u'volume'),
   Identifier(u'year')],
  [],
  [Identifier(u'label')]],
 [u'INTEGERS',
  [Identifier(u'output.state'),
   Identifier(u'before.all'),
   Identifier(u'mid.sentence'),
   Identifier(u'after.sentence'),
   Identifier(u'after.block')]],
 [u'FUNCTION',
  [Identifier(u'init.state.consts')],
  [Integer(0),
   QuotedVar(u'before.all'),
   Identifier(u':='),
   Integer(1),
   QuotedVar(u'mid.sentence'),
   Identifier(u':='),
   Integer(2),
   QuotedVar(u'after.sentence'),
   Identifier(u':='),
   Integer(3),
   QuotedVar(u'after.block'),
   Identifier(u':=')]],
 [u'STRINGS', [Identifier(u's'), Identifier(u't')]],
 [u'FUNCTION',
  [Identifier(u'output.nonnull')],
  [QuotedVar(u's'),
Exemple #2
0
def process_int_literal(value):
    return Integer(int(value.strip('#')))