fancy 0.5.0 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- data/AUTHORS +2 -0
- data/README.md +6 -1
- data/bin/fancy +6 -0
- data/bin/ifancy +44 -3
- data/boot/fancy_ext/module.rb +4 -0
- data/boot/fancy_ext/object.rb +4 -0
- data/boot/rbx-compiler/compiler/ast/block.rb +29 -1
- data/boot/rbx-compiler/compiler/ast/identifier.rb +6 -0
- data/boot/rbx-compiler/compiler/ast/message_send.rb +1 -0
- data/boot/rbx-compiler/parser/fancy_parser.bundle +0 -0
- data/boot/rbx-compiler/parser/lexer.lex +2 -0
- data/boot/rbx-compiler/parser/parser.rb +6 -0
- data/boot/rbx-compiler/parser/parser.y +14 -1
- data/doc/api/fancy.jsonp +1 -1
- data/doc/features.md +24 -0
- data/examples/99bottles.fy +5 -0
- data/examples/conditions_exceptions.fy +9 -0
- data/examples/conditions_parsing.fy +68 -0
- data/examples/greeter.fy +9 -0
- data/examples/html_generator.fy +59 -29
- data/examples/webserver/webserver.fy +8 -11
- data/lib/argv.fy +6 -0
- data/lib/array.fy +17 -35
- data/lib/block.fy +82 -1
- data/lib/boot.fy +4 -2
- data/lib/compiler.fy +2 -2
- data/lib/compiler/ast/block.fy +24 -20
- data/lib/compiler/ast/message_send.fy +11 -0
- data/lib/contracts.fy +60 -0
- data/lib/dynamic_slot_object.fy +61 -0
- data/lib/enumerable.fy +432 -394
- data/lib/enumerator.fy +152 -150
- data/lib/fdoc.fy +4 -17
- data/lib/fiber.fy +4 -10
- data/lib/file.fy +33 -25
- data/lib/future.fy +59 -5
- data/lib/hash.fy +54 -1
- data/lib/html.fy +107 -0
- data/lib/kvo.fy +173 -0
- data/lib/main.fy +6 -2
- data/lib/message_sink.fy +19 -0
- data/lib/number.fy +48 -0
- data/lib/object.fy +65 -13
- data/lib/package.fy +12 -2
- data/lib/package/dependency.fy +13 -0
- data/lib/package/dependency_installer.fy +27 -0
- data/lib/package/installer.fy +4 -10
- data/lib/package/uninstaller.fy +1 -3
- data/lib/parser/ext/lexer.lex +8 -3
- data/lib/parser/ext/parser.y +4 -1
- data/lib/parser/methods.fy +7 -3
- data/lib/range.fy +1 -1
- data/lib/rbx.fy +2 -1
- data/lib/rbx/array.fy +28 -12
- data/lib/rbx/bignum.fy +1 -1
- data/lib/rbx/block.fy +27 -0
- data/lib/rbx/console.fy +6 -6
- data/lib/rbx/date.fy +6 -1
- data/lib/rbx/documentation.fy +8 -3
- data/lib/rbx/exception.fy +5 -0
- data/lib/rbx/file.fy +40 -7
- data/lib/rbx/fixnum.fy +12 -1
- data/lib/rbx/method.fy +9 -2
- data/lib/rbx/module.fy +24 -0
- data/lib/rbx/regexp.fy +8 -0
- data/lib/rbx/string.fy +23 -7
- data/lib/rbx/tcp_server.fy +4 -2
- data/lib/rbx/tcp_socket.fy +14 -0
- data/lib/remote_object.fy +59 -0
- data/lib/set.fy +15 -4
- data/lib/string.fy +38 -5
- data/lib/stringio.fy +1 -0
- data/lib/symbol.fy +4 -0
- data/lib/system.fy +22 -0
- data/lib/thread_pool.fy +2 -2
- data/lib/tuple.fy +18 -1
- data/lib/vars.fy +17 -0
- data/lib/version.fy +1 -1
- data/ruby_lib/fancy +6 -0
- data/tests/array.fy +30 -0
- data/tests/block.fy +106 -0
- data/tests/class.fy +19 -0
- data/tests/enumerable.fy +1 -1
- data/tests/enumerator.fy +5 -5
- data/tests/file.fy +28 -0
- data/tests/fixnum.fy +0 -50
- data/tests/future.fy +9 -24
- data/tests/hash.fy +35 -0
- data/tests/html.fy +33 -0
- data/tests/kvo.fy +101 -0
- data/tests/number.fy +75 -0
- data/tests/object.fy +50 -3
- data/tests/string.fy +19 -10
- data/tests/symbol.fy +5 -0
- data/tests/tuple.fy +7 -0
- data/tools/fancy-mode.el +5 -1
- metadata +22 -21
- data/boot/compiler/parser/ext/fancy_parser.bundle +0 -0
- data/boot/rbx-compiler/parser/Makefile +0 -156
- data/boot/rbx-compiler/parser/lexer.c +0 -2310
- data/boot/rbx-compiler/parser/lexer.h +0 -315
- data/boot/rbx-compiler/parser/parser.c +0 -2946
- data/boot/rbx-compiler/parser/parser.h +0 -151
- data/lib/fiber_pool.fy +0 -78
- data/lib/method.fy +0 -6
- data/lib/parser/ext/Makefile +0 -156
- data/lib/parser/ext/fancy_parser.bundle +0 -0
- data/lib/parser/ext/lexer.c +0 -2392
- data/lib/parser/ext/lexer.h +0 -315
- data/lib/parser/ext/parser.c +0 -3251
- data/lib/parser/ext/parser.h +0 -161
data/lib/parser/ext/parser.h
DELETED
@@ -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
|
-
|