fancy 0.5.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. data/AUTHORS +2 -0
  2. data/README.md +6 -1
  3. data/bin/fancy +6 -0
  4. data/bin/ifancy +44 -3
  5. data/boot/fancy_ext/module.rb +4 -0
  6. data/boot/fancy_ext/object.rb +4 -0
  7. data/boot/rbx-compiler/compiler/ast/block.rb +29 -1
  8. data/boot/rbx-compiler/compiler/ast/identifier.rb +6 -0
  9. data/boot/rbx-compiler/compiler/ast/message_send.rb +1 -0
  10. data/boot/rbx-compiler/parser/fancy_parser.bundle +0 -0
  11. data/boot/rbx-compiler/parser/lexer.lex +2 -0
  12. data/boot/rbx-compiler/parser/parser.rb +6 -0
  13. data/boot/rbx-compiler/parser/parser.y +14 -1
  14. data/doc/api/fancy.jsonp +1 -1
  15. data/doc/features.md +24 -0
  16. data/examples/99bottles.fy +5 -0
  17. data/examples/conditions_exceptions.fy +9 -0
  18. data/examples/conditions_parsing.fy +68 -0
  19. data/examples/greeter.fy +9 -0
  20. data/examples/html_generator.fy +59 -29
  21. data/examples/webserver/webserver.fy +8 -11
  22. data/lib/argv.fy +6 -0
  23. data/lib/array.fy +17 -35
  24. data/lib/block.fy +82 -1
  25. data/lib/boot.fy +4 -2
  26. data/lib/compiler.fy +2 -2
  27. data/lib/compiler/ast/block.fy +24 -20
  28. data/lib/compiler/ast/message_send.fy +11 -0
  29. data/lib/contracts.fy +60 -0
  30. data/lib/dynamic_slot_object.fy +61 -0
  31. data/lib/enumerable.fy +432 -394
  32. data/lib/enumerator.fy +152 -150
  33. data/lib/fdoc.fy +4 -17
  34. data/lib/fiber.fy +4 -10
  35. data/lib/file.fy +33 -25
  36. data/lib/future.fy +59 -5
  37. data/lib/hash.fy +54 -1
  38. data/lib/html.fy +107 -0
  39. data/lib/kvo.fy +173 -0
  40. data/lib/main.fy +6 -2
  41. data/lib/message_sink.fy +19 -0
  42. data/lib/number.fy +48 -0
  43. data/lib/object.fy +65 -13
  44. data/lib/package.fy +12 -2
  45. data/lib/package/dependency.fy +13 -0
  46. data/lib/package/dependency_installer.fy +27 -0
  47. data/lib/package/installer.fy +4 -10
  48. data/lib/package/uninstaller.fy +1 -3
  49. data/lib/parser/ext/lexer.lex +8 -3
  50. data/lib/parser/ext/parser.y +4 -1
  51. data/lib/parser/methods.fy +7 -3
  52. data/lib/range.fy +1 -1
  53. data/lib/rbx.fy +2 -1
  54. data/lib/rbx/array.fy +28 -12
  55. data/lib/rbx/bignum.fy +1 -1
  56. data/lib/rbx/block.fy +27 -0
  57. data/lib/rbx/console.fy +6 -6
  58. data/lib/rbx/date.fy +6 -1
  59. data/lib/rbx/documentation.fy +8 -3
  60. data/lib/rbx/exception.fy +5 -0
  61. data/lib/rbx/file.fy +40 -7
  62. data/lib/rbx/fixnum.fy +12 -1
  63. data/lib/rbx/method.fy +9 -2
  64. data/lib/rbx/module.fy +24 -0
  65. data/lib/rbx/regexp.fy +8 -0
  66. data/lib/rbx/string.fy +23 -7
  67. data/lib/rbx/tcp_server.fy +4 -2
  68. data/lib/rbx/tcp_socket.fy +14 -0
  69. data/lib/remote_object.fy +59 -0
  70. data/lib/set.fy +15 -4
  71. data/lib/string.fy +38 -5
  72. data/lib/stringio.fy +1 -0
  73. data/lib/symbol.fy +4 -0
  74. data/lib/system.fy +22 -0
  75. data/lib/thread_pool.fy +2 -2
  76. data/lib/tuple.fy +18 -1
  77. data/lib/vars.fy +17 -0
  78. data/lib/version.fy +1 -1
  79. data/ruby_lib/fancy +6 -0
  80. data/tests/array.fy +30 -0
  81. data/tests/block.fy +106 -0
  82. data/tests/class.fy +19 -0
  83. data/tests/enumerable.fy +1 -1
  84. data/tests/enumerator.fy +5 -5
  85. data/tests/file.fy +28 -0
  86. data/tests/fixnum.fy +0 -50
  87. data/tests/future.fy +9 -24
  88. data/tests/hash.fy +35 -0
  89. data/tests/html.fy +33 -0
  90. data/tests/kvo.fy +101 -0
  91. data/tests/number.fy +75 -0
  92. data/tests/object.fy +50 -3
  93. data/tests/string.fy +19 -10
  94. data/tests/symbol.fy +5 -0
  95. data/tests/tuple.fy +7 -0
  96. data/tools/fancy-mode.el +5 -1
  97. metadata +22 -21
  98. data/boot/compiler/parser/ext/fancy_parser.bundle +0 -0
  99. data/boot/rbx-compiler/parser/Makefile +0 -156
  100. data/boot/rbx-compiler/parser/lexer.c +0 -2310
  101. data/boot/rbx-compiler/parser/lexer.h +0 -315
  102. data/boot/rbx-compiler/parser/parser.c +0 -2946
  103. data/boot/rbx-compiler/parser/parser.h +0 -151
  104. data/lib/fiber_pool.fy +0 -78
  105. data/lib/method.fy +0 -6
  106. data/lib/parser/ext/Makefile +0 -156
  107. data/lib/parser/ext/fancy_parser.bundle +0 -0
  108. data/lib/parser/ext/lexer.c +0 -2392
  109. data/lib/parser/ext/lexer.h +0 -315
  110. data/lib/parser/ext/parser.c +0 -3251
  111. data/lib/parser/ext/parser.h +0 -161
