blob: 601a600f4bdb5029061f658b119c33450891fe1e (
plain)
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
|
import type_options
/*
This file for the log statements that relates to each different applications
Each Grammar Command here is related to his own application
*/
SpecialCommand:
writer_command | calc_command | impress_command | math_command | draw_command
;
/*
This part for all the writer log statements:
1) Type
2) Select
3) GOTO page
4) Create Table
5) Copy Text
6) Cut Text
7) Paste Text
8) Insert Break Page
then we can add whatever we need in the future
*/
writer_command:
writer_Type_command | writer_Select_command | writer_GOTO_command |
writer_Create_table | writer_Copy_Text | writer_Cut_Text |
writer_Paste_Text | writer_Insert_BreakPage
;
writer_Type_command:
'Type on writer' what_to_type=Type_options
;
writer_Select_command:
'Select from Pos' from_pos=INT 'to Pos' to_pos=INT
;
writer_GOTO_command:
'GOTO page number' page_num=INT
;
writer_Create_table:
'Create Table with Columns :' cols=INT ', Rows :' rows=INT
;
writer_Copy_Text:
'Copy the Selected Text'
;
writer_Cut_Text:
'Cut the Selected Text'
;
writer_Paste_Text:
'Paste in the Current Cursor Location'
;
writer_Insert_BreakPage:
'Insert Break Page'
;
//=================================================================//
/*
This part for all the calc log statements:
1) select sheet
2) Select cell or range
3) launch AutoFill
4) launch SELECTMENU
5) Delete Cells
6) Remove Content of a cell
7) Insert new Cells
8) Cut Cells
9) Copy Cells
10) Paste Cells
11) Merge Cells
12) Unmerge Cells
then we can add whatever we need in the future
*/
calc_command:
calc_Type_command | calc_switch_sheet | calc_Select_cell | calc_AutoFill_filter |
calc_SelectMenu_filter | calc_Delete_Cells | calc_Remove_Content | calc_insert_cells |
calc_Cut_Cells | calc_Copy_Cells | calc_Paste_Cells | calc_UNMerge_Cells |
calc_Merge_Cells | calc_Rename_Sheet | calc_Insert_sheet
;
calc_Type_command:
'Type on current cell' what_to_type=Type_options
;
calc_switch_sheet:
'Switch to sheet number' sheet_num=INT
;
calc_Select_cell:
'Select from calc' select_op=select_options
;
calc_AutoFill_filter:
'Launch AutoFilter from Col' col_num=INT 'and Row' row_num=INT
;
calc_SelectMenu_filter:
'Launch SELECTMENU from Col' col_num=INT 'and Row' row_num=INT
;
range_of_cells:
'{' '"RANGE":' input_range=STRING '}'
;
one_cell:
'{' '"CELL":' input_cell=STRING '}'
;
calc_Delete_Cells:
'Delete The Cells in' '{' '"RANGE":' input_range=STRING '}'
;
calc_Remove_Content:
'Remove Content from This' '{' '"RANGE":' input_range=STRING '}'
;
calc_insert_cells:
'Insert Cell around the ' '{' '"RANGE":' input_range=STRING '}'
;
calc_Cut_Cells:
'CUT the selected ' '{' '"RANGE":' input_range=STRING '}'
;
calc_Copy_Cells:
'COPY the selected ' '{' '"RANGE":' input_range=STRING '}'
;
calc_Paste_Cells:
'Paste in the' '{' '"RANGE":' input_range=STRING '}'
;
calc_Merge_Cells:
'Merge' '{' '"RANGE":' input_range=STRING '}'
;
calc_UNMerge_Cells:
'Delete the merge between' '{' '"CELL":' input_range=STRING '}'
;
calc_Rename_Sheet:
'Rename The Selected Tab to ' new_name=STRING
;
calc_Insert_sheet:
'Insert New Tab '
;
//this is the select options
select_options:
one_cell | range_of_cells
;
//=================================================================//
/*
This part for all the impress log statements:
1) Type
2) Insert New Slide
3) Delete Slide
4) Duplicate Slide
5) Rename Slide
then we can add whatever we need in the future
*/
impress_command:
impress_Type_command | impress_Insert_Slide | impress_Delete_Page |
impress_Duplicate_Slide | impress_Rename_Slide
;
impress_Type_command:
'Type on impress ' what_to_type=Type_options
;
impress_Insert_Slide:
'Insert New Slide at Position ' position_num=INT
;
impress_Delete_Page:
'Delete Slide number ' position_num=INT
;
impress_Duplicate_Slide:
'Duplicate The Selected Slide '
;
impress_Rename_Slide:
'Rename The Selected Slide from ' old_name=STRING 'to' new_name=STRING
;
//=================================================================//
/*
This part for all the math log statements:
1) element selector
2) Type
then we can add whatever we need in the future
*/
math_command:
math_element_selector | math_Type_command
;
math_element_selector:
'Select element no ' element_no=INT 'From' place=ID
;
math_Type_command:
'Type on math ' what_to_type=Type_options
;
//=================================================================//
/*
This part for all the draw log statements:
1) Type
2) Insert New Page
3) Delete Page
4) Rename Page
then we can add whatever we need in the future
*/
draw_command:
draw_Type_command | draw_Insert_Page | draw_Delete_Page |
draw_Rename_Page
;
draw_Type_command:
'Type on draw ' what_to_type=Type_options
;
draw_Insert_Page:
'Insert New Page at Position ' position_num=INT
;
draw_Delete_Page:
'Delete Page number ' position_num=INT
;
draw_Rename_Page:
'Rename The Selected Page from ' old_name=STRING 'to' new_name=STRING
;
|