-
Notifications
You must be signed in to change notification settings - Fork 0
/
grammar.txt
40 lines (34 loc) · 862 Bytes
/
grammar.txt
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
action | element type | description | value
-- Grammar LL(1)
-- Program Structure
program -> test program | epsilon
test -> TEST_NAME { body }
body -> action body | epsilon
action -> click | hover | check | type | visit
elem_type -> BUTTON | LINK | TEXT | IMAGE | INPUT
-- Actions
visit -> VISIT URL
click -> CLICK elem_type WITH_DESC NLD ?and value?
hover -> HOVER_OVER elem_type WITH_DESC NLD
check -> CHECK_IF elem_type WITH_DESC NLD state
type -> TYPE CONTENT ON elem_type WITH_DESC NLD
-- State
state -> DISPLAYED | HIDDEN
-- Terminals
CLICK = click
VISIT = visit
BUTTON = button
LINK = link
TEXT = text
IMAGE = image
DISPLAYED = is displayed
HIDDEN = is hidden
CHECK_IF = check if
WITH_DESC = with description
HOVER_OVER = hover over
NLD = "[a-zA-Z0-9 ]*" ????
URL = regex ???
ON = on
TYPE = type
TEST_NAME = [a-zA-Z][a-zA-Z0-9_]*
CONTENT = regex ??