• R/O
  • SSH

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Castle: The best Real-Time/Embedded/HighTech language EVER. Attempt 2


Commit MetaInfo

Revisión70b8c4ed931b653425b9b872a1e85c201972b694 (tree)
Tiempo2022-02-12 03:06:30
AutorAlbert Mietus < albert AT mietus DOT nl >
CommiterAlbert Mietus < albert AT mietus DOT nl >

Log Message

Merged

Cambiar Resumen

Diferencia incremental

diff -r 19c993f946c4 -r 70b8c4ed931b Makefile
--- a/Makefile Fri Feb 11 18:45:34 2022 +0100
+++ b/Makefile Fri Feb 11 19:06:30 2022 +0100
@@ -37,3 +37,8 @@
3737 done
3838 XXX:
3939 grep XXX `find . -type f -name \*.py`
40+
41+clean: clean_caches
42+clean_caches:
43+ find . -type d -name __pycache__ -print0 | xargs -0 rm -r
44+ find . -type d -name .pytest_cache -print0 | xargs -0 rm -r
diff -r 19c993f946c4 -r 70b8c4ed931b pytst/writers/python/test_1_rules.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/pytst/writers/python/test_1_rules.py Fri Feb 11 19:06:30 2022 +0100
@@ -0,0 +1,21 @@
1+import pytest
2+
3+from jinja2 import Template
4+
5+from castle.ast import peg # To build the ATS
6+
7+
8+
9+def __test_simple_rule():
10+ expected = """def rule_crossref():\treturn ID"""
11+ castle = """rule_crossref <- ID ;"""
12+
13+ ## Build the AST -- Ignoring the parse_tree
14+ id_rn = peg.ID(name="rule_crossref")
15+ id_xr = peg.ID(name="ID")
16+
17+
18+## expressions = peg.Sequence(value=id_xr
19+## rule = peg.Rule(name=id_rn, expr=expressions)
20+
21+## Template("""def {{rule.name}}()\treturn{rule.expro