示例#1
0
#!/usr/bin/env python2.4
# encoding: utf-8

# copyright (c) domenico carbotta <*****@*****.**>, 2005
# code released under the gnu gpl, see license.txt


__all__ = ['process_dtd']


from dtdparser import DTDParser
from dtdscanner import DTDScanner
from xuse.languages.toolchain import processor


process_dtd = processor(DTDScanner, DTDParser)


dtd_collection = '''

<!-- !DOCTYPE prova ("file.xml") -->

<!ELEMENT prova (ciao)*>
<!ATTLIST prova pluto #CDATA REQUIRED>
<!ELEMENT ciao (#PCDATA)>
'''

print process_dtd(dtd_collection)
示例#2
0
#!/usr/bin/env python2.4
# encoding: utf-8

# copyright (c) domenico carbotta <*****@*****.**>, 2005
# code released under the gnu gpl, see license.txt


__all__ = ['process_dlg', 'dltest']


from dlgparser import DatalogParser
from dlgscanner import DatalogScanner
from xuse.languages.toolchain import processor


process_dlg = processor(DatalogScanner, DatalogParser)


def dltest():    
    from xuse.languages.sdd import process_sdd
    
    from xuse.usecases.simple import sdd
    
    test_datalog = '''[[
    'dipendente@azienda'('Auto_Step1', 'Auto_X68', 'Auto_Step0', 'Auto_X69',
            'Auto_Step3', 'Auto_Step2'),
    'reparto@azienda'('Auto_Step0', 'Auto_X70', 'Auto_Post1', 'Auto_Step6',
            'Auto_X71'),
    'sede@azienda'('Auto_Post1', 'Auto_X72', 'Auto_Post0', 'Auto_X73'),
    'azienda@azienda'('Auto_Post0', 'Auto_X74', 'x_doc0', 'Auto_X75'),
    'dipendente@azienda'('Auto_Step4', 'Auto_X76', 'Auto_Step0', 'Auto_X77',
示例#3
0
#!/usr/bin/env python2.4
# encoding: utf-8

# copyright (c) domenico carbotta <*****@*****.**>, 2005
# code released under the gnu gpl, see license.txt


__all__ = ['process_loc']


from locparser import LocParser
from xuse.languages.xpathlog.xplscanner import XPLScanner
from xuse.languages.toolchain import processor


process_loc = processor(XPLScanner, LocParser)
示例#4
0
#!/usr/bin/env python2.4
# encoding: utf-8

# copyright (c) domenico carbotta <*****@*****.**>, 2005
# code released under the gnu gpl, see license.txt


__all__ = ['process_sdd']


from sddparser import SDDParser
from sddscanner import SDDScanner
from xuse.languages.toolchain import processor


process_sdd = processor(SDDScanner, SDDParser)
示例#5
0
#!/usr/bin/env python2.4
# encoding: utf-8

# copyright (c) domenico carbotta <*****@*****.**>, 2005
# code released under the gnu gpl, see license.txt


__all__ = ['process_xpl']


from xplparser import XPLParser
from xplscanner import XPLScanner
from xuse.languages.toolchain import processor


process_xpl = processor(XPLScanner, XPLParser)