gtl-parsley-ruby 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (299) hide show
  1. data/CHANGELOG +3 -0
  2. data/README +32 -0
  3. data/Rakefile +57 -0
  4. data/VERSION +1 -0
  5. data/ext/cparsley.c +152 -0
  6. data/ext/extconf.rb +82 -0
  7. data/ext/parsley/.gitignore +32 -0
  8. data/ext/parsley/AUTHORS +1 -0
  9. data/ext/parsley/ChangeLog +0 -0
  10. data/ext/parsley/HACKING +4 -0
  11. data/ext/parsley/INSTALL +73 -0
  12. data/ext/parsley/INTRO +84 -0
  13. data/ext/parsley/Makefile.am +80 -0
  14. data/ext/parsley/Makefile.in +1009 -0
  15. data/ext/parsley/NEWS +0 -0
  16. data/ext/parsley/PAPER +36 -0
  17. data/ext/parsley/Portfile +18 -0
  18. data/ext/parsley/Portfile.in +17 -0
  19. data/ext/parsley/README.C-LANG +92 -0
  20. data/ext/parsley/README.markdown +1 -0
  21. data/ext/parsley/TODO +39 -0
  22. data/ext/parsley/VERSION +1 -0
  23. data/ext/parsley/aclocal.m4 +8918 -0
  24. data/ext/parsley/bootstrap.sh +6 -0
  25. data/ext/parsley/config.guess +1561 -0
  26. data/ext/parsley/config.sub +1686 -0
  27. data/ext/parsley/configure +13437 -0
  28. data/ext/parsley/configure.ac +46 -0
  29. data/ext/parsley/depcomp +630 -0
  30. data/ext/parsley/functions.c +368 -0
  31. data/ext/parsley/functions.h +19 -0
  32. data/ext/parsley/generate_bisect.sh +12 -0
  33. data/ext/parsley/hooks/prepare-commit-msg +16 -0
  34. data/ext/parsley/install-sh +520 -0
  35. data/ext/parsley/json-c-0.9/AUTHORS +2 -0
  36. data/ext/parsley/json-c-0.9/COPYING +19 -0
  37. data/ext/parsley/json-c-0.9/ChangeLog +103 -0
  38. data/ext/parsley/json-c-0.9/INSTALL +302 -0
  39. data/ext/parsley/json-c-0.9/Makefile.am +43 -0
  40. data/ext/parsley/json-c-0.9/Makefile.in +800 -0
  41. data/ext/parsley/json-c-0.9/NEWS +1 -0
  42. data/ext/parsley/json-c-0.9/README +20 -0
  43. data/ext/parsley/json-c-0.9/README-WIN32.html +57 -0
  44. data/ext/parsley/json-c-0.9/README.html +32 -0
  45. data/ext/parsley/json-c-0.9/aclocal.m4 +8909 -0
  46. data/ext/parsley/json-c-0.9/arraylist.c +94 -0
  47. data/ext/parsley/json-c-0.9/arraylist.h +53 -0
  48. data/ext/parsley/json-c-0.9/bits.h +27 -0
  49. data/ext/parsley/json-c-0.9/config.guess +1561 -0
  50. data/ext/parsley/json-c-0.9/config.h +125 -0
  51. data/ext/parsley/json-c-0.9/config.h.in +124 -0
  52. data/ext/parsley/json-c-0.9/config.h.win32 +94 -0
  53. data/ext/parsley/json-c-0.9/config.sub +1686 -0
  54. data/ext/parsley/json-c-0.9/configure +13084 -0
  55. data/ext/parsley/json-c-0.9/configure.in +33 -0
  56. data/ext/parsley/json-c-0.9/debug.c +98 -0
  57. data/ext/parsley/json-c-0.9/debug.h +50 -0
  58. data/ext/parsley/json-c-0.9/depcomp +630 -0
  59. data/ext/parsley/json-c-0.9/doc/html/annotated.html +40 -0
  60. data/ext/parsley/json-c-0.9/doc/html/arraylist_8h.html +240 -0
  61. data/ext/parsley/json-c-0.9/doc/html/bits_8h.html +150 -0
  62. data/ext/parsley/json-c-0.9/doc/html/classes.html +36 -0
  63. data/ext/parsley/json-c-0.9/doc/html/config_8h.html +612 -0
  64. data/ext/parsley/json-c-0.9/doc/html/debug_8h.html +392 -0
  65. data/ext/parsley/json-c-0.9/doc/html/doxygen.css +441 -0
  66. data/ext/parsley/json-c-0.9/doc/html/doxygen.png +0 -0
  67. data/ext/parsley/json-c-0.9/doc/html/files.html +42 -0
  68. data/ext/parsley/json-c-0.9/doc/html/functions.html +206 -0
  69. data/ext/parsley/json-c-0.9/doc/html/functions_vars.html +206 -0
  70. data/ext/parsley/json-c-0.9/doc/html/globals.html +459 -0
  71. data/ext/parsley/json-c-0.9/doc/html/globals_defs.html +202 -0
  72. data/ext/parsley/json-c-0.9/doc/html/globals_enum.html +50 -0
  73. data/ext/parsley/json-c-0.9/doc/html/globals_eval.html +135 -0
  74. data/ext/parsley/json-c-0.9/doc/html/globals_func.html +194 -0
  75. data/ext/parsley/json-c-0.9/doc/html/globals_type.html +70 -0
  76. data/ext/parsley/json-c-0.9/doc/html/globals_vars.html +50 -0
  77. data/ext/parsley/json-c-0.9/doc/html/index.html +25 -0
  78. data/ext/parsley/json-c-0.9/doc/html/json_8h.html +32 -0
  79. data/ext/parsley/json-c-0.9/doc/html/json__object_8h.html +1150 -0
  80. data/ext/parsley/json-c-0.9/doc/html/json__object__private_8h.html +75 -0
  81. data/ext/parsley/json-c-0.9/doc/html/json__tokener_8h.html +366 -0
  82. data/ext/parsley/json-c-0.9/doc/html/json__util_8h.html +106 -0
  83. data/ext/parsley/json-c-0.9/doc/html/linkhash_8h.html +740 -0
  84. data/ext/parsley/json-c-0.9/doc/html/printbuf_8h.html +214 -0
  85. data/ext/parsley/json-c-0.9/doc/html/structarray__list.html +104 -0
  86. data/ext/parsley/json-c-0.9/doc/html/structjson__object.html +141 -0
  87. data/ext/parsley/json-c-0.9/doc/html/structjson__object__iter.html +87 -0
  88. data/ext/parsley/json-c-0.9/doc/html/structjson__tokener.html +206 -0
  89. data/ext/parsley/json-c-0.9/doc/html/structjson__tokener__srec.html +104 -0
  90. data/ext/parsley/json-c-0.9/doc/html/structlh__entry.html +105 -0
  91. data/ext/parsley/json-c-0.9/doc/html/structlh__table.html +275 -0
  92. data/ext/parsley/json-c-0.9/doc/html/structprintbuf.html +87 -0
  93. data/ext/parsley/json-c-0.9/doc/html/tab_b.gif +0 -0
  94. data/ext/parsley/json-c-0.9/doc/html/tab_l.gif +0 -0
  95. data/ext/parsley/json-c-0.9/doc/html/tab_r.gif +0 -0
  96. data/ext/parsley/json-c-0.9/doc/html/tabs.css +105 -0
  97. data/ext/parsley/json-c-0.9/doc/html/unionjson__object_1_1data.html +140 -0
  98. data/ext/parsley/json-c-0.9/install-sh +520 -0
  99. data/ext/parsley/json-c-0.9/json.h +31 -0
  100. data/ext/parsley/json-c-0.9/json.pc +11 -0
  101. data/ext/parsley/json-c-0.9/json.pc.in +11 -0
  102. data/ext/parsley/json-c-0.9/json_object.c +512 -0
  103. data/ext/parsley/json-c-0.9/json_object.h +319 -0
  104. data/ext/parsley/json-c-0.9/json_object_private.h +52 -0
  105. data/ext/parsley/json-c-0.9/json_tokener.c +628 -0
  106. data/ext/parsley/json-c-0.9/json_tokener.h +98 -0
  107. data/ext/parsley/json-c-0.9/json_util.c +122 -0
  108. data/ext/parsley/json-c-0.9/json_util.h +31 -0
  109. data/ext/parsley/json-c-0.9/libjson.la +41 -0
  110. data/ext/parsley/json-c-0.9/libtool +8890 -0
  111. data/ext/parsley/json-c-0.9/linkhash.c +216 -0
  112. data/ext/parsley/json-c-0.9/linkhash.h +272 -0
  113. data/ext/parsley/json-c-0.9/ltmain.sh +8406 -0
  114. data/ext/parsley/json-c-0.9/missing +376 -0
  115. data/ext/parsley/json-c-0.9/printbuf.c +149 -0
  116. data/ext/parsley/json-c-0.9/printbuf.h +64 -0
  117. data/ext/parsley/json-c-0.9/stamp-h1 +1 -0
  118. data/ext/parsley/json-c-0.9/test1 +130 -0
  119. data/ext/parsley/json-c-0.9/test1.c +164 -0
  120. data/ext/parsley/json-c-0.9/test2 +130 -0
  121. data/ext/parsley/json-c-0.9/test2.c +20 -0
  122. data/ext/parsley/json-c-0.9/test3 +130 -0
  123. data/ext/parsley/json-c-0.9/test3.c +23 -0
  124. data/ext/parsley/libtool +8890 -0
  125. data/ext/parsley/ltmain.sh +8406 -0
  126. data/ext/parsley/missing +376 -0
  127. data/ext/parsley/parsed_xpath.c +168 -0
  128. data/ext/parsley/parsed_xpath.h +34 -0
  129. data/ext/parsley/parser.y +631 -0
  130. data/ext/parsley/parsley.c +793 -0
  131. data/ext/parsley/parsley.h +87 -0
  132. data/ext/parsley/parsley_main.c +185 -0
  133. data/ext/parsley/parsleyc_main.c +108 -0
  134. data/ext/parsley/regexp.c +359 -0
  135. data/ext/parsley/regexp.h +36 -0
  136. data/ext/parsley/scanner.l +221 -0
  137. data/ext/parsley/test/ambiguous.html +207 -0
  138. data/ext/parsley/test/ambiguous.json +1 -0
  139. data/ext/parsley/test/ambiguous.let +6 -0
  140. data/ext/parsley/test/array-regression.html +5 -0
  141. data/ext/parsley/test/array-regression.json +1 -0
  142. data/ext/parsley/test/array-regression.let +10 -0
  143. data/ext/parsley/test/backslash.html +5 -0
  144. data/ext/parsley/test/backslash.json +1 -0
  145. data/ext/parsley/test/backslash.let +3 -0
  146. data/ext/parsley/test/bang.html +17 -0
  147. data/ext/parsley/test/bang.json +1 -0
  148. data/ext/parsley/test/bang.let +6 -0
  149. data/ext/parsley/test/collate_regression.html +324 -0
  150. data/ext/parsley/test/collate_regression.json +1 -0
  151. data/ext/parsley/test/collate_regression.let +9 -0
  152. data/ext/parsley/test/contains.html +3 -0
  153. data/ext/parsley/test/contains.json +1 -0
  154. data/ext/parsley/test/contains.let +3 -0
  155. data/ext/parsley/test/content.html +13 -0
  156. data/ext/parsley/test/content.json +1 -0
  157. data/ext/parsley/test/content.let +7 -0
  158. data/ext/parsley/test/cool.html +575 -0
  159. data/ext/parsley/test/cool.json +1 -0
  160. data/ext/parsley/test/cool.let +9 -0
  161. data/ext/parsley/test/craigs-simple.html +207 -0
  162. data/ext/parsley/test/craigs-simple.json +1 -0
  163. data/ext/parsley/test/craigs-simple.let +6 -0
  164. data/ext/parsley/test/craigs.html +207 -0
  165. data/ext/parsley/test/craigs.json +1 -0
  166. data/ext/parsley/test/craigs.let +9 -0
  167. data/ext/parsley/test/crash.html +157 -0
  168. data/ext/parsley/test/crash.json +1 -0
  169. data/ext/parsley/test/crash.let +1 -0
  170. data/ext/parsley/test/css_attr.html +3 -0
  171. data/ext/parsley/test/css_attr.json +1 -0
  172. data/ext/parsley/test/css_attr.let +3 -0
  173. data/ext/parsley/test/default-namespace.json +1 -0
  174. data/ext/parsley/test/default-namespace.let +3 -0
  175. data/ext/parsley/test/default-namespace.xml +1493 -0
  176. data/ext/parsley/test/div.html +8 -0
  177. data/ext/parsley/test/div.json +1 -0
  178. data/ext/parsley/test/div.let +10 -0
  179. data/ext/parsley/test/empty.html +3 -0
  180. data/ext/parsley/test/empty.json +1 -0
  181. data/ext/parsley/test/empty.let +1 -0
  182. data/ext/parsley/test/emptyish.html +207 -0
  183. data/ext/parsley/test/emptyish.let +3 -0
  184. data/ext/parsley/test/fictional-opt.html +43 -0
  185. data/ext/parsley/test/fictional-opt.json +1 -0
  186. data/ext/parsley/test/fictional-opt.let +14 -0
  187. data/ext/parsley/test/fictional.html +43 -0
  188. data/ext/parsley/test/fictional.json +1 -0
  189. data/ext/parsley/test/fictional.let +14 -0
  190. data/ext/parsley/test/function-magic.html +9 -0
  191. data/ext/parsley/test/function-magic.json +1 -0
  192. data/ext/parsley/test/function-magic.let +8 -0
  193. data/ext/parsley/test/hn.html +32 -0
  194. data/ext/parsley/test/hn.json +1 -0
  195. data/ext/parsley/test/hn.let +8 -0
  196. data/ext/parsley/test/malformed-array.html +2329 -0
  197. data/ext/parsley/test/malformed-array.json +1 -0
  198. data/ext/parsley/test/malformed-array.let +22 -0
  199. data/ext/parsley/test/malformed-expr.html +2329 -0
  200. data/ext/parsley/test/malformed-expr.json +1 -0
  201. data/ext/parsley/test/malformed-expr.let +16 -0
  202. data/ext/parsley/test/malformed-function.html +845 -0
  203. data/ext/parsley/test/malformed-function.json +197 -0
  204. data/ext/parsley/test/malformed-function.let +8 -0
  205. data/ext/parsley/test/malformed-json.html +2329 -0
  206. data/ext/parsley/test/malformed-json.json +1 -0
  207. data/ext/parsley/test/malformed-json.let +6 -0
  208. data/ext/parsley/test/malformed-xpath.html +8 -0
  209. data/ext/parsley/test/malformed-xpath.json +1 -0
  210. data/ext/parsley/test/malformed-xpath.let +7 -0
  211. data/ext/parsley/test/match.json +1 -0
  212. data/ext/parsley/test/match.let +9 -0
  213. data/ext/parsley/test/match.xml +11 -0
  214. data/ext/parsley/test/math_ambiguity.html +9 -0
  215. data/ext/parsley/test/math_ambiguity.json +1 -0
  216. data/ext/parsley/test/math_ambiguity.let +5 -0
  217. data/ext/parsley/test/nth-regression.html +13 -0
  218. data/ext/parsley/test/nth-regression.json +1 -0
  219. data/ext/parsley/test/nth-regression.let +3 -0
  220. data/ext/parsley/test/optional.html +2328 -0
  221. data/ext/parsley/test/optional.json +1 -0
  222. data/ext/parsley/test/optional.let +8 -0
  223. data/ext/parsley/test/outer-xml.html +6 -0
  224. data/ext/parsley/test/outer-xml.json +1 -0
  225. data/ext/parsley/test/outer-xml.let +5 -0
  226. data/ext/parsley/test/position.html +8 -0
  227. data/ext/parsley/test/position.json +1 -0
  228. data/ext/parsley/test/position.let +6 -0
  229. data/ext/parsley/test/question_regressions.html +443 -0
  230. data/ext/parsley/test/question_regressions.json +1 -0
  231. data/ext/parsley/test/question_regressions.let +6 -0
  232. data/ext/parsley/test/quote.json +1 -0
  233. data/ext/parsley/test/quote.let +8 -0
  234. data/ext/parsley/test/quote.xml +11 -0
  235. data/ext/parsley/test/reddit.html +1 -0
  236. data/ext/parsley/test/reddit.json +1 -0
  237. data/ext/parsley/test/reddit.let +12 -0
  238. data/ext/parsley/test/remote-fail.json +1 -0
  239. data/ext/parsley/test/remote.html +3 -0
  240. data/ext/parsley/test/remote.json +1 -0
  241. data/ext/parsley/test/remote.let +4 -0
  242. data/ext/parsley/test/replace.json +1 -0
  243. data/ext/parsley/test/replace.let +9 -0
  244. data/ext/parsley/test/replace.xml +11 -0
  245. data/ext/parsley/test/scope.html +10 -0
  246. data/ext/parsley/test/scope.json +1 -0
  247. data/ext/parsley/test/scope.let +6 -0
  248. data/ext/parsley/test/segfault.html +5 -0
  249. data/ext/parsley/test/segfault.json +1 -0
  250. data/ext/parsley/test/segfault.let +9 -0
  251. data/ext/parsley/test/sg-wrap.html +5 -0
  252. data/ext/parsley/test/sg-wrap.json +1 -0
  253. data/ext/parsley/test/sg-wrap.let +3 -0
  254. data/ext/parsley/test/sg_off.html +5 -0
  255. data/ext/parsley/test/sg_off.json +1 -0
  256. data/ext/parsley/test/sg_off.let +3 -0
  257. data/ext/parsley/test/test.json +1 -0
  258. data/ext/parsley/test/test.let +6 -0
  259. data/ext/parsley/test/test.xml +11 -0
  260. data/ext/parsley/test/trivial.html +2329 -0
  261. data/ext/parsley/test/trivial.json +1 -0
  262. data/ext/parsley/test/trivial.let +4 -0
  263. data/ext/parsley/test/trivial2.html +2329 -0
  264. data/ext/parsley/test/trivial2.json +1 -0
  265. data/ext/parsley/test/trivial2.let +7 -0
  266. data/ext/parsley/test/unbang.html +17 -0
  267. data/ext/parsley/test/unbang.json +1 -0
  268. data/ext/parsley/test/unbang.let +6 -0
  269. data/ext/parsley/test/unicode.html +3 -0
  270. data/ext/parsley/test/unicode.json +1 -0
  271. data/ext/parsley/test/unicode.let +1 -0
  272. data/ext/parsley/test/whitespace.html +8 -0
  273. data/ext/parsley/test/whitespace.json +1 -0
  274. data/ext/parsley/test/whitespace.let +3 -0
  275. data/ext/parsley/test/whitespace_regression.html +4 -0
  276. data/ext/parsley/test/whitespace_regression.json +1 -0
  277. data/ext/parsley/test/whitespace_regression.let +3 -0
  278. data/ext/parsley/test/yelp-benchmark.rb +53 -0
  279. data/ext/parsley/test/yelp-home.html +1004 -0
  280. data/ext/parsley/test/yelp-home.json +1 -0
  281. data/ext/parsley/test/yelp-home.let +6 -0
  282. data/ext/parsley/test/yelp.html +2329 -0
  283. data/ext/parsley/test/yelp.json +1 -0
  284. data/ext/parsley/test/yelp.let +12 -0
  285. data/ext/parsley/test/youtube.html +1940 -0
  286. data/ext/parsley/test/youtube.let +11 -0
  287. data/ext/parsley/util.c +237 -0
  288. data/ext/parsley/util.h +34 -0
  289. data/ext/parsley/xml2json.c +47 -0
  290. data/ext/parsley/xml2json.h +14 -0
  291. data/ext/parsley/y.tab.h +222 -0
  292. data/ext/parsley/ylwrap +222 -0
  293. data/lib/parsley.rb +84 -0
  294. data/test/test_parsley.rb +120 -0
  295. data/test/yelp-benchmark.rb +53 -0
  296. data/test/yelp-home.html +1004 -0
  297. data/test/yelp-home.let +6 -0
  298. data/test/yelp.html +2329 -0
  299. metadata +366 -0
