/
breakSemantics2doc.xbgf
63 lines (60 loc) · 1.81 KB
/
breakSemantics2doc.xbgf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<xbgf:sequence
xmlns:bgf="http://planet-sl.org/bgf"
xmlns:xbgf="http://planet-sl.org/xbgf">
<!--
NOT semantic-preserving in any way.
- Fail: MethodBody.
- [], n(Block)
vs.
- [], ;([n(Block), t((;))])
-->
<xbgf:vertical>
<nonterminal>MethodBody</nonterminal>
</xbgf:vertical>
<xbgf:remove>
<bgf:production>
<nonterminal>MethodBody</nonterminal>
<bgf:expression>
<terminal>;</terminal>
</bgf:expression>
</bgf:production>
</xbgf:remove>
<!--
- Fail: InterfaceDeclaration.
- [], ,([t(interface), n(Identifier), ?(,([t(extends), n(TypeList)])), n(InterfaceBody)])
vs.
- [], ,([?(n(InterfaceModifiers)), n(Identifier), ?(,([t(extends), n(TypeList)])), n(InterfaceBody)])
-->
<xbgf:project>
<bgf:production>
<nonterminal>InterfaceDeclaration</nonterminal>
<bgf:expression>
<sequence>
<bgf:expression>
<terminal>interface</terminal>
</bgf:expression>
<bgf:expression>
<nonterminal>Identifier</nonterminal>
</bgf:expression>
<bgf:expression>
<optional>
<bgf:expression>
<sequence>
<bgf:expression>
<terminal>extends</terminal>
</bgf:expression>
<bgf:expression>
<nonterminal>TypeList</nonterminal>
</bgf:expression>
</sequence>
</bgf:expression>
</optional>
</bgf:expression>
<bgf:expression>
<nonterminal>InterfaceBody</nonterminal>
</bgf:expression>
</sequence>
</bgf:expression>
</bgf:production>
</xbgf:project>
</xbgf:sequence>