zospy.analyses.new.parsers.transformers.ZospyTransformer#

class zospy.analyses.new.parsers.transformers.ZospyTransformer#

Bases: Transformer

Methods

DATE

alias of str

FLOAT(f)

Floating point number with localized decimal separator.

INT

alias of int

UINT

alias of int

WORD

alias of str

dict(args)

Kay-value mapping.

field_group(args)

A group of fields under a common key.

field_name(name)

Field name.

field_parameters(args)

Field parameters.

field_value(value)

Field value.

list

Built-in mutable sequence.

multi_string(iterable, /)

Concatenate any number of strings.

parametric_field(args)

A field with parameters.

parametric_unit_field(args)

A field with parameters and a unit.

simple_field(args)

A simple field with a name and a value.

start(args)

The root of the parse tree.

string_list(args)

List of whitespace-separated strings.

table(args)

A table with a header and one or more rows.

text(args)

Text that can be ignored.

transform(tree)

Transform the given tree, and return the final result

unit(args)

Unit of measurement.

unit_field(args)

A field with a unit.

DATE#

alias of str

FLOAT(f: str) float#

Floating point number with localized decimal separator.

INT#

alias of int

UINT#

alias of int

WORD#

alias of str

dict(args)#

Kay-value mapping.

field_group(args)#

A group of fields under a common key.

field_name(name) str#

Field name.

field_parameters(args)#

Field parameters.

field_value(value)#

Field value.

class list#

Bases: object

Built-in mutable sequence.

If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.

Methods

append(object, /)

Append object to the end of the list.

clear(/)

Remove all items from list.

copy(/)

Return a shallow copy of the list.

count(value, /)

Return number of occurrences of value.

extend(iterable, /)

Extend list by appending elements from the iterable.

index(value[, start, stop])

Return first index of value.

insert(index, object, /)

Insert object before index.

pop([index])

Remove and return item at index (default last).

remove(value, /)

Remove first occurrence of value.

reverse(/)

Reverse IN PLACE.

sort(*[, key, reverse])

Sort the list in ascending order and return None.

__init__(*args, **kwargs)#
__new__(*args, **kwargs)#
append(object, /)#

Append object to the end of the list.

clear(/)#

Remove all items from list.

copy(/)#

Return a shallow copy of the list.

count(value, /)#

Return number of occurrences of value.

extend(iterable, /)#

Extend list by appending elements from the iterable.

index(value, start=0, stop=sys.maxsize, /)#

Return first index of value.

Raises ValueError if the value is not present.

insert(index, object, /)#

Insert object before index.

pop(index=-1, /)#

Remove and return item at index (default last).

Raises IndexError if list is empty or index is out of range.

remove(value, /)#

Remove first occurrence of value.

Raises ValueError if the value is not present.

reverse(/)#

Reverse IN PLACE.

sort(*, key=None, reverse=False)#

Sort the list in ascending order and return None.

The sort is in-place (i.e. the list itself is modified) and stable (i.e. the order of two equal elements is maintained).

If a key function is given, apply it once to each list item and sort them, ascending or descending, according to their function values.

The reverse flag can be set to sort in descending order.

multi_string(iterable, /)#

Concatenate any number of strings.

The string whose method is called is inserted in between each given string. The result is returned as a new string.

Example: ‘.’.join([‘ab’, ‘pq’, ‘rs’]) -> ‘ab.pq.rs’

parametric_field(args) SimpleField[ParametricField]#

A field with parameters.

parametric_unit_field(args) SimpleField[ParametricField[UnitField]]#

A field with parameters and a unit.

simple_field(args) SimpleField#

A simple field with a name and a value.

start(args)#

The root of the parse tree.

string_list(args) list[str]#

List of whitespace-separated strings.

table(args)#

A table with a header and one or more rows.

text(args)#

Text that can be ignored.

unit(args) str#

Unit of measurement.

unit_field(args) SimpleField[UnitField]#

A field with a unit.