Castle: The best Real-Time/Embedded/HighTech language EVER. Attempt 2
Revisão | c1d254b86a72fc5f1c121f95c92bd8f00a4f9e98 (tree) |
---|---|
Hora | 2022-04-23 20:08:21 |
Autor | Albert Mietus < albert AT mietus DOT nl > |
Commiter | Albert Mietus < albert AT mietus DOT nl > |
REFACTORED: Now we have a sub-package 'grammar' (in castle.reader.parser). It holds the (peg)grammar&vistitor to parser that chunk of of Castle
@@ -21,18 +21,18 @@ | ||
21 | 21 | pytest-demo: |
22 | 22 | -PYTHONPATH=`pwd` pytest -s demos || echo "currently NO pytest-demos (check/fix manually)" |
23 | 23 | |
24 | - | |
25 | - | |
26 | -missing_visitor: castle/readers/parser/grammar.py | |
24 | +LANGUAGEd=castle/readers/parser/grammar/ | |
25 | +missing_visitor: ${LANGUAGEd}language.py | |
27 | 26 | @for R in $(shell grep '^ *def ' $< | awk '{print $$2}' | sed 's/()://') ; do \ |
28 | - if ! grep -q -E "^ *((def)|(# *NO_VISITOR_NEEDED:)) *visit_$$R" castle/readers/parser/visitor.py > /dev/null ; then\ | |
27 | + if ! grep -q -E "^ *((def)|(# *NO_VISITOR_NEEDED:)) *visit_$$R" ${LANGUAGEd}visitor.py > /dev/null ; then\ | |
29 | 28 | echo "Warning: $${R} has no visitor (nor is marked as to need none)" ;\ |
30 | 29 | fi ;\ |
31 | 30 | done |
32 | 31 | |
33 | -missing_serialization: | |
34 | - @for R in ${shell grep '^ *class ' castle/ast/grammar.py | sed 's/class //g' | sed 's/[:( ].*$$//g' } ; do \ | |
35 | - if ! grep -q -E "^ *((def)|(# *NO_VISITOR_NEEDED:)) $${R}2xml" castle/ast/serialization/ast2xml/*.py > /dev/null ; then\ | |
32 | +ASTd=castle/ast/ | |
33 | +missing_serialization: ${ASTd}grammar.py | |
34 | + @for R in ${shell grep '^ *class ' $< | sed 's/class //g' | sed 's/[:( ].*$$//g' } ; do \ | |
35 | + if ! grep -q -E "^ *((def)|(# *NO_VISITOR_NEEDED:)) $${R}2xml" ${ASTd}serialization/ast2xml/*.py > /dev/null ; then\ | |
36 | 36 | echo "Warning: $${R} has no xml-serializer (nor is marked as to need none)" ;\ |
37 | 37 | fi ;\ |
38 | 38 | done |