119 |
119 |
<return name="cur" type="java.lang.String" />
|
120 |
120 |
|
121 |
121 |
<rule>true
|
122 |
|
<action>parnt = sm_menus.get(sm)</action>
|
|
122 |
<action>parnt = sm_menus.get(sm.toLowerCase())</action>
|
123 |
123 |
<action>cur = parnt</action>
|
124 |
124 |
<while>parnt != null and sm_menus.containsKey(parnt)
|
125 |
|
<!--<action>printfln("parnt: %s, sm_menus.get(parnt): %s", parnt, sm_menus.get(parnt))</action>-->
|
|
125 |
<action>printfln("parnt: %s, sm_menus.get(parnt): %s", parnt, sm_menus.get(parnt))</action>
|
126 |
126 |
<action>cur = sprintf("%s.%s", sm_menus.get(parnt), parnt)</action>
|
127 |
127 |
<action>parnt = sm_menus.get(parnt)</action>
|
128 |
128 |
</while>
|
... | ... | |
135 |
135 |
<return name="res" type="java.lang.Boolean" />
|
136 |
136 |
|
137 |
137 |
<rule>true
|
138 |
|
<action>sm = names.convert(smRef.text, names.variable)</action>
|
|
138 |
<action>sm = names.convert(smRef.text.toLowerCase(), names.variable)</action>
|
139 |
139 |
<action>res = sm_menus.containsKey(sm)</action>
|
140 |
140 |
</rule>
|
141 |
141 |
</function>
|
... | ... | |
157 |
157 |
<!-- main processing (once per tree) -->
|
158 |
158 |
<walk-rules>
|
159 |
159 |
<rule>type == prog.define_menu
|
160 |
|
<action>menu_defs.put(getNoteString("name").toLowerCase(), this.id)</action>
|
|
160 |
<action>menu_defs.put(#(java.lang.String) getNoteString("name").toLowerCase(), this.id)</action>
|
161 |
161 |
</rule>
|
162 |
162 |
<rule>type == prog.wid_menu and menu_defs.containsKey(this.text.toLowerCase())
|
163 |
163 |
<action>putNote("refid", #(long) menu_defs.get(this.text.toLowerCase()))</action>
|
... | ... | |
169 |
169 |
<rule>type == prog.wid_sub_menu and
|
170 |
170 |
parent.type == prog.kw_sub_menu
|
171 |
171 |
|
172 |
|
<action>submenu = names.convert(text, names.variable)</action>
|
|
172 |
<action>submenu = names.convert(text.toLowerCase(), names.variable)</action>
|
173 |
173 |
|
174 |
174 |
<rule>parent.parent != null and
|
175 |
175 |
(parent.parent.type == prog.define_menu or
|
... | ... | |
177 |
177 |
!sm_menus.containsKey(submenu)
|
178 |
178 |
<action>menu = parent.parent.getAnnotation("name")</action>
|
179 |
179 |
<action>menu = names.convert(menu, names.variable)</action>
|
180 |
|
<!--<action>printfln("adding %s to %s", submenu, menu)</action>-->
|
|
180 |
<action>printfln("adding %s to %s", submenu, menu)</action>
|
181 |
181 |
<action>sm_menus.put(submenu, menu)</action>
|
182 |
182 |
</rule>
|
183 |
183 |
|
... | ... | |
224 |
224 |
-->
|
225 |
225 |
<rule>type == prog.kw_menu_itm and parent.type == prog.define_menu
|
226 |
226 |
<action>item = names.convert(#(java.lang.String) this.getAnnotation("name"), names.variable)</action>
|
227 |
|
<action>items.put(item, parent)</action>
|
|
227 |
<action>items.put(item.toLowerCase(), parent)</action>
|
228 |
228 |
</rule>
|
229 |
229 |
|
230 |
230 |
<rule>type == prog.kw_menu_itm and parent.type == prog.define_sub_menu
|
231 |
231 |
<action>item = names.convert(#(java.lang.String) this.getAnnotation("name"), names.variable)</action>
|
232 |
|
<rule>!items.containsKey(item)
|
233 |
|
<action>list = items_subs.get(item)</action>
|
|
232 |
<rule>!items.containsKey(item.toLowerCase())
|
|
233 |
<action>list = items_subs.get(item.toLowerCase())</action>
|
234 |
234 |
<rule>list == null
|
235 |
235 |
<action>list = #(java.util.List) create("java.util.ArrayList")</action>
|
236 |
|
<action>items_subs.put(item, list)</action>
|
|
236 |
<action>items_subs.put(item.toLowerCase(), list)</action>
|
237 |
237 |
</rule>
|
238 |
238 |
<action>list.add(parent)</action>
|
239 |
239 |
</rule>
|
... | ... | |
264 |
264 |
<action on="false">symToken = ref.getSymbolicTokenType()</action>
|
265 |
265 |
</rule>
|
266 |
266 |
<action>
|
267 |
|
putNote(sprintf("IN_%s", symToken), names.convert(ref.text, names.variable))
|
|
267 |
putNote(sprintf("IN_%s", symToken), names.convert(ref.text.toLowerCase(), names.variable))
|
268 |
268 |
</action>
|
269 |
269 |
<action>
|
270 |
270 |
putNote(sprintf("IN_%s_ID", symToken), ref.id)
|
... | ... | |
272 |
272 |
</rule>
|
273 |
273 |
|
274 |
274 |
<rule>ref == null
|
275 |
|
<action>ref = items.get(names.convert(text, names.variable))</action>
|
|
275 |
<action>ref = items.get(names.convert(text.toLowerCase(), names.variable))</action>
|
276 |
276 |
</rule>
|
277 |
277 |
|
278 |
278 |
<rule>ref != null
|
... | ... | |
308 |
308 |
#(java.lang.Boolean) execLib("is_submenu", this))) and
|
309 |
309 |
parent.parent.type != prog.define_menu and
|
310 |
310 |
parent.parent.type != prog.define_sub_menu
|
311 |
|
<action>menu = execLib("find_sm_menu", names.convert(text, names.variable))</action>
|
|
311 |
<action>menu = execLib("find_sm_menu", names.convert(text.toLowerCase(), names.variable))</action>
|
312 |
312 |
<rule>menu != null
|
313 |
313 |
<action>putNote("first-menu-path", menu)</action>
|
314 |
314 |
<action>putNote("in_wid_menu", menu)</action>
|