kojismokydingo.sift.parse¶
Koji Smoky Dingo - Sifty Dingo Parser
This is the parser for the Sift Dingo filtering language.
- author:
Christopher O'Brien <obriencj@gmail.com>
- license:
GPL v3
- class Glob(src, ignorecase=False)[source]¶
Bases:
Matcher
A glob is a quoted literal using pipes as quotes
Examples:
|*foo|
is a case-sensitive match for text ending in foo|*foo|i
is a case-insensitive match for text ending in foo
- class ItemMatch(key)[source]¶
Bases:
Item
Seeks path members by comparison of keys to a matcher (eg. a
Glob
orRegex
)
- class ItemPath(*paths)[source]¶
Bases:
object
Represents a collection of elements inside a nested tree of lists and dicts
- class Null[source]¶
Bases:
Matcher
An empty literal, represented by the symbols
null
orNone
. Matches only with the python None value.
- class Number[source]¶
-
A number is a literal made entirely of digits. It can compare with both the python int and str types.
- class Regex(src, flags=None)[source]¶
Bases:
Matcher
A regex is a quoted literal using forward-slashes as quotes
Examples:
/.*foo$/
is a case-sensitive match for text ending in foo/.*foo$/i
is a case-insensitive match for text ending in foo
- class Symbol[source]¶
-
An unquoted literal series of characters. A symbol can compare with python str instances.
- class SymbolGroup(src, groups)[source]¶
Bases:
Matcher
A symbol group is a literal symbol with multiple permutations. It is represented as a symbol containing groups within curly-braces
Examples:
{foo,bar}-candidate
is equal to foo-candidate and bar-candidatefoo-{1..3}
is equal to any of foo-1, foo-2, foo-3