Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Remove my personal filesets, create examples.

  • Loading branch information...
commit e00c6475b4868f59ab5107fed63f5fdf9ddca4e2 1 parent 9fd5c81
Steve Francis sfrancisx authored

Showing 1 changed file with 281 additions and 359 deletions. Show diff stats Hide diff stats

  1. +281 359 jsgrep.cfg
640 jsgrep.cfg
@@ -33,385 +33,307 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 33 */
34 34
35 35 {
36   - options: "-s-", // Default command line options
  36 + options: "-s-", // Default command line options
37 37
38   - patterns:
39   - {
40   - MATCHINGBRACES: "(? ( LBRACE | LPAREN | [ ) .* C:1 )",
41   - //"(?( \{| \(| \[).*!\\1)"
  38 + patterns:
  39 + {
  40 + MATCHINGBRACES: "(? ( LBRACE | LPAREN | [ ) .* C:1 )",
  41 + //"(?( \{| \(| \[).*!\\1)"
42 42
43   - NONBRACE: "(! LPAREN LBRACE [ , ; )",
44   - // "(! \{ \( \[ , ;)"
  43 + NONBRACE: "(! LPAREN LBRACE [ , ; )",
  44 + // "(! \{ \( \[ , ;)"
45 45
46   - //NAME: "/.*/",
47   - //STRING: "/'.*'/",
  46 + //NAME: "/.*/",
  47 + //STRING: "/'.*'/",
48 48
49   - ANY:
50   - {
51   - match: "."
52   - },
  49 + ANY:
  50 + {
  51 + match: "."
  52 + },
53 53
54 54 NONTERM: "(!:\{};)",
55 55
56   - ALLFUNCS:
57   - {
58   - comment: "ALLFUNCS - list all declared functions",
59   - match: "(? function NAME% ) | (? NAME%: function ) | (? NAME% = new? function)"
60   - },
61   -
62   - CALLEDFUNCS:
63   - {
64   - comment: "CALLEDFUNCS - list all functions which are being called",
65   - match: "NAME% LPAREN"
66   - },
67   -
68   - FUNCSINMOD:
69   - {
70   - match: "DOT add LPAREN .% , function LPAREN . RPAREN (LBRACE) (.*? ALLFUNCS)* .* C:1"
71   - },
72   -
73   - FUNCSUSEDBYMOD:
74   - {
75   - match: "DOT add LPAREN .% , function LPAREN . RPAREN (LBRACE) (.*? CALLEDFUNCS)* .* C:1"
76   - },
77   -
78   - ALLREQUIRES:
79   - {
80   - match: "add LPAREN .% .*? (LBRACE) .* C:1 .* requires:(\[) (? STRING% ,?)* C:2"
81   - },
82   -
83   - CFT:
84   - {
85   - comment: "CFT - case fallthrough",
86   - match: "(! break ) ; case"
87   - },
88   -
89   - DOT:
90   - {
91   - comment: "DOT - Synonym for \.",
92   - match: "\."
93   - },
94   -
95   - LPAREN:
96   - {
97   - comment: "LPAREN - Synonym for \(",
98   - match: "\("
99   - },
100   -
101   - NOT:
102   - {
103   - comment: "NOT:token - Synonym for (!token)",
104   - pattern: "(.)",
105   - match: "(! \1)"
106   - },
107   -
108   -
109   - RPAREN:
110   - {
111   - comment: "RPAREN - Synonum for \)",
112   - match: "\)"
113   - },
114   -
115   - LBRACE:
116   - {
117   - comment: "LBRACE - Synonym for \{",
118   - match: "\{"
119   - },
120   -
121   - F:
122   - {
123   - comment: "F:fun_name - show the declaration of function 'fun_name'",
124   - pattern: "(.)",
125   - match: "(? function \1%)|(? \1% : function)|(? \1% = new? function)"
126   - },
127   -
128   - FA:
129   - {
130   - comment: "FA:fun_name - show the declaration of 'fun_name' along with its arguments",
131   - pattern: "(NAME)",
132   - match: "F:\1(LPAREN).* C:1"
133   - },
134   -
135   - FB:
136   - {
137   - comment: "FB:fun_name - show the entire body of functions named 'fun_name'",
138   - pattern: "(NAME)",
139   - match: "FA:\1(LBRACE).*% C:1"
140   - },
141   -
142   - FC:
143   - {
144   - comment: "FC:fun_name - show call to function 'fun_name'",
145   - pattern: "(NAME)",
146   - match: "\1 (LPAREN) .* C:1"
147   - },
148   -
149   - FCF:
150   - {
151   - comment: "FCF:fun_name - show functions which call function 'fun_name'",
152   - pattern: "(NAME)",
153   - match: "F:.% (LPAREN) .* C:1 (LBRACE) ((!function)|(function (LPAREN) .* C:5 (LBRACE) .* C:6))* \1 LPAREN .* C:2"
154   - },
155   -
156   - FIF:
157   - {
158   - comment: "FIF:fun_name_1:fun_name_2 - show calls to fun_name_2 inside fun_name_1",
159   - pattern: "(NAME):(NAME)",
160   - match: "F:\1 (LPAREN) .* \2 .* C:1"
161   - },
162   -
163   - FM:
164   - {
165   - comment: "FM:mod_name - show all functions in module 'mod_name'",
166   - pattern: "(STRING)",
167   - match: "DOT add LPAREN \1 ,function LPAREN .? \) ( LBRACE ) (.*? F:.)* .* C:1"
168   - },
169   -
170   - FMF:
171   - {
172   - comment: "FMF:fun_name - (slow) show all functions in the module which defines 'fun_name'",
173   - pattern: "(.)",
174   - match: "DOT add LPAREN STRING% ,function LPAREN .? \) ( LBRACE ) (.*? F:.%)* .* F:\1 (.*? F:.%)* .* C:1"
175   - },
176   -
177   - FNB:
178   - {
179   - comment: "FNB - for statements without braces (code coverage tool can't handle this.)",
180   - match: "(for (LPAREN) .* C:2)% (!LBRACE)"
181   - },
182   -
183   - FR:
184   - {
185   - comment: "FR:symbol - show functions which reference 'symbol'",
186   - pattern: "(NAME)",
187   - match: "F:.% (LPAREN) .* C:1 (LBRACE) ((!function)|(function (LPAREN) .* C:5 (LBRACE) .* C:6))* \1 .* C:2"
188   - },
189   -
190   - M:
191   - {
192   - comment: "M:mod_name - show module info (the add & requires parts) for 'mod_name'",
193   - pattern: "(.)",
194   - match: "add LPAREN \1% .*? (LBRACE) .* C:1 .* requires:(\[) (? STRING% ,?)* C:2"
195   - },
196   -
197   - MA:
198   - {
199   - comment: "MA - show all modules",
200   - match: "add LPAREN STRING%"
201   - },
202   -
203   - MF:
204   - {
205   - comment: "MF:fun_name - show the module which defines function 'fun_name'",
206   - pattern: "(NAME)",
207   - match: "DOT add LPAREN STRING% ,function LPAREN .? \) ( LBRACE ) .* F:\1 .* C:1"
208   - },
209   -
210   - MCF:
211   - {
212   - comment: "MCF:fun_name - show modules which call function 'fun_name'",
213   - pattern: "(NAME)",
214   - match: "DOT add LPAREN STRING% ,function LPAREN .? \) ( LBRACE ) .* FC:\1 .* C:1"
215   - },
216   -
217   - MR:
218   - {
219   - comment: "MR:symbol - show modules which reference 'symbol'",
220   - pattern: "(NAME)",
221   - match: "DOT add LPAREN STRING% ,function LPAREN .? \) ( LBRACE ) .*? \1 .* C:1"
222   - },
223   -
224   - OI:
225   - {
226   - comment: "OI:symbol - show static object initialization for 'symbol'",
227   - pattern: "(NAME)",
228   - match: "\1 =|: ({|[) .* C:1"
229   - },
230   -
231   - REQUIRE:
232   - {
233   - comment: "REQUIRE:mod_name - show modules which require 'mod_name'",
234   - pattern: "(.)",
235   - match: "DOT add LPAREN .% ,function LPAREN .? \) (LBRACE) .* C:1 .* requires:(\[) .* \1 .* C:2"
236   - },
237   -
238   - TC:
239   - {
240   - comment: "TC - Show arrays and objects with trailing commas",
241   - match: ", ]|}"
242   - },
243   -
244   - UC:
245   - {
246   - comment: "UC:mod_name - Show the use() callback for all uses of mod_name",
247   - pattern: "(STRING)",
248   - match: "use (LPAREN) \1, .* C:1"
249   - },
250   -
251   - USED:
252   - {
253   - comment: "USED:mod_name",
254   - pattern: "(STRING)",
255   - match: "(use (LPAREN).* \1 .* C:2) | (requires:([) .* \1 .* C:4)"
256   - },
257   -
258   - USES:
259   - {
260   - comment: "USES:mod_name - show calls to use() within module 'mod_name'",
261   - pattern: "(STRING)",
262   - match: "DOT add LPAREN \1 .*? (LBRACE) (? .*? use LPAREN STRING%)* .* C:1"
263   - },
264   -
265   - USEDBY:
266   - {
267   - comment: "USEDBY:mod_name - show modules which call use() on 'mod_name'",
268   - pattern: "(STRING)",
269   - match: "DOT add LPAREN STRING% ,function LPAREN .? \) (LBRACE) .* DOT use LPAREN \1 .* C:1"
270   - },
271   -
272   - V:
273   - {
274   - comment: "V:var_name - show the declaration of a variable named 'var_name'",
275   - pattern: "(NAME)",
276   - match: "var (?(! \1)(? =(? NONBRACE+| MATCHINGBRACES+)+ ,)| ,)*? \1%"
277   - },
278   -
279   - VF:
280   - {
281   - comment: "VF:var_name:fun_name - show all uses of 'var_name' inside function 'fun_name'",
282   - pattern: "(NAME):(NAME)",
283   - match: "F:\2(LPAREN).* C:1 (\{) (? (! \1%)* \1%)* .* C:2"
284   - }
285   - },
286   -
287   - default: "jite",
288   -
289   - searches:
290   - {
291   - current: { root: "." },
292   - neo:
293   - {
294   - root: "~/dev/yahoo/ymail/neo/src",
295   - filepatterns:
296   - [
297   - "*.js"
298   - ],
299   - directories:
300   - [
301   - "common",
302   - "comms",
303   - "contacts",
304   - "galaxy",
305   - //"jite",
306   - "launch",
307   - "mail",
308   - "mods",
309   - "om",
310   - "templates"
311   - ],
312   - exclude:
313   - [
314   - "data.js"
315   -// "neo.js",
316   -// "mods.js"
317   - ]
318   - },
319   - mustache:
320   - {
321   - root: "~/dev/yahoo/ymail/neo/src",
  56 + ALLFUNCS:
  57 + {
  58 + comment: "ALLFUNCS - list all declared functions",
  59 + match: "(? function NAME% ) | (? NAME%: function ) | (? NAME% = new? function)"
  60 + },
  61 +
  62 + CALLEDFUNCS:
  63 + {
  64 + comment: "CALLEDFUNCS - list all functions which are being called",
  65 + match: "NAME% LPAREN"
  66 + },
  67 +
  68 + FUNCSINMOD:
  69 + {
  70 + match: "DOT add LPAREN .% , function LPAREN . RPAREN (LBRACE) (.*? ALLFUNCS)* .* C:1"
  71 + },
  72 +
  73 + FUNCSUSEDBYMOD:
  74 + {
  75 + match: "DOT add LPAREN .% , function LPAREN . RPAREN (LBRACE) (.*? CALLEDFUNCS)* .* C:1"
  76 + },
  77 +
  78 + ALLREQUIRES:
  79 + {
  80 + match: "add LPAREN .% .*? (LBRACE) .* C:1 .* requires:(\[) (? STRING% ,?)* C:2"
  81 + },
  82 +
  83 + CFT:
  84 + {
  85 + comment: "CFT - case fallthrough",
  86 + match: "(! break ) ; case"
  87 + },
  88 +
  89 + DOT:
  90 + {
  91 + comment: "DOT - Synonym for \.",
  92 + match: "\."
  93 + },
  94 +
  95 + LPAREN:
  96 + {
  97 + comment: "LPAREN - Synonym for \(",
  98 + match: "\("
  99 + },
  100 +
  101 + NOT:
  102 + {
  103 + comment: "NOT:token - Synonym for (!token)",
  104 + pattern: "(.)",
  105 + match: "(! \1)"
  106 + },
  107 +
  108 +
  109 + RPAREN:
  110 + {
  111 + comment: "RPAREN - Synonum for \)",
  112 + match: "\)"
  113 + },
  114 +
  115 + LBRACE:
  116 + {
  117 + comment: "LBRACE - Synonym for \{",
  118 + match: "\{"
  119 + },
  120 +
  121 + F:
  122 + {
  123 + comment: "F:fun_name - show the declaration of function 'fun_name'",
  124 + pattern: "(.)",
  125 + match: "(? function \1%)|(? \1% : function)|(? \1% = new? function)"
  126 + },
  127 +
  128 + FA:
  129 + {
  130 + comment: "FA:fun_name - show the declaration of 'fun_name' along with its arguments",
  131 + pattern: "(NAME)",
  132 + match: "F:\1(LPAREN).* C:1"
  133 + },
  134 +
  135 + FB:
  136 + {
  137 + comment: "FB:fun_name - show the entire body of functions named 'fun_name'",
  138 + pattern: "(NAME)",
  139 + match: "FA:\1(LBRACE).*% C:1"
  140 + },
  141 +
  142 + FC:
  143 + {
  144 + comment: "FC:fun_name - show call to function 'fun_name'",
  145 + pattern: "(NAME)",
  146 + match: "\1 (LPAREN) .* C:1"
  147 + },
  148 +
  149 + FCF:
  150 + {
  151 + comment: "FCF:fun_name - show functions which call function 'fun_name'",
  152 + pattern: "(NAME)",
  153 + match: "F:.% (LPAREN) .* C:1 (LBRACE) ((!function)|(function (LPAREN) .* C:5 (LBRACE) .* C:6))* \1 LPAREN .* C:2"
  154 + },
  155 +
  156 + FIF:
  157 + {
  158 + comment: "FIF:fun_name_1:fun_name_2 - show calls to fun_name_2 inside fun_name_1",
  159 + pattern: "(NAME):(NAME)",
  160 + match: "F:\1 (LPAREN) .* \2 .* C:1"
  161 + },
  162 +
  163 + FM:
  164 + {
  165 + comment: "FM:mod_name - show all functions in module 'mod_name'",
  166 + pattern: "(STRING)",
  167 + match: "DOT add LPAREN \1 ,function LPAREN .? \) ( LBRACE ) (.*? F:.)* .* C:1"
  168 + },
  169 +
  170 + FMF:
  171 + {
  172 + comment: "FMF:fun_name - (slow) show all functions in the module which defines 'fun_name'",
  173 + pattern: "(.)",
  174 + match: "DOT add LPAREN STRING% ,function LPAREN .? \) ( LBRACE ) (.*? F:.%)* .* F:\1 (.*? F:.%)* .* C:1"
  175 + },
  176 +
  177 + FNB:
  178 + {
  179 + comment: "FNB - for statements without braces (code coverage tool can't handle this.)",
  180 + match: "(for (LPAREN) .* C:2)% (!LBRACE)"
  181 + },
  182 +
  183 + FR:
  184 + {
  185 + comment: "FR:symbol - show functions which reference 'symbol'",
  186 + pattern: "(NAME)",
  187 + match: "F:.% (LPAREN) .* C:1 (LBRACE) ((!function)|(function (LPAREN) .* C:5 (LBRACE) .* C:6))* \1 .* C:2"
  188 + },
  189 +
  190 + M:
  191 + {
  192 + comment: "M:mod_name - show module info (the add & requires parts) for 'mod_name'",
  193 + pattern: "(.)",
  194 + match: "add LPAREN \1% .*? (LBRACE) .* C:1 .* requires:(\[) (? STRING% ,?)* C:2"
  195 + },
  196 +
  197 + MA:
  198 + {
  199 + comment: "MA - show all modules",
  200 + match: "add LPAREN STRING%"
  201 + },
  202 +
  203 + MF:
  204 + {
  205 + comment: "MF:fun_name - show the module which defines function 'fun_name'",
  206 + pattern: "(NAME)",
  207 + match: "DOT add LPAREN STRING% ,function LPAREN .? \) ( LBRACE ) .* F:\1 .* C:1"
  208 + },
  209 +
  210 + MCF:
  211 + {
  212 + comment: "MCF:fun_name - show modules which call function 'fun_name'",
  213 + pattern: "(NAME)",
  214 + match: "DOT add LPAREN STRING% ,function LPAREN .? \) ( LBRACE ) .* FC:\1 .* C:1"
  215 + },
  216 +
  217 + MR:
  218 + {
  219 + comment: "MR:symbol - show modules which reference 'symbol'",
  220 + pattern: "(NAME)",
  221 + match: "DOT add LPAREN STRING% ,function LPAREN .? \) ( LBRACE ) .*? \1 .* C:1"
  222 + },
  223 +
  224 + OI:
  225 + {
  226 + comment: "OI:symbol - show static object initialization for 'symbol'",
  227 + pattern: "(NAME)",
  228 + match: "\1 =|: ({|[) .* C:1"
  229 + },
  230 +
  231 + REQUIRE:
  232 + {
  233 + comment: "REQUIRE:mod_name - show modules which require 'mod_name'",
  234 + pattern: "(.)",
  235 + match: "DOT add LPAREN .% ,function LPAREN .? \) (LBRACE) .* C:1 .* requires:(\[) .* \1 .* C:2"
  236 + },
  237 +
  238 + TC:
  239 + {
  240 + comment: "TC - Show arrays and objects with trailing commas",
  241 + match: ", ]|}"
  242 + },
  243 +
  244 + UC:
  245 + {
  246 + comment: "UC:mod_name - Show the use() callback for all uses of mod_name",
  247 + pattern: "(STRING)",
  248 + match: "use (LPAREN) \1, .* C:1"
  249 + },
  250 +
  251 + USED:
  252 + {
  253 + comment: "USED:mod_name",
  254 + pattern: "(STRING)",
  255 + match: "(use (LPAREN).* \1 .* C:2) | (requires:([) .* \1 .* C:4)"
  256 + },
  257 +
  258 + USES:
  259 + {
  260 + comment: "USES:mod_name - show calls to use() within module 'mod_name'",
  261 + pattern: "(STRING)",
  262 + match: "DOT add LPAREN \1 .*? (LBRACE) (? .*? use LPAREN STRING%)* .* C:1"
  263 + },
  264 +
  265 + USEDBY:
  266 + {
  267 + comment: "USEDBY:mod_name - show modules which call use() on 'mod_name'",
  268 + pattern: "(STRING)",
  269 + match: "DOT add LPAREN STRING% ,function LPAREN .? \) (LBRACE) .* DOT use LPAREN \1 .* C:1"
  270 + },
  271 +
  272 + V:
  273 + {
  274 + comment: "V:var_name - show the declaration of a variable named 'var_name'",
  275 + pattern: "(NAME)",
  276 + match: "var (?(! \1)(? =(? NONBRACE+| MATCHINGBRACES+)+ ,)| ,)*? \1%"
  277 + },
  278 +
  279 + VF:
  280 + {
  281 + comment: "VF:var_name:fun_name - show all uses of 'var_name' inside function 'fun_name'",
  282 + pattern: "(NAME):(NAME)",
  283 + match: "F:\2(LPAREN).* C:1 (\{) (? (! \1%)* \1%)* .* C:2"
  284 + }
  285 + },
  286 +
  287 + default: "src",
  288 +
  289 + searches:
  290 + {
  291 + current: { root: "." },
  292 + src: { root: "~/src" },
  293 +
  294 + mustache:
  295 + {
  296 + root: "~/src",
  297 + directories:
  298 + [
  299 + "js/templates",
  300 + "php/templates"
  301 + ],
322 302 filepatterns:
323 303 [
324 304 "*.js",
325   - "*.mu"
  305 + "*.mu"
326 306 ],
327   - directories:
328   - [
329   - "common",
330   - "comms",
331   - "contacts",
332   - "galaxy",
333   - "launch",
334   - "mail",
335   - "mods",
336   - "om",
337   - "templates"
338   - ]/*,
339 307 exclude:
340 308 [
341   - "neo.js",
342 309 "mods.js"
343   - ]*/
344   - },
  310 + ]
  311 + },
345 312 php:
346 313 {
347   - root: "~/dev/yahoo/ymail/neo/src",
  314 + root: "~/src",
348 315 filepatterns:
349 316 [
350 317 "*.js",
351 318 "*.mu",
352   - "*.php",
353   - "*.inc",
354   - "*.templ"
355   - ],
356   - directories:
357   - [
358   - "."
359   -/* "common",
360   - "comms",
361   - "contacts",
362   - "galaxy",
363   - "launch",
364   - "mail",
365   - "mods",
366   - "om",
367   - "templates"
368   -*/
369   - ]/*,
  319 + "*.php",
  320 + "*.inc",
  321 + "*.templ"
  322 + ]
  323 + },
  324 + yui:
  325 + {
  326 + root: "~/yui3/build",
370 327 exclude:
371 328 [
372   - "neo.js",
373   - "mods.js"
374   - ]*/
375   - },
376   - yuisrc:
377   - {
378   - root: "~/dev/yahoo/ymail/neo/yui3/src",
379   - exclude: "simpleyui"
380   - },
381   - yui:
382   - {
383   - root: "~/dev/yahoo/ymail/neo/yui3/build",
384   - exclude:
385   - [
386   - "simpleyui",
387   - "*-min.js",
388   - "*-debug.js"
389   - ]
390   - },
391   - test:
392   - {
393   - root: "~/dev/yahoo/ymail/neo/test"
394   - },
395   - jite:
396   - {
397   - root: "~/dev/yahoo/ymail/neo/tools/jite",
398   - filepatterns:
399   - [
400   - "*.js",
401   - "*.html"
402   - ],
403   - exclude:
404   - [
405   - "mockCascadeData.js"
406   - ]
407   - },
408   - cg:
409   - {
410   - root: "~/dev/yahoo/ymail/dclient/src",
411   - filepatterns:
412   - [
413   - "*.js"
414   - ]
415   - }
416   - }
  329 + "simpleyui",
  330 + "*-min.js",
  331 + "*-debug.js"
  332 + ]
  333 + },
  334 + test:
  335 + {
  336 + root: "~/src/test"
  337 + }
  338 + }
417 339 }

0 comments on commit e00c647

Please sign in to comment.
Something went wrong with that request. Please try again.