You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For the preliminary implementation, a pattern is an expression, with some wildcards.
Wildcards are valid identifiers starting by one underscore.
For instance, _a + _b*_a is supposed to match p + b*p but not p + b*c.
We can use that to define the elements of syntax that we want, for instance to define _x[_inds](_t) as the generic form of a timed and index variable (like v_{i,t+1})
are there available libraries which do it efficiently ?
we probably want to "type" the wildcard so that, in the above example, _t could stand for a signed integer and _inds would be expected to be a list of indices
would we be better of by defining the expression parser ourselve instead of operating on the syntax tree ?
The text was updated successfully, but these errors were encountered:
For the preliminary implementation, a pattern is an expression, with some wildcards.
Wildcards are valid identifiers starting by one underscore.
For instance,
_a + _b*_a
is supposed to matchp + b*p
but notp + b*c
.We can use that to define the elements of syntax that we want, for instance to define
_x[_inds](_t)
as the generic form of a timed and index variable (likev_{i,t+1}
)There is a crude python implementation in https://github.com/EconForge/dolang/blob/master/dolang/pattern.py.
Some questions:
_t
could stand for a signed integer and_inds
would be expected to be a list of indicesThe text was updated successfully, but these errors were encountered: