Overview
Comment: | [build] compile rules: generated functions are now private |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | build | rg |
Files: | files | file ages | folders |
SHA3-256: |
ec15ccafa3337a8f93562463219601bf |
User & Date: | olr on 2018-06-24 12:28:14 |
Other Links: | branch diff | manifest | tags |
Context
2018-06-24
| ||
14:16 | [core] code cleaning (pylint) check-in: 48056be413 user: olr tags: core, rg | |
12:28 | [build] compile rules: generated functions are now private check-in: ec15ccafa3 user: olr tags: build, rg | |
12:19 | [core] grammar checker: code cleaning (pylint) check-in: 7042f71f35 user: olr tags: core, rg | |
Changes
Modified compile_rules.py from [5d5d5d7bf2] to [2382a8be81].
︙ | |||
154 155 156 157 158 159 160 | 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 | - + | #### REGEX TRIGGER i = s.find(" <<-") if i == -1: print("# Error: no condition at line " + sLineId) return None sRegex = s[:i].strip() s = s[i+4:] |
︙ | |||
246 247 248 249 250 251 252 | 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 | - + - + - + - + - + - + - - + + - - + + - - + + | print("# No action at line " + sIdAction) return None #### CONDITION sCondition = sAction[:m.start()].strip() if sCondition: sCondition = prepareFunction(sCondition) |
︙ | |||
545 546 547 548 549 550 551 | 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 | - - + - + - + - + - + | lSentenceRulesJS.append(jsconv.pyRuleToJS(aRule, dJSREGEXES, sWORDLIMITLEFT)) # creating file with all functions callable by rules print(" creating callables...") sPyCallables = "# generated code, do not edit\n" sJSCallables = "// generated code, do not edit\nconst oEvalFunc = {\n" for sFuncName, sReturn in lFUNCTIONS: |
︙ |
Modified compile_rules_graph.py from [809af5ab14] to [ef1f63d249].
︙ | |||
138 139 140 141 142 143 144 | 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 | - + - - - + + + | print("# Warning at line " + sActionId + ": This message looks like code. Line should probably begin with =") print(sText) def createAction (sActionId, sAction, nPriority, nToken, dPos): # Option sOption = False |
︙ | |||
196 197 198 199 200 201 202 | 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 | - + - - + + - - + + - - + + | checkTokenNumbers(sMsg, sActionId, nToken) if sMsg[0:1] == "=": sMsg = prepareFunction(sMsg[1:], True) dFUNCTIONS["g_m_"+sActionId] = sMsg sMsg = "=g_m_"+sActionId else: checkIfThereIsCode(sMsg, sActionId) |
︙ | |||
336 337 338 339 340 341 342 | 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 | - + - + - + - + | # print(k, "\t", v) # creating file with all functions callable by rules print(" creating callables...") sPyCallables = "# generated code, do not edit\n" #sJSCallables = "// generated code, do not edit\nconst oEvalFunc = {\n" for sFuncName, sReturn in dFUNCTIONS.items(): |
︙ |