Module Expr Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore ListLoad Str Str ImportFrom alias ImportFrom alias alias alias Assign NameStore Str Assign NameStore Call NameLoad NameLoad Str Assign NameStore Call NameLoad NameLoad Str FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str Return Call AttributeLoad NameLoad attr NameLoad keyword NameLoad decorator_list If CompareEq NameLoad Str body Import alias alias If CompareGt Call NameLoad AttributeLoad NameLoad attr Num body Assign NameStore Call AttributeLoad Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad
N/A N/A 
:mod:`bibstuff.bibgrammar` --- BibTeX Parser
============================================

Provides an EBNF description of the bibtex bibliography format.
The grammar draws largely from
the grammar description in Nelson Beebe's `Lex/Yacc parser`_
and also from
Greg Ward's btOOL_ documentation.

:author: Dylan Schwilk
:contact: http://www.schwilk.org
:author: Alan G Isaac
:contact: http://www.american.edu/cas/econ/faculty/faculty.htm#isaac
:license: MIT (see `license.txt`_)
:date: 2008-06-28


.. _license.txt: ./license.txt
.. _`Lex/Yacc parser`: http://www.math.utah.edu/~beebe/
.. _btooL: http://www.tug.org/tex-archive/biblio/bibtex/utils/btOOL/
 N/A __docformat__ restructuredtext en N/A __needs__ 2.4 N/A __version__ 1.7 N/A __author__ N/A Dylan W. Schwilk Alan G Isaac simpleparse.parser Parser simpleparse.common numbers strings chartypes N/A dec 
bibfile              := entry_or_junk+
>entry_or_junk<      := (tb, object) / (tb, junk)
>object<             := entry / macro / preamble / comment_entry
entry                := '@', entry_type, tb,  ( '{' , tb, contents, tb, '}' ) / ( '(' , tb, contents, tb, ')' )
macro                := c'@string', tb,  ( '{' , tb, macro_contents, tb, '}' ) / ( '(' , tb, macro_contents, tb, ')' )
preamble             := '@', entry_type, tb,  ( '{' , tb, preamble_contents, tb, '}' ) / ( '(' , tb, preamble_contents, tb, ')' )
comment_entry        := '@', entry_type, tb, string
>contents<           := citekey , tb, ',' , tb, fields
>macro_contents<     := field
>preamble_contents<  := value
entry_type           := alpha_name
citekey              := number / name
fields               := (field_comma / field)+
>field_comma<        := field , tb, ',', tb
field                := name, tb, '=' , tb, value
value                := simple_value  / (simple_value, (tb,'#', tb, simple_value)+)
>simple_value<       :=  string / number / name
alpha_name           := [a-zA-Z]+
name                 := []-[a-z_A-Z!$&+./:;<>?^`|'] , []-[a-z_A-Z0-9!$&+./:;<>?^`|']*
number               :=  [0-9]+ / ([[0-9]+, tb, [-]+, tb, [0-9]+)
string               :=  ('\"' , quotes_string?, '\"') / ('{' , braces_string?, '}')
<braces_string>      := (-[{}@]+ / string)+
<quotes_string>      := (-[\"{}]+ / ('{', braces_string,'}'))+
<junk>               := -[ \t\r\n]+
<tb>                 := (comment / ws)*
<ws>                 := [ \t\n\r]
<comment>            := '%' , -[\n]*, '\n'
 N/A parser N/A Parser dec bibfile N/A entry_parser N/A Parser dec entry Parse N/A N/A src processor N/A None N/A N/A Parse the bibtex string *src*, process with *processor*. N/A N/A N/A parser parse src processor processor N/A N/A N/A __name__ __main__ N/A N/A sys pprint N/A N/A N/A len N/A sys argv 1 N/A N/A src N/A N/A N/A open N/A N/A sys argv N/A 1 read N/A taglist N/A Parse src N/A N/A N/A pprint pprint taglist