MCPcopy
hub / github.com/KhronosGroup/Vulkan-Docs / dependencyBNF

Function dependencyBNF

scripts/parse_dependency.py:133–158  ·  view source on GitHub ↗

boolop :: '+' | ',' extname :: Char(alphas) atom :: extname | '(' expr ')' expr :: atom [ boolop atom ]*

()

Source from the content-addressed store, hash-verified

131# BNF grammar for depends expressions
132_bnf = None
133def dependencyBNF():
134 """
135 boolop :: '+' | ','
136 extname :: Char(alphas)
137 atom :: extname | '(' expr ')'
138 expr :: atom [ boolop atom ]*
139 """
140 global _bnf
141 if _bnf is None:
142 and_, or_ = map(Literal, '+,')
143 lpar, rpar = map(Suppress, '()')
144 boolop = and_ | or_
145
146 expr = Forward()
147 expr_list = DelimitedList(Group(expr))
148 atom = (
149 boolop[...]
150 + (
151 (dependencyIdent).set_parse_action(push_first)
152 | Group(lpar + expr + rpar)
153 )
154 )
155
156 expr <<= atom + (boolop + atom).set_parse_action(push_first)[...]
157 _bnf = expr
158 return _bnf
159
160
161# Protect identifier: standard identifier optionally prefixed with '!' for negation

Callers 3

evaluateDependencyFunction · 0.85
dependencyLanguageFunction · 0.85
dependencyNamesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected