Castle: The best Real-Time/Embedded/HighTech language EVER. Attempt 2
Revision | 8630266187d0837b2ddca5b5c3bba656ab486daf (tree) |
---|---|
Zeit | 2022-04-19 23:59:48 |
Autor | Albert Mietus < albert AT mietus DOT nl > |
Commiter | Albert Mietus < albert AT mietus DOT nl > |
Design/Peg.puml rewriten do it order top-down, without forcing
@@ -40,85 +40,80 @@ | ||
40 | 40 | package Peg #0077ff { |
41 | 41 | |
42 | 42 | abstract PEG |
43 | -PEG =up=|> AST_BASE | |
43 | +AST_BASE <|== PEG | |
44 | 44 | |
45 | 45 | |
46 | 46 | |
47 | 47 | abstract Terminal |
48 | -Terminal =up=|> PEG | |
49 | -Terminal --up--|> MixIn_value_attribute | |
50 | -StrTerm =up=|> Terminal | |
51 | -RexExpTerm =up=|> Terminal | |
52 | -Number =up=|> Terminal | |
48 | +PEG <|== Terminal | |
49 | +MixIn_value_attribute <|... Terminal | |
50 | +Terminal <|== StrTerm | |
51 | +Terminal <|== RexExpTerm | |
52 | +Terminal <|== Number | |
53 | 53 | |
54 | -abstract Markers #ORANGE | |
55 | -Markers =up=|> PEG | |
56 | -annotation EOF #ORANGE | |
57 | -EOF =up=|> Markers | |
54 | +abstract Markers #Orange | |
55 | +annotation EOF #Orange | |
56 | +PEG <|== Markers | |
57 | +Markers <|== EOF | |
58 | 58 | |
59 | 59 | abstract NonTerminal |
60 | -NonTerminal =up=|> PEG | |
60 | +PEG <|== NonTerminal | |
61 | 61 | abstract Expression |
62 | -Expression =up=|> NonTerminal | |
62 | +NonTerminal <|== Expression | |
63 | 63 | |
64 | 64 | class Setting { |
65 | 65 | name : ID |
66 | 66 | value |
67 | 67 | } |
68 | -Setting =up=|> PEG | |
69 | -Setting -up-> ID | |
68 | +PEG <|== Setting | |
70 | 69 | |
71 | 70 | class Rule { |
72 | 71 | name :ID |
73 | 72 | expr :[] Expression |
74 | 73 | } |
75 | -Rule =up=|> NonTerminal | |
76 | -Rule -up-> ID | |
77 | -Rule ---> Expression | |
74 | +NonTerminal <|== Rule | |
78 | 75 | |
79 | 76 | interface Rules |
80 | -Rules =up=|> PEG | |
81 | -Rules --up--|> MixIn_children_tuple | |
82 | - | |
83 | -ParseRules =up=|> Rules | |
84 | -Settings =up=|> Rules | |
85 | - | |
77 | +PEG <|== Rules | |
78 | +MixIn_children_tuple <|... Rules | |
79 | +Rules <|== ParseRules | |
80 | +Rules <|== Settings | |
86 | 81 | |
87 | 82 | class Grammar { |
88 | 83 | +all_rules :Rules |
89 | 84 | -parse_rules :ParseRules |
90 | 85 | -settings :Settings |
91 | 86 | } |
92 | -Grammar =up=|> NonTerminal | |
87 | +NonTerminal <|== Grammar | |
93 | 88 | |
94 | 89 | |
95 | 90 | abstract Group |
96 | -Group =up=|> Expression | |
97 | -UnorderedGroup =up=|> Group | |
98 | -UnorderedGroup --up--|> MixIn_expr_attribute | |
91 | +Expression <|== Group | |
92 | +Group <|== UnorderedGroup | |
93 | +MixIn_expr_attribute <|... UnorderedGroup | |
99 | 94 | abstract Quantity |
100 | -Quantity =up=|> Group | |
101 | -Quantity --up--|> MixIn_expr_attribute | |
102 | -Sequence =up=|> Expression | |
103 | -Sequence --up--|> MixIn_children_tuple | |
95 | +Group <|== Quantity | |
96 | +MixIn_expr_attribute <|... Quantity | |
97 | +Expression <|== Sequence | |
98 | +MixIn_children_tuple <|... Sequence | |
104 | 99 | |
105 | -OrderedChoice =up=|> Expression | |
106 | -OrderedChoice --up--|> MixIn_children_tuple | |
100 | +Expression <|== OrderedChoice | |
101 | +MixIn_children_tuple <|... OrderedChoice | |
107 | 102 | |
108 | 103 | class Optional << (?, #0077ff) >> |
109 | -Optional =up=|> Quantity | |
104 | +Quantity <|== Optional | |
110 | 105 | class ZeroOrMore << (*, #0077ff) >> |
111 | -ZeroOrMore =up=|> Quantity | |
106 | +Quantity <|== ZeroOrMore | |
112 | 107 | class OneOrMore << (+, #0077ff) >> |
113 | -OneOrMore =up=|> Quantity | |
108 | +Quantity <|== OneOrMore | |
114 | 109 | |
115 | 110 | abstract Predicate |
116 | -Predicate =up=|> Expression | |
117 | -Predicate --up--|> MixIn_expr_attribute | |
111 | +Expression <|== Predicate | |
112 | +MixIn_expr_attribute <|... Predicate | |
118 | 113 | class AndPredicate << (&, #0077ff) notconsuming >> |
119 | -AndPredicate =up=|> Predicate | |
114 | +Predicate <|== AndPredicate | |
120 | 115 | class NotPredicate << (! ,#0077ff) not consuming >> |
121 | -NotPredicate =up=|> Predicate | |
116 | +Predicate <|== NotPredicate | |
122 | 117 | |
123 | 118 | } |
124 | 119 | @enduml |
@@ -135,4 +130,3 @@ | ||
135 | 130 | |
136 | 131 | |
137 | 132 | |
138 | - |