This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pyparsing import * | |
# By default, PyParsing treats \n as whitespace and ignores it | |
# In our grammer, \n is significant, so tell PyParsing not to ignore it | |
ParserElement.setDefaultWhitespaceChars(" \t") | |
def parse(input_string): | |
def convert_prop_to_dict(tokens): | |
"""Convert a list of field property tokens to a dict""" | |
prop_dict = {} |