@@ -1,161 +0,0 @@
1
- /* A Bison parser, made by GNU Bison 2.3. */
2
-
3
- /* Skeleton interface for Bison's Yacc-like parsers in C
4
-
5
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
6
- Free Software Foundation, Inc.
7
-
8
- This program is free software; you can redistribute it and/or modify
9
- it under the terms of the GNU General Public License as published by
10
- the Free Software Foundation; either version 2, or (at your option)
11
- any later version.
12
-
13
- This program is distributed in the hope that it will be useful,
14
- but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
- GNU General Public License for more details.
17
-
18
- You should have received a copy of the GNU General Public License
19
- along with this program; if not, write to the Free Software
20
- Foundation, Inc., 51 Franklin Street, Fifth Floor,
21
- Boston, MA 02110-1301, USA. */
22
-
23
- /* As a special exception, you may create a larger work that contains
24
- part or all of the Bison parser skeleton and distribute that work
25
- under terms of your choice, so long as that work isn't itself a
26
- parser generator using the skeleton or a modified version thereof
27
- as a parser skeleton. Alternatively, if you modify or redistribute
28
- the parser skeleton itself, you may (at your option) remove this
29
- special exception, which will cause the skeleton and the resulting
30
- Bison output files to be licensed under the GNU General Public
31
- License without this special exception.
32
-
33
- This special exception was added by the Free Software Foundation in
34
- version 2.2 of Bison. */
35
-
36
- /* Tokens. */
37
- #ifndef YYTOKENTYPE
38
- # define YYTOKENTYPE
39
- /* Put the tokens into the symbol table, so that GDB and other debuggers
40
- know about them. */
41
- enum yytokentype {
42
- LPAREN = 258,
43
- RPAREN = 259,
44
- FUTURE_SEND = 260,
45
- ASYNC_SEND = 261,
46
- AT_LCURLY = 262,
47
- LCURLY = 263,
48
- RCURLY = 264,
49
- LBRACKET = 265,
50
- RBRACKET = 266,
51
- LEFTHASH = 267,
52
- RIGHTHASH = 268,
53
- STAB = 269,
54
- ARROW = 270,
55
- THIN_ARROW = 271,
56
- COMMA = 272,
57
- SEMI = 273,
58
- NL = 274,
59
- COLON = 275,
60
- RETURN_LOCAL = 276,
61
- RETURN = 277,
62
- TRY = 278,
63
- CATCH = 279,
64
- FINALLY = 280,
65
- RETRY = 281,
66
- SUPER = 282,
67
- CLASS = 283,
68
- DEF = 284,
69
- DOT = 285,
70
- DOLLAR = 286,
71
- EQUALS = 287,
72
- MATCH = 288,
73
- CASE = 289,
74
- IDENTIFIER = 290,
75
- SELECTOR = 291,
76
- RUBY_SEND_OPEN = 292,
77
- RUBY_OPER_OPEN = 293,
78
- CONSTANT = 294,
79
- INTEGER_LITERAL = 295,
80
- HEX_LITERAL = 296,
81
- OCT_LITERAL = 297,
82
- BIN_LITERAL = 298,
83
- DOUBLE_LITERAL = 299,
84
- STRING_LITERAL = 300,
85
- MULTI_STRING_LITERAL = 301,
86
- SYMBOL_LITERAL = 302,
87
- REGEX_LITERAL = 303,
88
- OPERATOR = 304,
89
- BACKTICK_LITERAL = 305
90
- };
91
- #endif
92
- /* Tokens. */
93
- #define LPAREN 258
94
- #define RPAREN 259
95
- #define FUTURE_SEND 260
96
- #define ASYNC_SEND 261
97
- #define AT_LCURLY 262
98
- #define LCURLY 263
99
- #define RCURLY 264
100
- #define LBRACKET 265
101
- #define RBRACKET 266
102
- #define LEFTHASH 267
103
- #define RIGHTHASH 268
104
- #define STAB 269
105
- #define ARROW 270
106
- #define THIN_ARROW 271
107
- #define COMMA 272
108
- #define SEMI 273
109
- #define NL 274
110
- #define COLON 275
111
- #define RETURN_LOCAL 276
112
- #define RETURN 277
113
- #define TRY 278
114
- #define CATCH 279
115
- #define FINALLY 280
116
- #define RETRY 281
117
- #define SUPER 282
118
- #define CLASS 283
119
- #define DEF 284
120
- #define DOT 285
121
- #define DOLLAR 286
122
- #define EQUALS 287
123
- #define MATCH 288
124
- #define CASE 289
125
- #define IDENTIFIER 290
126
- #define SELECTOR 291
127
- #define RUBY_SEND_OPEN 292
128
- #define RUBY_OPER_OPEN 293
129
- #define CONSTANT 294
130
- #define INTEGER_LITERAL 295
131
- #define HEX_LITERAL 296
132
- #define OCT_LITERAL 297
133
- #define BIN_LITERAL 298
134
- #define DOUBLE_LITERAL 299
135
- #define STRING_LITERAL 300
136
- #define MULTI_STRING_LITERAL 301
137
- #define SYMBOL_LITERAL 302
138
- #define REGEX_LITERAL 303
139
- #define OPERATOR 304
140
- #define BACKTICK_LITERAL 305
141
-
142
-
143
-
144
-
145
- #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
146
- typedef union YYSTYPE
147
- #line 18 "/Users/backtype/projects/fancy/lib/parser/ext/parser.y"
148
- {
149
- VALUE object;
150
- ID symbol;
151
- }
152
- /* Line 1529 of yacc.c. */
153
- #line 154 "/Users/backtype/projects/fancy/lib/parser/ext/parser.h"
154
- YYSTYPE;
155
- # define yystype YYSTYPE /* obsolescent; will be withdrawn */
156
- # define YYSTYPE_IS_DECLARED 1
157
- # define YYSTYPE_IS_TRIVIAL 1
158
- #endif
159
-
160
- extern YYSTYPE yylval;
161
-