Commit e257281d authored by Eckhart Arnold's avatar Eckhart Arnold
Browse files

parser.py, ebnf.py: Allow Parsers for resume-skipping (refactorings pending)

parent 16a25786
import sys, os
try:
scriptpath = os.path.dirname(__file__)
except NameError:
scriptpath = ''
dhparser_parentdir = os.path.abspath(os.path.join(scriptpath, r'../..'))
if scriptpath not in sys.path:
sys.path.append(scriptpath)
if dhparser_parentdir not in sys.path:
sys.path.append(dhparser_parentdir)
import JSONParser
if __name__ == "__main__":
syntax_tree = JSONParser.parse_JSON('{ "one": 1, "two": 2 }')
JSONParser.transform_JSON(syntax_tree)
print(syntax_tree.as_sxpr())
print(syntax_tree.as_json(indent=None))
print(syntax_tree.as_xml())
print(syntax_tree.as_tree())
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment