4Suite API Documentation

Module Ft.Rdf.ThirdParty.n3p.n3p

N3P - An N3 Parser using n3.n3 Author: Sean B. Palmer, inamidst.com Licence: GPL 2; share and enjoy! Documentation: http://inamidst.com/n3p/ Derived from: http://www.w3.org/2000/10/swap/grammar/predictiveParser.py - predictiveParser.py, Tim Berners-Lee, 2004 Issues: http://lists.w3.org/Archives/Public/public-cwm-bugs/2005Jan/0006 http://lists.w3.org/Archives/Public/public-cwm-talk/2005JanMar/0015
Classes:
Functions:
Globals:

Classes

class N3Parser(object)

Methods

__init__(self, uri, branches, regexps)
Overrides: __init__ from class object
getToken(self)
onFinish(self)
onStart(self, prod)
onToken(self, prod, tok)
parse(self, prod)
token(self)
Memoizer for getToken.
whitespace(self)

Methods inherited from class object

__delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Members

__dict__ = <attribute '__dict__' of 'N3Parser' objects>
__weakref__ = <attribute '__weakref__' of 'N3Parser' objects>

Members inherited from class object

__class__

Functions

abbr(prodURI)
main(argv=None)

Globals

branches = {u'_:jcOJHCYs16': {u',': [u',', 'http://www.w3.org/2000/10/swap/grammar/n3#symbol', '_:jcOJHCYs16'], u'.': [], u'}': []}, u'_:jcOJHCYs20': {u',': [u',', 'http://www.w3.org/2000/10/swap/grammar/n3#symbol', '_:jcOJHCYs20'], u'.': [], u'}': []}, u'_:jcOJHCYs33': {u'.': [], u':': ['http://www.w3.org/2000/10/swap/grammar/n3#symbol', '_:jcOJHCYs16'], u'<': ['http://www.w3.org/2000/10/swap/grammar/n3#symbol', '_:jcOJHCYs16'], u'_': ['http://www.w3.org/2000/10/swap/grammar/n3#symbol', '_:jcOJHCYs16'], u'a': ['http://www.w3.org/2000/10/swap/grammar/n3#symbol', '_:jcOJHCYs16'], u'}': []}, u'_:jcOJHCYs36': {u'.': [], u':': ['http://www.w3.org/2000/10/swap/grammar/n3#symbol', '_:jcOJHCYs20'], u'<': ['http://www.w3.org/2000/10/swap/grammar/n3#symbol', '_:jcOJHCYs20'], u'_': ['http://www.w3.org/2000/10/swap/grammar/n3#symbol', '_:jcOJHCYs20'], u'a': ['http://www.w3.org/2000/10/swap/grammar/n3#symbol', '_:jcOJHCYs20'], u'}': []}, u'_:jcOJHCYs44': {u'.': [], u'_': ['http://www.w3.org/2000/10/swap/grammar/n3#barename', '_:jcOJHCYs9'], u'a': ['http://www.w3.org/2000/10/swap/grammar/n3#barename', '_:jcOJHCYs9'], u'}': []}, u'_:jcOJHCYs9': {u',': [u',', 'http://www.w3.org/2000/10/swap/grammar/n3#barename', '_:jcOJHCYs9'], u'.': [], u'}': []}, u'http://www.w3.org/2000/10/swap/grammar/n3#declaration': {u'@keywords': [u'@keywords', '_:jcOJHCYs44'], u'@prefix': [u'@prefix', 'http://www.w3.org/2000/10/swap/grammar/n3#qname', 'http://www.w3.org/2000/10/swap/grammar/n3#explicituri']}, u'http://www.w3.org/2000/10/swap/grammar/n3#document': {u'"': ['http://www.w3.org/2000/10/swap/grammar/n3#statements_optional', 'http://www.w3.org/2000/10/swap/grammar/bnf#eof'], u'(': ['http://www.w3.org/2000/10/swap/grammar/n3#statements_optional', 'http://www.w3.org/2000/10/swap/grammar/bnf#eof'], u'+': ['http://www.w3.org/2000/10/swap/grammar/n3#statements_optional', 'http://www.w3.org/2000/10/swap/grammar/bnf#eof'], u'-': ['http://www.w3.org/2000/10/swap/grammar/n3#statements_optional', 'http://www.w3.org/2000/10/swap/grammar/bnf#eof'], u'0': ['http://www.w3.org/2000/10/swap/grammar/n3#statements_optional', 'http://www.w3.org/2000/10/swap/grammar/bnf#eof'], u':': ['http://www.w3.org/2000/10/swap/grammar/n3#statements_optional', 'http://www.w3.org/2000/10/swap/grammar/bnf#eof'], u'<': ['http://www.w3.org/2000/10/swap/grammar/n3#statements_optional', 'http://www.w3.org/2000/10/swap/grammar/bnf#eof'], u'?': ['http://www.w3.org/2000/10/swap/grammar/n3#statements_optional', 'http://www.w3.org/2000/10/swap/grammar/bnf#eof'], u'@EOFDUMMY': ['http://www.w3.org/2000/10/swap/grammar/n3#statements_optional', 'http://www.w3.org/2000/10/swap/grammar/bnf#eof'], u'@forAll': ['http://www.w3.org/2000/10/swap/grammar/n3#statements_optional', 'http://www.w3.org/2000/10/swap/grammar/bnf#eof'], ...}, u'http://www.w3.org/2000/10/swap/grammar/n3#dtlang': {u'!': [], u'"': [], u'(': [], u')': [], u'+': [], u',': [], u'-': [], u'.': [], u'0': [], u':': [], ...}, u'http://www.w3.org/2000/10/swap/grammar/n3#existential': {u'@forSome': [u'@forSome', '_:jcOJHCYs36']}, ...}
notNameChars = '\t\r\n !"#$%&\'()*.,+/;<=>?[\\]^`{|}~@:'
notQNameChars = '\t\r\n !"#$%&\'()*.,+/;<=>?[\\]^`{|}~@'
r_name = <_sre.SRE_Pattern object>
r_qname = <_sre.SRE_Pattern object>
r_whitespace = <_sre.SRE_Pattern object>
regexps = {u'http://www.w3.org/2000/10/swap/grammar/n3#barename': <_sre.SRE_Pattern object>, u'http://www.w3.org/2000/10/swap/grammar/n3#explicituri': <_sre.SRE_Pattern object>, u'http://www.w3.org/2000/10/swap/grammar/n3#langcode': <_sre.SRE_Pattern object>, u'http://www.w3.org/2000/10/swap/grammar/n3#numericliteral': <_sre.SRE_Pattern object>, u'http://www.w3.org/2000/10/swap/grammar/n3#qname': <_sre.SRE_Pattern object>, u'http://www.w3.org/2000/10/swap/grammar/n3#string': <_sre.SRE_Pattern object>, u'http://www.w3.org/2000/10/swap/grammar/n3#variable': <_sre.SRE_Pattern object>}
singleCharacterSelectors = '\t\r\n !"#$%&\'()*.,+/;<=>?[\\]^`{|}~'
start = 'http://www.w3.org/2000/10/swap/grammar/n3#document'