pyconform.parsing

Parsing Module - NEW Based on PLY

This module defines the necessary elements to parse a string variable definition into the recognized elements that are used to construct an Operation Graph.

Copyright 2017-2020, University Corporation for Atmospheric Research LICENSE: See the LICENSE.rst file for details

class pyconform.parsing.FuncType(key, args, kwds)

Bases: tuple

args

Alias for field number 1

key

Alias for field number 0

kwds

Alias for field number 2

class pyconform.parsing.OpType(key, args)

Bases: tuple

args

Alias for field number 1

key

Alias for field number 0

class pyconform.parsing.VarType(key, ind)

Bases: tuple

ind

Alias for field number 1

key

Alias for field number 0

pyconform.parsing.ind_str(index)[source]
pyconform.parsing.op_str(self)[source]
pyconform.parsing.p_argument(p)[source]

argument : array_like argument : STRING

pyconform.parsing.p_argument_list_append(p)[source]

argument_list : argument_list ‘,’ argument

pyconform.parsing.p_array_like(p)[source]

array_like : UFLOAT array_like : UINT array_like : function array_like : variable

pyconform.parsing.p_array_like_group(p)[source]

array_like : ‘(‘ array_like ‘)’

pyconform.parsing.p_error(p)[source]
pyconform.parsing.p_expression_binary(p)[source]

array_like : array_like POW array_like array_like : array_like ‘-‘ array_like array_like : array_like ‘+’ array_like array_like : array_like ‘*’ array_like array_like : array_like ‘/’ array_like array_like : array_like ‘<’ array_like array_like : array_like ‘>’ array_like array_like : array_like LEQ array_like array_like : array_like GEQ array_like array_like : array_like EQ array_like

pyconform.parsing.p_expression_unary(p)[source]

array_like : ‘-‘ array_like %prec NEG array_like : ‘+’ array_like %prec POS

pyconform.parsing.p_function_with_arguments_and_keywords(p)[source]

function : NAME ‘(‘ argument_list ‘,’ keyword_dict ‘)’

pyconform.parsing.p_function_with_arguments_only(p)[source]

function : NAME ‘(‘ argument_list ‘)’

pyconform.parsing.p_function_with_keywords_only(p)[source]

function : NAME ‘(‘ keyword_dict ‘)’

pyconform.parsing.p_index(p)[source]

index : slice index : array_like

pyconform.parsing.p_index_list_append(p)[source]

index_list : index_list ‘,’ index

pyconform.parsing.p_keyword_dict_setitem(p)[source]

keyword_dict : keyword_dict ‘,’ NAME ‘=’ argument

pyconform.parsing.p_single_item_argument_list(p)[source]

argument_list : argument argument_list :

pyconform.parsing.p_single_item_index_list(p)[source]

index_list : index

pyconform.parsing.p_single_item_keyword_dict(p)[source]

keyword_dict : NAME ‘=’ argument

pyconform.parsing.p_slice(p)[source]

slice : slice_argument ‘:’ slice_argument ‘:’ slice_argument slice : slice_argument ‘:’ slice_argument

pyconform.parsing.p_slice_argument(p)[source]

slice_argument : array_like slice_argument :

pyconform.parsing.p_variable(p)[source]

variable : NAME ‘[‘ index_list ‘]’ variable : NAME

pyconform.parsing.parse_definition(strexpr)[source]
pyconform.parsing.t_STRING(t)[source]

“([^”\]*(\.[^”\]*)*)”|'([^'\]*(\.[^'\]*)*)'

pyconform.parsing.t_UFLOAT(t)[source]

(([0-9]+.[0-9]*|[0-9]*.[0-9]+)([eE][+-]?[0-9]+)?|[0-9]+[eE][+-]?[0-9]+)

pyconform.parsing.t_UINT(t)[source]

[0-9]+

pyconform.parsing.t_error(t)[source]