-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathparser.bnf
58 lines (44 loc) · 2.07 KB
/
parser.bnf
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
<root_layout> ::= <linear_layout> | <relative_layout>
<must_atributes> ::= android:layout_width="(<string> | <pos_int>)"
android:layout_height="(<string> | <pos_int>)"
<linear_layout> ::= <LinearLayout <must_atributes>
[android:id="<string>"]
[android:orientation="<string>"]>
(<elements>|<linear_layout>)+
</LinearLayout>
<relative_layout> ::= <RelativeLayout <must_atributes>
[android:id="<string>"]>
{<elements>|<relative_layout>}
</RelativeLayout>
<elements> ::= <text_view> | <image_view> | <button> | <radio_group> | <progress_bar>
<text_view> ::= <TextView <must_atributes>
android:text="<string>"
[android:id="<string>"]
[android:textColor="<string>"]/>
<image_view> ::= <ImageView <must_atributes>
android:src="<string>"
[android:id="<string>"]
[android:padding="<pos_int>"]/>
<button> ::= <Button <must_atributes>
android:text="<string>"
[android:id="<string>"]
[android:padding="<pos_int>"]/>
<radio_group> ::= <RadioGroup <must_atributes>
[android:id="<string>"]
[android:checkedButton="<string>"]>
<radio_button>
<RadioGroup/>
<radio_button> ::= <RadioButton <must_atributes>
android:text="<string>"
[android:id="<string>"]/>
<progress_bar> ::= <ProgressBar <must_atributes>
[android:id="<string>"]
[android:max="<pos_int>"]
[android:progress="<pos_int>"]/>
<string> ::= {<letter> | <number_digit>}
<text> ::= {<letter> | <number_digit> | <symbol>}
<letter> ::= a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | p | q | r | s | t | u | v | w | x | y | z | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z
<number_digit> ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
<symbol> ::= ! | # | $ | % | ... | & | ( | ) | * | ... | /
<integer> ::= <number_digit>+
<comment> ::= <!-- <text> -->