data/ext/parsley/INTRO ADDED
@@ -0,0 +1,84 @@
1
+ <html><textarea style="width:100%;height:100%">
2
+ Towards a universal scraping API
3
+ or, an introduction to parsley
4
+
5
+ Web scraping is a chore. Scraper scripts are brittle and slow, and everyone writes their own custom implementation, resulting in countless hours of repeated work. Let's work together to make it easier. Let's do what regular expressions did for text processing, and what SQL did for databases. Let's create a universal domain-specific language for web scraping.
6
+
7
+ What features do we need? The must haves:
8
+
9
+ - Concise
10
+ - Easy-to-learn
11
+ - Powerful
12
+ - Idiomatic
13
+ - Portable
14
+ - FAST!!!
15
+
16
+ In order to make this easy to learn, let's keep the best of what's working today. I really like Hpricot's ability to use either xml or css to specify tags to extract. (For those that don't know, you can use "h1 a" [css] or "//h1//a" [xpath] to represent all of the hyperlinks inside paragraphs in a document). Sometimes, i'd even like to mix xpath and css, i.e.: "substring-after(h1, ':')". Regular expressions are *really* useful, so let's support them too. Lets use the XPath2 syntax.
17
+
18
+ Now for some examples:
19
+
20
+ - 3rd paragraph:
21
+ p:nth-child(3)
22
+ - First sentence in that paragraph (period-delimited):
23
+ substring-before(p:nth-child(3), '.')
24
+ - Any simple phone number in an ordered list called "numbers"
25
+ re:match(ul#numbers>li, '\d{3}-\d{4}', 'g')
26
+
27
+ We support all of CSS3, XPath1, as well as all functions in XSLT 1.0 and EXSLT (required+regexp).
28
+
29
+ I think this is a pretty good way to grab a single piece of data from a page. It's simple and gives you all of the tools (CSS for simplicity, XPath for power, regex for detailed text handling) you are used to, in one expression.
30
+
31
+ We'd like to make our scraper script both portable and fast. For both these reasons, we need to be able to express the structure of the scraped data independently of the general-purpose programming language you happen to be working in. Jumping from XPath to Python and back means multiple passes over the document, and Python idioms prevent easy use of your scraper by Rubyists. If we can represent the entire scrape in a language-independent way, we can compile it into something that libxml2 can handle in one pass, giving screaming-fast (milliseconds per parse) performance.
32
+
33
+ To describe the output structure, lets use json. It's compact, and the Ruby/Python/etc bindings can use hashes/lists/dictionaries to represent the same structure. We can also have the scraper output json or native data structures. Here's an example script that grabs the title and all hyperlinks on a page:
34
+
35
+ {
36
+ "title": "h1",
37
+ "links": ["a"]
38
+ }
39
+
40
+ Applying this to http://www.yelp.com/biz/amnesia-san-francisco yields:
41
+
42
+ {
43
+ "title": "Amnesia",
44
+ "links": ["Yelp", "Welcome", "About Me", ... ]
45
+ }
46
+
47
+ You'll note that the output structure mirrors the input structure. In the Ruby binding, you can get both input and output natively:
48
+
49
+ > require "open-uri"
50
+ > require "parsley"
51
+ > Parsley.new({"title" => "h1", "links" => ["a"]}).parse(:url => "http://www.yelp.com/biz/amnesia-san-francisco")
52
+ #=> {"title"=>"Amnesia", "links"=>["Yelp", "Welcome", "About Me"]}
53
+
54
+ We'll also add both explicit and implicit grouping Here's an extension of the previous example with explicit grouping:
55
+
56
+ {
57
+ "title": "h1",
58
+ "links(a)": [{
59
+ "text": ".",
60
+ "link": "@href"
61
+ }]
62
+ }
63
+
64
+ The json structure in the output still mirrors the input, but now you can get both the link text and the href.
65
+
66
+ Pages like craigslist are slightly trickier to group. Elements on this page go h4, p, p, p, h4, p, p, p. To group this, you could do:
67
+
68
+ {
69
+ "entry(p)":[{
70
+ "title": ".",
71
+ "date": "preceding::h4"
72
+ }]
73
+ }
74
+
75
+ If you instead wanted to group by date, you could use implicit grouping. It's implicit, because the parenthesized filter is omitted. Grouping happens by page order. We treat the first single (i.e. non-square-bracketed) value (the h4 in the below example) as the beginning of a new group, and adds following values to the group (i.e.: [h4, p, p, p], [h4, p, p], [h4, p]).
76
+
77
+ {
78
+ "entry":[{
79
+ "date": "h4",
80
+ "title": ["p"]
81
+ }]
82
+ }
83
+
84
+ </textarea></html>
@@ -0,0 +1,80 @@
1
+ AM_YFLAGS = -d
2
+
3
+ SUBDIRS=json-c-0.9
4
+ AM_CPPFLAGS = -I$json-c-0.9
5
+
6
+ BUILT_SOURCES=parser.h
7
+
8
+ lib_LTLIBRARIES = libparsley.la
9
+ libparsley_la_SOURCES = parsed_xpath.c xml2json.c regexp.c functions.c util.c scanner.l parser.y parsley.c
10
+ include_HEADERS = parsley.h xml2json.h parsed_xpath.h
11
+
12
+ bin_PROGRAMS = parsleyc parsley
13
+
14
+ parsleyc_SOURCES = parsleyc_main.c
15
+ parsleyc_LDADD = libparsley.la json-c-0.9/libjson.la
16
+
17
+ parsley_SOURCES = parsley_main.c
18
+ parsley_LDADD = libparsley.la json-c-0.9/libjson.la
19
+
20
+ valgrind:
21
+ ./libtool --mode=execute valgrind --tool=memcheck --leak-check=yes --show-reachable=yes --num-callers=20 --track-fds=yes ./parsley test/fictional.let test/fictional.html
22
+
23
+ profile:
24
+ ./libtool --mode=execute valgrind --tool=callgrind ./parsley test/fictional.let test/fictional.html
25
+
26
+ install-all:
27
+ ./bootstrap.sh && ./configure && make && make install && cd ruby && rake install && cd ../python && python setup.py install
28
+
29
+ bench:
30
+ @echo "yelp..."; ./parsley test/yelp.let test/yelp.html > /dev/null
31
+ @echo "craigs-simple..."; ./parsley test/craigs-simple.let test/craigs-simple.html > /dev/null
32
+ @echo "yelp-home..."; ./parsley test/yelp-home.let test/yelp-home.html > /dev/null
33
+ @echo "craigs..."; ./parsley test/craigs.let test/craigs.html > /dev/null
34
+
35
+ check-am:
36
+ @echo "ambiguous..."; ./parsley test/ambiguous.let test/ambiguous.html 2>&1 | diff test/ambiguous.json - && echo " success."
37
+ @echo "unicode..."; ./parsley test/unicode.let test/unicode.html 2>&1 | diff test/unicode.json - && echo " success."
38
+ @echo "contains..."; ./parsley test/contains.let test/contains.html 2>&1 | diff test/contains.json - && echo " success."
39
+ @echo "math_ambiguity..."; ./parsley test/math_ambiguity.let test/math_ambiguity.html 2>&1 | diff test/math_ambiguity.json - && echo " success."
40
+ @echo "content..."; ./parsley test/content.let test/content.html 2>&1 | diff test/content.json - && echo " success."
41
+ @echo "whitespace..."; ./parsley test/whitespace.let test/whitespace.html 2>&1 | diff test/whitespace.json - && echo " success."
42
+ @echo "backslash..."; ./parsley test/backslash.let test/backslash.html 2>&1 | diff test/backslash.json - && echo " success."
43
+ @echo "question_regressions..."; ./parsley test/question_regressions.let test/question_regressions.html 2>&1 | diff test/question_regressions.json - && echo " success."
44
+ @echo "outer-xml..."; ./parsley test/outer-xml.let test/outer-xml.html 2>&1 | diff test/outer-xml.json - && echo " success."
45
+ @echo "segfault..."; ./parsley test/segfault.let test/segfault.html 2>&1 | diff test/segfault.json - && echo " success."
46
+ @echo "sg_off..."; ./parsley test/sg_off.let test/sg_off.html 2>&1 | diff test/sg_off.json - && echo " success."
47
+ @echo "nth-regression..."; ./parsley test/nth-regression.let test/nth-regression.html 2>&1 | diff test/nth-regression.json - && echo " success."
48
+ @echo "array-regression..."; ./parsley test/array-regression.let test/array-regression.html 2>&1 | diff test/array-regression.json - && echo " success."
49
+ @echo "fictional..."; ./parsley test/fictional.let test/fictional.html 2>&1 | diff test/fictional.json - && echo " success."
50
+ @echo "fictional-opt..."; ./parsley test/fictional-opt.let test/fictional-opt.html 2>&1 | diff test/fictional-opt.json - && echo " success."
51
+ @echo "function-magic..."; ./parsley test/function-magic.let test/function-magic.html 2>&1 | diff test/function-magic.json - && echo " success."
52
+ @echo "malformed-expr..."; ./parsley test/malformed-expr.let test/malformed-expr.html 2>&1 | diff test/malformed-expr.json - && echo " success."
53
+ @echo "malformed-json..."; ./parsley test/malformed-json.let test/malformed-json.html 2>&1 | diff test/malformed-json.json - && echo " success."
54
+ @echo "malformed-array..."; ./parsley test/malformed-array.let test/malformed-array.html 2>&1 | diff test/malformed-array.json - && echo " success."
55
+ @echo "css_attr..."; ./parsley -x test/css_attr.let test/css_attr.html 2>&1 | diff test/css_attr.json - && echo " success."
56
+ @echo "position..."; ./parsley test/position.let test/position.html 2>&1 | diff test/position.json - && echo " success."
57
+ @echo "replace..."; ./parsley -x test/replace.let test/replace.xml 2>&1 | diff test/replace.json - && echo " success."
58
+ @echo "scope..."; ./parsley test/scope.let test/scope.html 2>&1 | diff test/scope.json - && echo " success."
59
+ @echo "test..."; ./parsley -x test/test.let test/test.xml 2>&1 | diff test/test.json - && echo " success."
60
+ @echo "yelp..."; ./parsley test/yelp.let test/yelp.html 2>&1 | diff test/yelp.json - && echo " success."
61
+ @echo "optional..."; ./parsley test/optional.let test/optional.html 2>&1 | diff test/optional.json - && echo " success."
62
+ @echo "empty..."; ./parsley test/empty.let test/empty.html 2>&1 | diff test/empty.json - && echo " success."
63
+ @echo "craigs-simple..."; ./parsley test/craigs-simple.let test/craigs-simple.html 2>&1 | diff test/craigs-simple.json - && echo " success."
64
+ @echo "yelp-home..."; ./parsley test/yelp-home.let test/yelp-home.html 2>&1 | diff test/yelp-home.json - && echo " success."
65
+ @echo "bang..."; ./parsley test/bang.let test/bang.html 2>&1 | diff test/bang.json - && echo " success."
66
+ @echo "cool..."; perl -e 'alarm shift @ARGV; exec @ARGV' 1 ./parsley test/cool.let test/cool.html 2>&1 | diff test/cool.json - && echo " success."
67
+ @echo "trivial2..."; ./parsley test/trivial2.let test/trivial2.html 2>&1 | diff test/trivial2.json - && echo " success."
68
+ @echo "trivial..."; ./parsley test/trivial.let test/trivial.html 2>&1 | diff test/trivial.json - && echo " success."
69
+ @echo "match..."; ./parsley -x test/match.let test/match.xml 2>&1 | diff test/match.json - && echo " success."
70
+ @echo "quote..."; ./parsley test/quote.let test/quote.xml 2>&1 | diff test/quote.json - && echo " success."
71
+ @echo "unbang..."; ./parsley test/unbang.let test/unbang.html 2>&1 | diff test/unbang.json - && echo " success."
72
+ @echo "malformed-xpath..."; ./parsley test/malformed-xpath.let test/malformed-xpath.html 2>&1 | diff test/malformed-xpath.json - && echo " success."
73
+ @echo "remote-fail..."; ./parsley -z test/remote.let test/remote.html 2>&1 | diff test/remote-fail.json - && echo " success."
74
+ @echo "crash..."; ./parsley test/crash.let test/crash.html 2>&1 | diff test/crash.json - && echo " success."
75
+ @echo "reddit..."; ./parsley test/reddit.let test/reddit.html 2>&1 | diff test/reddit.json - && echo " success."
76
+ @echo "div..."; ./parsley test/div.let test/div.html 2>&1 | diff test/div.json - && echo " success."
77
+ @echo "default-namespace..."; ./parsley -x test/default-namespace.let test/default-namespace.xml 2>&1 | diff test/default-namespace.json - && echo " success."
78
+ @echo "sg-wrap..."; ./parsley -s test/sg-wrap.let test/sg-wrap.html 2>&1 | diff test/sg-wrap.json - && echo " success."
79
+ @echo "collate_regression..."; ./parsley test/collate_regression.let test/collate_regression.html 2>&1 | diff test/collate_regression.json - && echo " success."
80
+
@@ -0,0 +1,1009 @@
1
+ # Makefile.in generated by automake 1.11 from Makefile.am.
2
+ # @configure_input@
3
+
4
+ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
5
+ # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
6
+ # Inc.
7
+ # This Makefile.in is free software; the Free Software Foundation
8
+ # gives unlimited permission to copy and/or distribute it,
9
+ # with or without modifications, as long as this notice is preserved.
10
+
11
+ # This program is distributed in the hope that it will be useful,
12
+ # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
13
+ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14
+ # PARTICULAR PURPOSE.
15
+
16
+ @SET_MAKE@
17
+
18
+
19
+
20
+ VPATH = @srcdir@
21
+ pkgdatadir = $(datadir)/@PACKAGE@
22
+ pkgincludedir = $(includedir)/@PACKAGE@
23
+ pkglibdir = $(libdir)/@PACKAGE@
24
+ pkglibexecdir = $(libexecdir)/@PACKAGE@
25
+ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
26
+ install_sh_DATA = $(install_sh) -c -m 644
27
+ install_sh_PROGRAM = $(install_sh) -c
28
+ install_sh_SCRIPT = $(install_sh) -c
29
+ INSTALL_HEADER = $(INSTALL_DATA)
30
+ transform = $(program_transform_name)
31
+ NORMAL_INSTALL = :
32
+ PRE_INSTALL = :
33
+ POST_INSTALL = :
34
+ NORMAL_UNINSTALL = :
35
+ PRE_UNINSTALL = :
36
+ POST_UNINSTALL = :
37
+ build_triplet = @build@
38
+ host_triplet = @host@
39
+ bin_PROGRAMS = parsleyc$(EXEEXT) parsley$(EXEEXT)
40
+ subdir = .
41
+ DIST_COMMON = $(am__configure_deps) $(include_HEADERS) \
42
+ $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
43
+ $(top_srcdir)/configure AUTHORS ChangeLog INSTALL NEWS TODO \
44
+ config.guess config.sub depcomp install-sh ltmain.sh missing \
45
+ parser.c parser.h scanner.c ylwrap
46
+ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
47
+ am__aclocal_m4_deps = $(top_srcdir)/configure.ac
48
+ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
49
+ $(ACLOCAL_M4)
50
+ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
51
+ configure.lineno config.status.lineno
52
+ mkinstalldirs = $(install_sh) -d
53
+ CONFIG_CLEAN_FILES =
54
+ CONFIG_CLEAN_VPATH_FILES =
55
+ am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
56
+ am__vpath_adj = case $$p in \
57
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
58
+ *) f=$$p;; \
59
+ esac;
60
+ am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
61
+ am__install_max = 40
62
+ am__nobase_strip_setup = \
63
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
64
+ am__nobase_strip = \
65
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
66
+ am__nobase_list = $(am__nobase_strip_setup); \
67
+ for p in $$list; do echo "$$p $$p"; done | \
68
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
69
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
70
+ if (++n[$$2] == $(am__install_max)) \
71
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
72
+ END { for (dir in files) print dir, files[dir] }'
73
+ am__base_list = \
74
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
75
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
76
+ am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \
77
+ "$(DESTDIR)$(includedir)"
78
+ LTLIBRARIES = $(lib_LTLIBRARIES)
79
+ libparsley_la_LIBADD =
80
+ am_libparsley_la_OBJECTS = parsed_xpath.lo xml2json.lo regexp.lo \
81
+ functions.lo util.lo scanner.lo parser.lo parsley.lo
82
+ libparsley_la_OBJECTS = $(am_libparsley_la_OBJECTS)
83
+ PROGRAMS = $(bin_PROGRAMS)
84
+ am_parsley_OBJECTS = parsley_main.$(OBJEXT)
85
+ parsley_OBJECTS = $(am_parsley_OBJECTS)
86
+ parsley_DEPENDENCIES = libparsley.la json-c-0.9/libjson.la
87
+ am_parsleyc_OBJECTS = parsleyc_main.$(OBJEXT)
88
+ parsleyc_OBJECTS = $(am_parsleyc_OBJECTS)
89
+ parsleyc_DEPENDENCIES = libparsley.la json-c-0.9/libjson.la
90
+ DEFAULT_INCLUDES = -I.@am__isrc@
91
+ depcomp = $(SHELL) $(top_srcdir)/depcomp
92
+ am__depfiles_maybe = depfiles
93
+ am__mv = mv -f
94
+ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
95
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
96
+ LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
97
+ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
98
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
99
+ CCLD = $(CC)
100
+ LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
101
+ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
102
+ $(LDFLAGS) -o $@
103
+ LEXCOMPILE = $(LEX) $(LFLAGS) $(AM_LFLAGS)
104
+ LTLEXCOMPILE = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
105
+ --mode=compile $(LEX) $(LFLAGS) $(AM_LFLAGS)
106
+ YLWRAP = $(top_srcdir)/ylwrap
107
+ YACCCOMPILE = $(YACC) $(YFLAGS) $(AM_YFLAGS)
108
+ LTYACCCOMPILE = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
109
+ --mode=compile $(YACC) $(YFLAGS) $(AM_YFLAGS)
110
+ SOURCES = $(libparsley_la_SOURCES) $(parsley_SOURCES) \
111
+ $(parsleyc_SOURCES)
112
+ DIST_SOURCES = $(libparsley_la_SOURCES) $(parsley_SOURCES) \
113
+ $(parsleyc_SOURCES)
114
+ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
115
+ html-recursive info-recursive install-data-recursive \
116
+ install-dvi-recursive install-exec-recursive \
117
+ install-html-recursive install-info-recursive \
118
+ install-pdf-recursive install-ps-recursive install-recursive \
119
+ installcheck-recursive installdirs-recursive pdf-recursive \
120
+ ps-recursive uninstall-recursive
121
+ HEADERS = $(include_HEADERS)
122
+ RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
123
+ distclean-recursive maintainer-clean-recursive
124
+ AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
125
+ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
126
+ distdir dist dist-all distcheck
127
+ ETAGS = etags
128
+ CTAGS = ctags
129
+ DIST_SUBDIRS = $(SUBDIRS)
130
+ DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
131
+ distdir = $(PACKAGE)-$(VERSION)
132
+ top_distdir = $(distdir)
133
+ am__remove_distdir = \
134
+ { test ! -d "$(distdir)" \
135
+ || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
136
+ && rm -fr "$(distdir)"; }; }
137
+ am__relativize = \
138
+ dir0=`pwd`; \
139
+ sed_first='s,^\([^/]*\)/.*$$,\1,'; \
140
+ sed_rest='s,^[^/]*/*,,'; \
141
+ sed_last='s,^.*/\([^/]*\)$$,\1,'; \
142
+ sed_butlast='s,/*[^/]*$$,,'; \
143
+ while test -n "$$dir1"; do \
144
+ first=`echo "$$dir1" | sed -e "$$sed_first"`; \
145
+ if test "$$first" != "."; then \
146
+ if test "$$first" = ".."; then \
147
+ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
148
+ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
149
+ else \
150
+ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
151
+ if test "$$first2" = "$$first"; then \
152
+ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
153
+ else \
154
+ dir2="../$$dir2"; \
155
+ fi; \
156
+ dir0="$$dir0"/"$$first"; \
157
+ fi; \
158
+ fi; \
159
+ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
160
+ done; \
161
+ reldir="$$dir2"
162
+ DIST_ARCHIVES = $(distdir).tar.gz
163
+ GZIP_ENV = --best
164
+ distuninstallcheck_listfiles = find . -type f -print
165
+ distcleancheck_listfiles = find . -type f -print
166
+ ACLOCAL = @ACLOCAL@
167
+ AMTAR = @AMTAR@
168
+ AR = @AR@
169
+ AUTOCONF = @AUTOCONF@
170
+ AUTOHEADER = @AUTOHEADER@
171
+ AUTOMAKE = @AUTOMAKE@
172
+ AWK = @AWK@
173
+ CC = @CC@
174
+ CCDEPMODE = @CCDEPMODE@
175
+ CFLAGS = @CFLAGS@
176
+ CPP = @CPP@
177
+ CPPFLAGS = @CPPFLAGS@
178
+ CYGPATH_W = @CYGPATH_W@
179
+ DEFS = @DEFS@
180
+ DEPDIR = @DEPDIR@
181
+ DSYMUTIL = @DSYMUTIL@
182
+ DUMPBIN = @DUMPBIN@
183
+ ECHO_C = @ECHO_C@
184
+ ECHO_N = @ECHO_N@
185
+ ECHO_T = @ECHO_T@
186
+ EGREP = @EGREP@
187
+ EXEEXT = @EXEEXT@
188
+ FGREP = @FGREP@
189
+ GREP = @GREP@
190
+ INSTALL = @INSTALL@
191
+ INSTALL_DATA = @INSTALL_DATA@
192
+ INSTALL_PROGRAM = @INSTALL_PROGRAM@
193
+ INSTALL_SCRIPT = @INSTALL_SCRIPT@
194
+ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
195
+ LD = @LD@
196
+ LDFLAGS = @LDFLAGS@
197
+ LEX = @LEX@
198
+ LEXLIB = @LEXLIB@
199
+ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
200
+ LIBOBJS = @LIBOBJS@
201
+ LIBS = @LIBS@
202
+ LIBTOOL = @LIBTOOL@
203
+ LIPO = @LIPO@
204
+ LN_S = @LN_S@
205
+ LTLIBOBJS = @LTLIBOBJS@
206
+ MAKEINFO = @MAKEINFO@
207
+ MKDIR_P = @MKDIR_P@
208
+ NM = @NM@
209
+ NMEDIT = @NMEDIT@
210
+ OBJDUMP = @OBJDUMP@
211
+ OBJEXT = @OBJEXT@
212
+ OTOOL = @OTOOL@
213
+ OTOOL64 = @OTOOL64@
214
+ PACKAGE = @PACKAGE@
215
+ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
216
+ PACKAGE_NAME = @PACKAGE_NAME@
217
+ PACKAGE_STRING = @PACKAGE_STRING@
218
+ PACKAGE_TARNAME = @PACKAGE_TARNAME@
219
+ PACKAGE_URL = @PACKAGE_URL@
220
+ PACKAGE_VERSION = @PACKAGE_VERSION@
221
+ PATH_SEPARATOR = @PATH_SEPARATOR@
222
+ RANLIB = @RANLIB@
223
+ SED = @SED@
224
+ SET_MAKE = @SET_MAKE@
225
+ SHELL = @SHELL@
226
+ STRIP = @STRIP@
227
+ VERSION = @VERSION@
228
+ XML2_CONFIG = @XML2_CONFIG@
229
+ XSLT_CONFIG = @XSLT_CONFIG@
230
+ YACC = @YACC@
231
+ YFLAGS = @YFLAGS@
232
+ abs_builddir = @abs_builddir@
233
+ abs_srcdir = @abs_srcdir@
234
+ abs_top_builddir = @abs_top_builddir@
235
+ abs_top_srcdir = @abs_top_srcdir@
236
+ ac_ct_CC = @ac_ct_CC@
237
+ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
238
+ am__include = @am__include@
239
+ am__leading_dot = @am__leading_dot@
240
+ am__quote = @am__quote@
241
+ am__tar = @am__tar@
242
+ am__untar = @am__untar@
243
+ bindir = @bindir@
244
+ build = @build@
245
+ build_alias = @build_alias@
246
+ build_cpu = @build_cpu@
247
+ build_os = @build_os@
248
+ build_vendor = @build_vendor@
249
+ builddir = @builddir@
250
+ datadir = @datadir@
251
+ datarootdir = @datarootdir@
252
+ docdir = @docdir@
253
+ dvidir = @dvidir@
254
+ exec_prefix = @exec_prefix@
255
+ host = @host@
256
+ host_alias = @host_alias@
257
+ host_cpu = @host_cpu@
258
+ host_os = @host_os@
259
+ host_vendor = @host_vendor@
260
+ htmldir = @htmldir@
261
+ includedir = @includedir@
262
+ infodir = @infodir@
263
+ install_sh = @install_sh@
264
+ libdir = @libdir@
265
+ libexecdir = @libexecdir@
266
+ localedir = @localedir@
267
+ localstatedir = @localstatedir@
268
+ lt_ECHO = @lt_ECHO@
269
+ mandir = @mandir@
270
+ mkdir_p = @mkdir_p@
271
+ oldincludedir = @oldincludedir@
272
+ pdfdir = @pdfdir@
273
+ prefix = @prefix@
274
+ program_transform_name = @program_transform_name@
275
+ psdir = @psdir@
276
+ sbindir = @sbindir@
277
+ sharedstatedir = @sharedstatedir@
278
+ srcdir = @srcdir@
279
+ subdirs = @subdirs@
280
+ sysconfdir = @sysconfdir@
281
+ target_alias = @target_alias@
282
+ top_build_prefix = @top_build_prefix@
283
+ top_builddir = @top_builddir@
284
+ top_srcdir = @top_srcdir@
285
+ AM_YFLAGS = -d
286
+ SUBDIRS = json-c-0.9
287
+ AM_CPPFLAGS = -I$json-c-0.9
288
+ BUILT_SOURCES = parser.h
289
+ lib_LTLIBRARIES = libparsley.la
290
+ libparsley_la_SOURCES = parsed_xpath.c xml2json.c regexp.c functions.c util.c scanner.l parser.y parsley.c
291
+ include_HEADERS = parsley.h xml2json.h parsed_xpath.h
292
+ parsleyc_SOURCES = parsleyc_main.c
293
+ parsleyc_LDADD = libparsley.la json-c-0.9/libjson.la
294
+ parsley_SOURCES = parsley_main.c
295
+ parsley_LDADD = libparsley.la json-c-0.9/libjson.la
296
+ all: $(BUILT_SOURCES)
297
+ $(MAKE) $(AM_MAKEFLAGS) all-recursive
298
+
299
+ .SUFFIXES:
300
+ .SUFFIXES: .c .l .lo .o .obj .y
301
+ am--refresh:
302
+ @:
303
+ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
304
+ @for dep in $?; do \
305
+ case '$(am__configure_deps)' in \
306
+ *$$dep*) \
307
+ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \
308
+ $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \
309
+ && exit 0; \
310
+ exit 1;; \
311
+ esac; \
312
+ done; \
313
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
314
+ $(am__cd) $(top_srcdir) && \
315
+ $(AUTOMAKE) --foreign Makefile
316
+ .PRECIOUS: Makefile
317
+ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
318
+ @case '$?' in \
319
+ *config.status*) \
320
+ echo ' $(SHELL) ./config.status'; \
321
+ $(SHELL) ./config.status;; \
322
+ *) \
323
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
324
+ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
325
+ esac;
326
+
327
+ $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
328
+ $(SHELL) ./config.status --recheck
329
+
330
+ $(top_srcdir)/configure: $(am__configure_deps)
331
+ $(am__cd) $(srcdir) && $(AUTOCONF)
332
+ $(ACLOCAL_M4): $(am__aclocal_m4_deps)
333
+ $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
334
+ $(am__aclocal_m4_deps):
335
+ install-libLTLIBRARIES: $(lib_LTLIBRARIES)
336
+ @$(NORMAL_INSTALL)
337
+ test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
338
+ @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
339
+ list2=; for p in $$list; do \
340
+ if test -f $$p; then \
341
+ list2="$$list2 $$p"; \
342
+ else :; fi; \
343
+ done; \
344
+ test -z "$$list2" || { \
345
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
346
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
347
+ }
348
+
349
+ uninstall-libLTLIBRARIES:
350
+ @$(NORMAL_UNINSTALL)
351
+ @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
352
+ for p in $$list; do \
353
+ $(am__strip_dir) \
354
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
355
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
356
+ done
357
+
358
+ clean-libLTLIBRARIES:
359
+ -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
360
+ @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
361
+ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
362
+ test "$$dir" != "$$p" || dir=.; \
363
+ echo "rm -f \"$${dir}/so_locations\""; \
364
+ rm -f "$${dir}/so_locations"; \
365
+ done
366
+ parser.h: parser.c
367
+ @if test ! -f $@; then \
368
+ rm -f parser.c; \
369
+ $(MAKE) $(AM_MAKEFLAGS) parser.c; \
370
+ else :; fi
371
+ libparsley.la: $(libparsley_la_OBJECTS) $(libparsley_la_DEPENDENCIES)
372
+ $(LINK) -rpath $(libdir) $(libparsley_la_OBJECTS) $(libparsley_la_LIBADD) $(LIBS)
373
+ install-binPROGRAMS: $(bin_PROGRAMS)
374
+ @$(NORMAL_INSTALL)
375
+ test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
376
+ @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
377
+ for p in $$list; do echo "$$p $$p"; done | \
378
+ sed 's/$(EXEEXT)$$//' | \
379
+ while read p p1; do if test -f $$p || test -f $$p1; \
380
+ then echo "$$p"; echo "$$p"; else :; fi; \
381
+ done | \
382
+ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
383
+ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
384
+ sed 'N;N;N;s,\n, ,g' | \
385
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
386
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
387
+ if ($$2 == $$4) files[d] = files[d] " " $$1; \
388
+ else { print "f", $$3 "/" $$4, $$1; } } \
389
+ END { for (d in files) print "f", d, files[d] }' | \
390
+ while read type dir files; do \
391
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
392
+ test -z "$$files" || { \
393
+ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
394
+ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
395
+ } \
396
+ ; done
397
+
398
+ uninstall-binPROGRAMS:
399
+ @$(NORMAL_UNINSTALL)
400
+ @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
401
+ files=`for p in $$list; do echo "$$p"; done | \
402
+ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
403
+ -e 's/$$/$(EXEEXT)/' `; \
404
+ test -n "$$list" || exit 0; \
405
+ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
406
+ cd "$(DESTDIR)$(bindir)" && rm -f $$files
407
+
408
+ clean-binPROGRAMS:
409
+ @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
410
+ echo " rm -f" $$list; \
411
+ rm -f $$list || exit $$?; \
412
+ test -n "$(EXEEXT)" || exit 0; \
413
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
414
+ echo " rm -f" $$list; \
415
+ rm -f $$list
416
+ parsley$(EXEEXT): $(parsley_OBJECTS) $(parsley_DEPENDENCIES)
417
+ @rm -f parsley$(EXEEXT)
418
+ $(LINK) $(parsley_OBJECTS) $(parsley_LDADD) $(LIBS)
419
+ parsleyc$(EXEEXT): $(parsleyc_OBJECTS) $(parsleyc_DEPENDENCIES)
420
+ @rm -f parsleyc$(EXEEXT)
421
+ $(LINK) $(parsleyc_OBJECTS) $(parsleyc_LDADD) $(LIBS)
422
+
423
+ mostlyclean-compile:
424
+ -rm -f *.$(OBJEXT)
425
+
426
+ distclean-compile:
427
+ -rm -f *.tab.c
428
+
429
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/functions.Plo@am__quote@
430
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parsed_xpath.Plo@am__quote@
431
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parser.Plo@am__quote@
432
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parsley.Plo@am__quote@
433
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parsley_main.Po@am__quote@
434
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parsleyc_main.Po@am__quote@
435
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regexp.Plo@am__quote@
436
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scanner.Plo@am__quote@
437
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/util.Plo@am__quote@
438
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xml2json.Plo@am__quote@
439
+
440
+ .c.o:
441
+ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
442
+ @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
443
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
444
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
445
+ @am__fastdepCC_FALSE@ $(COMPILE) -c $<
446
+
447
+ .c.obj:
448
+ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
449
+ @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
450
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
451
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
452
+ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
453
+
454
+ .c.lo:
455
+ @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
456
+ @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
457
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
458
+ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
459
+ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
460
+
461
+ .l.c:
462
+ $(am__skiplex) $(SHELL) $(YLWRAP) $< $(LEX_OUTPUT_ROOT).c $@ -- $(LEXCOMPILE)
463
+
464
+ .y.c:
465
+ $(am__skipyacc) $(SHELL) $(YLWRAP) $< y.tab.c $@ y.tab.h $*.h y.output $*.output -- $(YACCCOMPILE)
466
+
467
+ mostlyclean-libtool:
468
+ -rm -f *.lo
469
+
470
+ clean-libtool:
471
+ -rm -rf .libs _libs
472
+
473
+ distclean-libtool:
474
+ -rm -f libtool config.lt
475
+ install-includeHEADERS: $(include_HEADERS)
476
+ @$(NORMAL_INSTALL)
477
+ test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)"
478
+ @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
479
+ for p in $$list; do \
480
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
481
+ echo "$$d$$p"; \
482
+ done | $(am__base_list) | \
483
+ while read files; do \
484
+ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \
485
+ $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \
486
+ done
487
+
488
+ uninstall-includeHEADERS:
489
+ @$(NORMAL_UNINSTALL)
490
+ @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
491
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
492
+ test -n "$$files" || exit 0; \
493
+ echo " ( cd '$(DESTDIR)$(includedir)' && rm -f" $$files ")"; \
494
+ cd "$(DESTDIR)$(includedir)" && rm -f $$files
495
+
496
+ # This directory's subdirectories are mostly independent; you can cd
497
+ # into them and run `make' without going through this Makefile.
498
+ # To change the values of `make' variables: instead of editing Makefiles,
499
+ # (1) if the variable is set in `config.status', edit `config.status'
500
+ # (which will cause the Makefiles to be regenerated when you run `make');
501
+ # (2) otherwise, pass the desired values on the `make' command line.
502
+ $(RECURSIVE_TARGETS):
503
+ @failcom='exit 1'; \
504
+ for f in x $$MAKEFLAGS; do \
505
+ case $$f in \
506
+ *=* | --[!k]*);; \
507
+ *k*) failcom='fail=yes';; \
508
+ esac; \
509
+ done; \
510
+ dot_seen=no; \
511
+ target=`echo $@ | sed s/-recursive//`; \
512
+ list='$(SUBDIRS)'; for subdir in $$list; do \
513
+ echo "Making $$target in $$subdir"; \
514
+ if test "$$subdir" = "."; then \
515
+ dot_seen=yes; \
516
+ local_target="$$target-am"; \
517
+ else \
518
+ local_target="$$target"; \
519
+ fi; \
520
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
521
+ || eval $$failcom; \
522
+ done; \
523
+ if test "$$dot_seen" = "no"; then \
524
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
525
+ fi; test -z "$$fail"
526
+
527
+ $(RECURSIVE_CLEAN_TARGETS):
528
+ @failcom='exit 1'; \
529
+ for f in x $$MAKEFLAGS; do \
530
+ case $$f in \
531
+ *=* | --[!k]*);; \
532
+ *k*) failcom='fail=yes';; \
533
+ esac; \
534
+ done; \
535
+ dot_seen=no; \
536
+ case "$@" in \
537
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
538
+ *) list='$(SUBDIRS)' ;; \
539
+ esac; \
540
+ rev=''; for subdir in $$list; do \
541
+ if test "$$subdir" = "."; then :; else \
542
+ rev="$$subdir $$rev"; \
543
+ fi; \
544
+ done; \
545
+ rev="$$rev ."; \
546
+ target=`echo $@ | sed s/-recursive//`; \
547
+ for subdir in $$rev; do \
548
+ echo "Making $$target in $$subdir"; \
549
+ if test "$$subdir" = "."; then \
550
+ local_target="$$target-am"; \
551
+ else \
552
+ local_target="$$target"; \
553
+ fi; \
554
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
555
+ || eval $$failcom; \
556
+ done && test -z "$$fail"
557
+ tags-recursive:
558
+ list='$(SUBDIRS)'; for subdir in $$list; do \
559
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
560
+ done
561
+ ctags-recursive:
562
+ list='$(SUBDIRS)'; for subdir in $$list; do \
563
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
564
+ done
565
+
566
+ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
567
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
568
+ unique=`for i in $$list; do \
569
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
570
+ done | \
571
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
572
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
573
+ mkid -fID $$unique
574
+ tags: TAGS
575
+
576
+ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
577
+ $(TAGS_FILES) $(LISP)
578
+ set x; \
579
+ here=`pwd`; \
580
+ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
581
+ include_option=--etags-include; \
582
+ empty_fix=.; \
583
+ else \
584
+ include_option=--include; \
585
+ empty_fix=; \
586
+ fi; \
587
+ list='$(SUBDIRS)'; for subdir in $$list; do \
588
+ if test "$$subdir" = .; then :; else \
589
+ test ! -f $$subdir/TAGS || \
590
+ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
591
+ fi; \
592
+ done; \
593
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
594
+ unique=`for i in $$list; do \
595
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
596
+ done | \
597
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
598
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
599
+ shift; \
600
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
601
+ test -n "$$unique" || unique=$$empty_fix; \
602
+ if test $$# -gt 0; then \
603
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
604
+ "$$@" $$unique; \
605
+ else \
606
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
607
+ $$unique; \
608
+ fi; \
609
+ fi
610
+ ctags: CTAGS
611
+ CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
612
+ $(TAGS_FILES) $(LISP)
613
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
614
+ unique=`for i in $$list; do \
615
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
616
+ done | \
617
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
618
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
619
+ test -z "$(CTAGS_ARGS)$$unique" \
620
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
621
+ $$unique
622
+
623
+ GTAGS:
624
+ here=`$(am__cd) $(top_builddir) && pwd` \
625
+ && $(am__cd) $(top_srcdir) \
626
+ && gtags -i $(GTAGS_ARGS) "$$here"
627
+
628
+ distclean-tags:
629
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
630
+
631
+ distdir: $(DISTFILES)
632
+ $(am__remove_distdir)
633
+ test -d "$(distdir)" || mkdir "$(distdir)"
634
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
635
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
636
+ list='$(DISTFILES)'; \
637
+ dist_files=`for file in $$list; do echo $$file; done | \
638
+ sed -e "s|^$$srcdirstrip/||;t" \
639
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
640
+ case $$dist_files in \
641
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
642
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
643
+ sort -u` ;; \
644
+ esac; \
645
+ for file in $$dist_files; do \
646
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
647
+ if test -d $$d/$$file; then \
648
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
649
+ if test -d "$(distdir)/$$file"; then \
650
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
651
+ fi; \
652
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
653
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
654
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
655
+ fi; \
656
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
657
+ else \
658
+ test -f "$(distdir)/$$file" \
659
+ || cp -p $$d/$$file "$(distdir)/$$file" \
660
+ || exit 1; \
661
+ fi; \
662
+ done
663
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
664
+ if test "$$subdir" = .; then :; else \
665
+ test -d "$(distdir)/$$subdir" \
666
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
667
+ || exit 1; \
668
+ fi; \
669
+ done
670
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
671
+ if test "$$subdir" = .; then :; else \
672
+ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
673
+ $(am__relativize); \
674
+ new_distdir=$$reldir; \
675
+ dir1=$$subdir; dir2="$(top_distdir)"; \
676
+ $(am__relativize); \
677
+ new_top_distdir=$$reldir; \
678
+ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
679
+ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
680
+ ($(am__cd) $$subdir && \
681
+ $(MAKE) $(AM_MAKEFLAGS) \
682
+ top_distdir="$$new_top_distdir" \
683
+ distdir="$$new_distdir" \
684
+ am__remove_distdir=: \
685
+ am__skip_length_check=: \
686
+ am__skip_mode_fix=: \
687
+ distdir) \
688
+ || exit 1; \
689
+ fi; \
690
+ done
691
+ -test -n "$(am__skip_mode_fix)" \
692
+ || find "$(distdir)" -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
693
+ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
694
+ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
695
+ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
696
+ || chmod -R a+r "$(distdir)"
697
+ dist-gzip: distdir
698
+ tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
699
+ $(am__remove_distdir)
700
+
701
+ dist-bzip2: distdir
702
+ tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
703
+ $(am__remove_distdir)
704
+
705
+ dist-lzma: distdir
706
+ tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
707
+ $(am__remove_distdir)
708
+
709
+ dist-xz: distdir
710
+ tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
711
+ $(am__remove_distdir)
712
+
713
+ dist-tarZ: distdir
714
+ tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
715
+ $(am__remove_distdir)
716
+
717
+ dist-shar: distdir
718
+ shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
719
+ $(am__remove_distdir)
720
+
721
+ dist-zip: distdir
722
+ -rm -f $(distdir).zip
723
+ zip -rq $(distdir).zip $(distdir)
724
+ $(am__remove_distdir)
725
+
726
+ dist dist-all: distdir
727
+ tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
728
+ $(am__remove_distdir)
729
+
730
+ # This target untars the dist file and tries a VPATH configuration. Then
731
+ # it guarantees that the distribution is self-contained by making another
732
+ # tarfile.
733
+ distcheck: dist
734
+ case '$(DIST_ARCHIVES)' in \
735
+ *.tar.gz*) \
736
+ GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
737
+ *.tar.bz2*) \
738
+ bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
739
+ *.tar.lzma*) \
740
+ unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\
741
+ *.tar.xz*) \
742
+ xz -dc $(distdir).tar.xz | $(am__untar) ;;\
743
+ *.tar.Z*) \
744
+ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
745
+ *.shar.gz*) \
746
+ GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
747
+ *.zip*) \
748
+ unzip $(distdir).zip ;;\
749
+ esac
750
+ chmod -R a-w $(distdir); chmod a+w $(distdir)
751
+ mkdir $(distdir)/_build
752
+ mkdir $(distdir)/_inst
753
+ chmod a-w $(distdir)
754
+ test -d $(distdir)/_build || exit 0; \
755
+ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
756
+ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
757
+ && am__cwd=`pwd` \
758
+ && $(am__cd) $(distdir)/_build \
759
+ && ../configure --srcdir=.. --prefix="$$dc_install_base" \
760
+ $(DISTCHECK_CONFIGURE_FLAGS) \
761
+ && $(MAKE) $(AM_MAKEFLAGS) \
762
+ && $(MAKE) $(AM_MAKEFLAGS) dvi \
763
+ && $(MAKE) $(AM_MAKEFLAGS) check \
764
+ && $(MAKE) $(AM_MAKEFLAGS) install \
765
+ && $(MAKE) $(AM_MAKEFLAGS) installcheck \
766
+ && $(MAKE) $(AM_MAKEFLAGS) uninstall \
767
+ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
768
+ distuninstallcheck \
769
+ && chmod -R a-w "$$dc_install_base" \
770
+ && ({ \
771
+ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
772
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
773
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
774
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
775
+ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
776
+ } || { rm -rf "$$dc_destdir"; exit 1; }) \
777
+ && rm -rf "$$dc_destdir" \
778
+ && $(MAKE) $(AM_MAKEFLAGS) dist \
779
+ && rm -rf $(DIST_ARCHIVES) \
780
+ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
781
+ && cd "$$am__cwd" \
782
+ || exit 1
783
+ $(am__remove_distdir)
784
+ @(echo "$(distdir) archives ready for distribution: "; \
785
+ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
786
+ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
787
+ distuninstallcheck:
788
+ @$(am__cd) '$(distuninstallcheck_dir)' \
789
+ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
790
+ || { echo "ERROR: files left after uninstall:" ; \
791
+ if test -n "$(DESTDIR)"; then \
792
+ echo " (check DESTDIR support)"; \
793
+ fi ; \
794
+ $(distuninstallcheck_listfiles) ; \
795
+ exit 1; } >&2
796
+ distcleancheck: distclean
797
+ @if test '$(srcdir)' = . ; then \
798
+ echo "ERROR: distcleancheck can only run from a VPATH build" ; \
799
+ exit 1 ; \
800
+ fi
801
+ @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
802
+ || { echo "ERROR: files left in build directory after distclean:" ; \
803
+ $(distcleancheck_listfiles) ; \
804
+ exit 1; } >&2
805
+ check-am: all-am
806
+ check: $(BUILT_SOURCES)
807
+ $(MAKE) $(AM_MAKEFLAGS) check-recursive
808
+ all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(HEADERS)
809
+ install-binPROGRAMS: install-libLTLIBRARIES
810
+
811
+ installdirs: installdirs-recursive
812
+ installdirs-am:
813
+ for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(includedir)"; do \
814
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
815
+ done
816
+ install: $(BUILT_SOURCES)
817
+ $(MAKE) $(AM_MAKEFLAGS) install-recursive
818
+ install-exec: install-exec-recursive
819
+ install-data: install-data-recursive
820
+ uninstall: uninstall-recursive
821
+
822
+ install-am: all-am
823
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
824
+
825
+ installcheck: installcheck-recursive
826
+ install-strip:
827
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
828
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
829
+ `test -z '$(STRIP)' || \
830
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
831
+ mostlyclean-generic:
832
+
833
+ clean-generic:
834
+
835
+ distclean-generic:
836
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
837
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
838
+
839
+ maintainer-clean-generic:
840
+ @echo "This command is intended for maintainers to use"
841
+ @echo "it deletes files that may require special tools to rebuild."
842
+ -rm -f parser.c
843
+ -rm -f parser.h
844
+ -rm -f scanner.c
845
+ -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
846
+ clean: clean-recursive
847
+
848
+ clean-am: clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \
849
+ clean-libtool mostlyclean-am
850
+
851
+ distclean: distclean-recursive
852
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
853
+ -rm -rf ./$(DEPDIR)
854
+ -rm -f Makefile
855
+ distclean-am: clean-am distclean-compile distclean-generic \
856
+ distclean-libtool distclean-tags
857
+
858
+ dvi: dvi-recursive
859
+
860
+ dvi-am:
861
+
862
+ html: html-recursive
863
+
864
+ html-am:
865
+
866
+ info: info-recursive
867
+
868
+ info-am:
869
+
870
+ install-data-am: install-includeHEADERS
871
+
872
+ install-dvi: install-dvi-recursive
873
+
874
+ install-dvi-am:
875
+
876
+ install-exec-am: install-binPROGRAMS install-libLTLIBRARIES
877
+
878
+ install-html: install-html-recursive
879
+
880
+ install-html-am:
881
+
882
+ install-info: install-info-recursive
883
+
884
+ install-info-am:
885
+
886
+ install-man:
887
+
888
+ install-pdf: install-pdf-recursive
889
+
890
+ install-pdf-am:
891
+
892
+ install-ps: install-ps-recursive
893
+
894
+ install-ps-am:
895
+
896
+ installcheck-am:
897
+
898
+ maintainer-clean: maintainer-clean-recursive
899
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
900
+ -rm -rf $(top_srcdir)/autom4te.cache
901
+ -rm -rf ./$(DEPDIR)
902
+ -rm -f Makefile
903
+ maintainer-clean-am: distclean-am maintainer-clean-generic
904
+
905
+ mostlyclean: mostlyclean-recursive
906
+
907
+ mostlyclean-am: mostlyclean-compile mostlyclean-generic \
908
+ mostlyclean-libtool
909
+
910
+ pdf: pdf-recursive
911
+
912
+ pdf-am:
913
+
914
+ ps: ps-recursive
915
+
916
+ ps-am:
917
+
918
+ uninstall-am: uninstall-binPROGRAMS uninstall-includeHEADERS \
919
+ uninstall-libLTLIBRARIES
920
+
921
+ .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check \
922
+ ctags-recursive install install-am install-strip \
923
+ tags-recursive
924
+
925
+ .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
926
+ all all-am am--refresh check check-am clean clean-binPROGRAMS \
927
+ clean-generic clean-libLTLIBRARIES clean-libtool ctags \
928
+ ctags-recursive dist dist-all dist-bzip2 dist-gzip dist-lzma \
929
+ dist-shar dist-tarZ dist-xz dist-zip distcheck distclean \
930
+ distclean-compile distclean-generic distclean-libtool \
931
+ distclean-tags distcleancheck distdir distuninstallcheck dvi \
932
+ dvi-am html html-am info info-am install install-am \
933
+ install-binPROGRAMS install-data install-data-am install-dvi \
934
+ install-dvi-am install-exec install-exec-am install-html \
935
+ install-html-am install-includeHEADERS install-info \
936
+ install-info-am install-libLTLIBRARIES install-man install-pdf \
937
+ install-pdf-am install-ps install-ps-am install-strip \
938
+ installcheck installcheck-am installdirs installdirs-am \
939
+ maintainer-clean maintainer-clean-generic mostlyclean \
940
+ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
941
+ pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \
942
+ uninstall-binPROGRAMS uninstall-includeHEADERS \
943
+ uninstall-libLTLIBRARIES
944
+
945
+
946
+ valgrind:
947
+ ./libtool --mode=execute valgrind --tool=memcheck --leak-check=yes --show-reachable=yes --num-callers=20 --track-fds=yes ./parsley test/fictional.let test/fictional.html
948
+
949
+ profile:
950
+ ./libtool --mode=execute valgrind --tool=callgrind ./parsley test/fictional.let test/fictional.html
951
+
952
+ install-all:
953
+ ./bootstrap.sh && ./configure && make && make install && cd ruby && rake install && cd ../python && python setup.py install
954
+
955
+ bench:
956
+ @echo "yelp..."; ./parsley test/yelp.let test/yelp.html > /dev/null
957
+ @echo "craigs-simple..."; ./parsley test/craigs-simple.let test/craigs-simple.html > /dev/null
958
+ @echo "yelp-home..."; ./parsley test/yelp-home.let test/yelp-home.html > /dev/null
959
+ @echo "craigs..."; ./parsley test/craigs.let test/craigs.html > /dev/null
960
+
961
+ check-am:
962
+ @echo "ambiguous..."; ./parsley test/ambiguous.let test/ambiguous.html 2>&1 | diff test/ambiguous.json - && echo " success."
963
+ @echo "unicode..."; ./parsley test/unicode.let test/unicode.html 2>&1 | diff test/unicode.json - && echo " success."
964
+ @echo "contains..."; ./parsley test/contains.let test/contains.html 2>&1 | diff test/contains.json - && echo " success."
965
+ @echo "math_ambiguity..."; ./parsley test/math_ambiguity.let test/math_ambiguity.html 2>&1 | diff test/math_ambiguity.json - && echo " success."
966
+ @echo "content..."; ./parsley test/content.let test/content.html 2>&1 | diff test/content.json - && echo " success."
967
+ @echo "whitespace..."; ./parsley test/whitespace.let test/whitespace.html 2>&1 | diff test/whitespace.json - && echo " success."
968
+ @echo "backslash..."; ./parsley test/backslash.let test/backslash.html 2>&1 | diff test/backslash.json - && echo " success."
969
+ @echo "question_regressions..."; ./parsley test/question_regressions.let test/question_regressions.html 2>&1 | diff test/question_regressions.json - && echo " success."
970
+ @echo "outer-xml..."; ./parsley test/outer-xml.let test/outer-xml.html 2>&1 | diff test/outer-xml.json - && echo " success."
971
+ @echo "segfault..."; ./parsley test/segfault.let test/segfault.html 2>&1 | diff test/segfault.json - && echo " success."
972
+ @echo "sg_off..."; ./parsley test/sg_off.let test/sg_off.html 2>&1 | diff test/sg_off.json - && echo " success."
973
+ @echo "nth-regression..."; ./parsley test/nth-regression.let test/nth-regression.html 2>&1 | diff test/nth-regression.json - && echo " success."
974
+ @echo "array-regression..."; ./parsley test/array-regression.let test/array-regression.html 2>&1 | diff test/array-regression.json - && echo " success."
975
+ @echo "fictional..."; ./parsley test/fictional.let test/fictional.html 2>&1 | diff test/fictional.json - && echo " success."
976
+ @echo "fictional-opt..."; ./parsley test/fictional-opt.let test/fictional-opt.html 2>&1 | diff test/fictional-opt.json - && echo " success."
977
+ @echo "function-magic..."; ./parsley test/function-magic.let test/function-magic.html 2>&1 | diff test/function-magic.json - && echo " success."
978
+ @echo "malformed-expr..."; ./parsley test/malformed-expr.let test/malformed-expr.html 2>&1 | diff test/malformed-expr.json - && echo " success."
979
+ @echo "malformed-json..."; ./parsley test/malformed-json.let test/malformed-json.html 2>&1 | diff test/malformed-json.json - && echo " success."
980
+ @echo "malformed-array..."; ./parsley test/malformed-array.let test/malformed-array.html 2>&1 | diff test/malformed-array.json - && echo " success."
981
+ @echo "css_attr..."; ./parsley -x test/css_attr.let test/css_attr.html 2>&1 | diff test/css_attr.json - && echo " success."
982
+ @echo "position..."; ./parsley test/position.let test/position.html 2>&1 | diff test/position.json - && echo " success."
983
+ @echo "replace..."; ./parsley -x test/replace.let test/replace.xml 2>&1 | diff test/replace.json - && echo " success."
984
+ @echo "scope..."; ./parsley test/scope.let test/scope.html 2>&1 | diff test/scope.json - && echo " success."
985
+ @echo "test..."; ./parsley -x test/test.let test/test.xml 2>&1 | diff test/test.json - && echo " success."
986
+ @echo "yelp..."; ./parsley test/yelp.let test/yelp.html 2>&1 | diff test/yelp.json - && echo " success."
987
+ @echo "optional..."; ./parsley test/optional.let test/optional.html 2>&1 | diff test/optional.json - && echo " success."
988
+ @echo "empty..."; ./parsley test/empty.let test/empty.html 2>&1 | diff test/empty.json - && echo " success."
989
+ @echo "craigs-simple..."; ./parsley test/craigs-simple.let test/craigs-simple.html 2>&1 | diff test/craigs-simple.json - && echo " success."
990
+ @echo "yelp-home..."; ./parsley test/yelp-home.let test/yelp-home.html 2>&1 | diff test/yelp-home.json - && echo " success."
991
+ @echo "bang..."; ./parsley test/bang.let test/bang.html 2>&1 | diff test/bang.json - && echo " success."
992
+ @echo "cool..."; perl -e 'alarm shift @ARGV; exec @ARGV' 1 ./parsley test/cool.let test/cool.html 2>&1 | diff test/cool.json - && echo " success."
993
+ @echo "trivial2..."; ./parsley test/trivial2.let test/trivial2.html 2>&1 | diff test/trivial2.json - && echo " success."
994
+ @echo "trivial..."; ./parsley test/trivial.let test/trivial.html 2>&1 | diff test/trivial.json - && echo " success."
995
+ @echo "match..."; ./parsley -x test/match.let test/match.xml 2>&1 | diff test/match.json - && echo " success."
996
+ @echo "quote..."; ./parsley test/quote.let test/quote.xml 2>&1 | diff test/quote.json - && echo " success."
997
+ @echo "unbang..."; ./parsley test/unbang.let test/unbang.html 2>&1 | diff test/unbang.json - && echo " success."
998
+ @echo "malformed-xpath..."; ./parsley test/malformed-xpath.let test/malformed-xpath.html 2>&1 | diff test/malformed-xpath.json - && echo " success."
999
+ @echo "remote-fail..."; ./parsley -z test/remote.let test/remote.html 2>&1 | diff test/remote-fail.json - && echo " success."
1000
+ @echo "crash..."; ./parsley test/crash.let test/crash.html 2>&1 | diff test/crash.json - && echo " success."
1001
+ @echo "reddit..."; ./parsley test/reddit.let test/reddit.html 2>&1 | diff test/reddit.json - && echo " success."
1002
+ @echo "div..."; ./parsley test/div.let test/div.html 2>&1 | diff test/div.json - && echo " success."
1003
+ @echo "default-namespace..."; ./parsley -x test/default-namespace.let test/default-namespace.xml 2>&1 | diff test/default-namespace.json - && echo " success."
1004
+ @echo "sg-wrap..."; ./parsley -s test/sg-wrap.let test/sg-wrap.html 2>&1 | diff test/sg-wrap.json - && echo " success."
1005
+ @echo "collate_regression..."; ./parsley test/collate_regression.let test/collate_regression.html 2>&1 | diff test/collate_regression.json - && echo " success."
1006
+
1007
+ # Tell versions [3.59,3.63) of GNU make to not export all variables.
1008
+ # Otherwise a system limit (for SysV at least) may be exceeded.
1009
+ .NOEXPORT: