simpleparse.common | index /home/mcfletch/pylive/simpleparse/common/__init__.py |
Common (library) definitions
You normally use this module by importing one of our
sub-modules (which automatically registers itself with
the SOURCES list defined here).
Calling common.share( dictionary ) with a dictionary
mapping string names to element token instances will
make the element tokens available under those string
names in default parsers. Note: a Parser can override
this by specifying an explicit definitionSources
parameter in its initialiser.
Package Contents | ||
__init__ -- Common (library) definitions calendar_names -- Locale-specific calendar names (day-of-week and month-of-year) chartypes -- Common locale-specific character types comments -- Common comment formats iso_date -- Canonical ISO date format YYYY-MM-DDTHH:mm:SS+HH:mm iso_date_loose -- Somewhat Looser ISO date format YYYY-MM-DD HH:mm:SS +HH:mm numbers -- Samples showing the parsing of common programming-language constructs phonetics -- Phonetic spellings for character values strings -- Python string parsers with escape characters timezone_names -- Common timezone names (civilian, military and combined) |
Functions | ||
|
Data | ||
SOURCES = [{'locale_day_abbrs': FirstOfGroup(
children = [
Literal(
...l(
value = 'Fri',
),
],
), 'locale_day_abbrs_lc': FirstOfGroup(
children = [
Literal(
...l(
value = 'fri',
),
],
), 'locale_day_abbrs_uc': FirstOfGroup(
children = [
Literal(
...l(
value = 'FRI',
),
],
), 'locale_day_names': FirstOfGroup(
children = [
Literal(
... value = 'Friday',
),
],
), 'locale_day_names_lc': FirstOfGroup(
children = [
Literal(
... value = 'friday',
),
],
), 'locale_day_names_uc': FirstOfGroup(
children = [
Literal(
... value = 'FRIDAY',
),
],
), 'locale_month_abbrs': FirstOfGroup(
children = [
Literal(
...eral(
value = '',
),
],
), 'locale_month_abbrs_lc': FirstOfGroup(
children = [
Literal(
...eral(
value = '',
),
],
), 'locale_month_abbrs_uc': FirstOfGroup(
children = [
Literal(
...eral(
value = '',
),
],
), 'locale_month_names': FirstOfGroup(
children = [
Literal(
...eral(
value = '',
),
],
), ...}, {'EOF': Prebuilt(
value = ((None, 101, 1),),
), 'ascii_letter': Range(
value = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ',
), 'ascii_letters': Range(
repeating = 1,
value = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ',
), 'ascii_lowercase': Range(
repeating = 1,
value = 'abcdefghijklmnopqrstuvwxyz',
), 'ascii_lowercasechar': Range(
value = 'abcdefghijklmnopqrstuvwxyz',
), 'ascii_uppercase': Range(
repeating = 1,
value = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
), 'ascii_uppercasechar': Range(
value = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
), 'digit': Range(
value = '0123456789',
), 'digits': Range(
repeating = 1,
value = '0123456789',
), 'hexdigit': Range(
value = '0123456789abcdefABCDEF',
), ...}, {'c_comment': LibraryElement(
production = 'slashbang_comm...enerator.Generator instance at 0x2aaaad5dedd0>,
), 'c_nest_comment': LibraryElement(
production = 'slashbang_nest...enerator.Generator instance at 0x2aaaad5e7170>,
), 'hash_comment': LibraryElement(
production = 'hash_comment',...enerator.Generator instance at 0x2aaaad5d9128>,
), 'semicolon_comment': LibraryElement(
production = 'semicolon_comm...enerator.Generator instance at 0x2aaaad5d9128>,
), 'slashbang_comment': LibraryElement(
production = 'slashbang_comm...enerator.Generator instance at 0x2aaaad5dedd0>,
), 'slashbang_nest_comment': LibraryElement(
production = 'slashbang_nest...enerator.Generator instance at 0x2aaaad5e7170>,
), 'slashslash_comment': LibraryElement(
production = 'slashslash_com...enerator.Generator instance at 0x2aaaad5d9128>,
)}, {'binary_number': LibraryElement(
production = 'binary_number'...enerator.Generator instance at 0x2aaaad5f69e0>,
), 'float': LibraryElement(
production = 'float',
ge...enerator.Generator instance at 0x2aaaad5f69e0>,
), 'float_floatexp': LibraryElement(
production = 'float_floatexp...enerator.Generator instance at 0x2aaaad5f69e0>,
), 'hex': LibraryElement(
production = 'hex',
gene...enerator.Generator instance at 0x2aaaad5f69e0>,
), 'imaginary_number': LibraryElement(
production = 'imaginary_numb...enerator.Generator instance at 0x2aaaad5f69e0>,
), 'int': LibraryElement(
production = 'int',
gene...enerator.Generator instance at 0x2aaaad5f69e0>,
), 'int_unsigned': LibraryElement(
production = 'int_unsigned',...enerator.Generator instance at 0x2aaaad5f69e0>,
), 'number': LibraryElement(
production = 'number',
g...enerator.Generator instance at 0x2aaaad5f69e0>,
), 'number_full': LibraryElement(
production = 'number_full',
...enerator.Generator instance at 0x2aaaad5f69e0>,
)}, {'ISO_date': LibraryElement(
production = 'ISO_date',
...enerator.Generator instance at 0x2aaaad5dca28>,
), 'ISO_date_time': LibraryElement(
production = 'ISO_date_time'...enerator.Generator instance at 0x2aaaad5dca28>,
), 'ISO_time': LibraryElement(
production = 'ISO_time',
...enerator.Generator instance at 0x2aaaad5dca28>,
)}, {'ISO_date_loose': LibraryElement(
production = 'ISO_date_loose...enerator.Generator instance at 0x2aaaad6009e0>,
), 'ISO_date_time_loose': LibraryElement(
production = 'ISO_date_time_...enerator.Generator instance at 0x2aaaad6009e0>,
), 'ISO_time_loose': LibraryElement(
production = 'ISO_time_loose...enerator.Generator instance at 0x2aaaad6009e0>,
)}, {'military_alphabet_char': FirstOfGroup(
children = [
Literal(
...(
value = 'Zulu',
),
],
), 'military_alphabet_char_lower': FirstOfGroup(
children = [
Literal(
...(
value = 'zulu',
),
],
)}, {'string': LibraryElement(
production = 'string',
g...enerator.Generator instance at 0x2aaaad608d88>,
), 'string_double_quote': LibraryElement(
production = 'str',
gene...enerator.Generator instance at 0x2aaaad82b200>,
), 'string_single_quote': LibraryElement(
production = 'str',
gene...enerator.Generator instance at 0x2aaaad602680>,
), 'string_triple_double': LibraryElement(
production = 'str',
gene...enerator.Generator instance at 0x2aaaad5d95a8>,
), 'string_triple_single': LibraryElement(
production = 'str',
gene...enerator.Generator instance at 0x2aaaad827710>,
)}, {'civilian_timezone_name': FirstOfGroup(
children = [
Literal(
...
value = 'ACSST',
),
],
), 'military_timezone_name': FirstOfGroup(
children = [
Literal(
...ral(
value = 'A',
),
],
), 'timezone_name': FirstOfGroup(
children = [
Literal(
...ral(
value = 'A',
),
],
)}] __path__ = ['/home/mcfletch/pylive/simpleparse/common'] |