Package Pyblio :: Package Format :: Module DSL
[hide private]
[frames] | no frames]

Module DSL

source code

Basic syntactic elements used to format a citation.

This module defines the base syntax elements providing the formatting domain specific language.

Classes [hide private]
  Glue
A base class that known how to join together multiple fragments of DSL code.
  _Sum
  _Or
  _S1T
This is a stage 1 text, ie a text that returns a stage 2 text when called.
  _Join
The join operator is used to join together multiple fragments of records:
  switch
The switch operator helps in bringing together multiple citation parts, according to the value of a Txo.
  i18n
Translatable content.
  _Validated
Base class for attribute accessors, providing some checks for stage 2.
  all
  one
  _record_key
  _SynTag
This is a layout tag before its [] marker.
  _Tag
This is a layout tag after its [] marker, but before the compilation.
  _Proto
Proto is a string subclass.
Functions [hide private]
 
_deferredText(text)
Ensure the parameter is a stage 1 object.
source code
 
join(middle, last=None) source code
 
lazy(fn)
Transform a simple function into a lazy function lifted in the formatting system.
source code
Variables [hide private]
  record_key = _record_key()
  glob = {'A': 'A', 'B': 'B', 'BR': DSL.Tag('br', children=[_S1T...
  BR = DSL.Tag('br', children=[_S1T('')])
  A = 'A'
  B = 'B'
  I = 'I'
  Small = 'Small'
  Span = 'Span'
  t = 'Span'
Function Details [hide private]

lazy(fn)

source code 

Transform a simple function into a lazy function lifted in the formatting system.

This is only sugar : the initial function must be aware that every argument must be made strict by calling them before use.

Variables Details [hide private]

glob

Value:
{'A': 'A',
 'B': 'B',
 'BR': DSL.Tag('br', children=[_S1T('')]),
 'Glue': <class 'Pyblio.Format.DSL.Glue'>,
 'I': 'I',
 'Missing': <class Pyblio.Format.Base.Missing at 0x86a2b6c>,
 'S2': <module 'Pyblio.Format.S2' from '/home/fred/devel/pyblio/1.3/co\
re/Pyblio/Format/S2.pyc'>,
...