fancy 0.3.1 → 0.3.2

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.
@@ -0,0 +1,162 @@
1
+
2
+ SHELL = /bin/sh
3
+
4
+ #### Start of system configuration section. ####
5
+
6
+ srcdir = /Users/backtype/projects/fancy/boot/rbx-compiler/parser
7
+ topdir = /Users/backtype/projects/rubinius/vm/capi/include
8
+ hdrdir = $(topdir)
9
+ VPATH = $(srcdir):$(topdir):$(hdrdir)
10
+ prefix = $(DESTDIR)/Users/backtype/projects/rubinius
11
+ exec_prefix = $(prefix)
12
+ install_prefix = $(DESTDIR)
13
+ includedir = $(prefix)/include
14
+ bindir = $(DESTDIR)/Users/backtype/projects/rubinius/bin
15
+ sysconfdir = $(prefix)/etc
16
+ localedir = $(datarootdir)/locale
17
+ rubylibdir = $(DESTDIR)/Users/backtype/projects/rubinius/lib/site
18
+ sitedir = $(DESTDIR)/Users/backtype/projects/rubinius/lib/site
19
+ oldincludedir = $(DESTDIR)/usr/include
20
+ libexecdir = $(exec_prefix)/libexec
21
+ rubyhdrdir = $(DESTDIR)/Users/backtype/projects/rubinius/vm/capi/include
22
+ libdir = $(exec_prefix)/lib
23
+ dvidir = $(docdir)
24
+ docdir = $(datarootdir)/doc/$(PACKAGE)
25
+ psdir = $(docdir)
26
+ infodir = $(datarootdir)/info
27
+ datadir = $(datarootdir)
28
+ archdir = $(DESTDIR)/Users/backtype/projects/rubinius/lib/site/x86_64-darwin10.5.0
29
+ sharedstatedir = $(prefix)/com
30
+ localstatedir = $(prefix)/var
31
+ pdfdir = $(docdir)
32
+ htmldir = $(docdir)
33
+ datarootdir = $(prefix)/share
34
+ sbindir = $(exec_prefix)/sbin
35
+ sitelibdir = $(DESTDIR)/Users/backtype/projects/rubinius/lib/site
36
+ mandir = $(datarootdir)/man
37
+ sitearchdir = $(DESTDIR)/Users/backtype/projects/rubinius/lib/site/x86_64-darwin10.5.0
38
+
39
+ CC = gcc
40
+ LIBRUBY = $(LIBRUBY_SO)
41
+ LIBRUBY_A =
42
+ LIBRUBYARG_SHARED =
43
+ LIBRUBYARG_STATIC =
44
+
45
+ RUBY_EXTCONF_H =
46
+ cflags =
47
+ optflags =
48
+ debugflags =
49
+ warnflags =
50
+ CFLAGS = -fPIC -ggdb3 -O2 -fPIC
51
+ INCFLAGS = -I. -I. -I/Users/backtype/projects/rubinius/vm/capi/include -I/Users/backtype/projects/fancy/boot/rbx-compiler/parser
52
+ DEFS =
53
+ CPPFLAGS =
54
+ CXXFLAGS = $(CFLAGS)
55
+ ldflags =
56
+ dldflags =
57
+ archflag =
58
+ DLDFLAGS = $(ldflags) $(dldflags) $(archflag)
59
+ LDSHARED = gcc -dynamic -bundle -undefined suppress -flat_namespace
60
+ AR = ar
61
+ EXEEXT =
62
+
63
+ RUBY_INSTALL_NAME = rbx
64
+ RUBY_SO_NAME = rubinius-1.2.3dev
65
+ arch = x86_64-darwin10.5.0
66
+ sitearch = x86_64-darwin10.5.0
67
+ ruby_version = 1.8
68
+ ruby = /Users/backtype/projects/rubinius/bin/rbx
69
+ RUBY = $(ruby)
70
+ RM = rm -f
71
+ MAKEDIRS = mkdir -p
72
+ INSTALL = install -c
73
+ INSTALL_PROG = $(INSTALL) -m 0755
74
+ INSTALL_DATA = $(INSTALL) -m 644
75
+ COPY = cp
76
+
77
+ #### End of system configuration section. ####
78
+
79
+ preload =
80
+
81
+ libpath = . $(libdir)
82
+ LIBPATH = -L. -L$(libdir)
83
+ DEFFILE =
84
+
85
+ CLEANFILES = mkmf.log
86
+ DISTCLEANFILES =
87
+
88
+ extout =
89
+ extout_prefix =
90
+ target_prefix =
91
+ LOCAL_LIBS =
92
+ LIBS = $(LIBRUBYARG_STATIC) -lfl
93
+ SRCS = fancy_parser.c lexer.c parser.c
94
+ OBJS = fancy_parser.o lexer.o parser.o
95
+ TARGET = fancy_parser
96
+ DLLIB = $(TARGET).bundle
97
+ EXTSTATIC =
98
+ STATIC_LIB =
99
+
100
+ BINDIR = $(bindir)
101
+ RUBYCOMMONDIR = $(sitedir)$(target_prefix)
102
+ RUBYLIBDIR = $(sitelibdir)$(target_prefix)
103
+ RUBYARCHDIR = $(sitearchdir)$(target_prefix)
104
+
105
+ TARGET_SO = $(DLLIB)
106
+ CLEANLIBS = $(TARGET).bundle
107
+ CLEANOBJS = *.o *.bak
108
+
109
+ all: $(DLLIB)
110
+ static: $(STATIC_LIB)
111
+ .PHONY: all install static install-so install-rb
112
+ .PHONY: clean clean-so clean-rb
113
+
114
+ clean:
115
+ @-$(RM) $(CLEANLIBS) $(CLEANOBJS) $(CLEANFILES)
116
+
117
+ distclean: clean
118
+ @-$(RM) Makefile $(RUBY_EXTCONF_H) conftest.* mkmf.log
119
+ @-$(RM) core ruby$(EXEEXT) *~ $(DISTCLEANFILES)
120
+
121
+ realclean: distclean
122
+ install: install-so install-rb
123
+
124
+ install-so: $(RUBYARCHDIR)
125
+ install-so: $(RUBYARCHDIR)/$(DLLIB)
126
+ $(RUBYARCHDIR)/$(DLLIB): $(DLLIB)
127
+ $(INSTALL_PROG) $(DLLIB) $(RUBYARCHDIR)
128
+ install-rb: pre-install-rb install-rb-default
129
+ install-rb-default: pre-install-rb-default
130
+ pre-install-rb: Makefile
131
+ pre-install-rb-default: Makefile
132
+ $(RUBYARCHDIR):
133
+ $(MAKEDIRS) $@
134
+
135
+ site-install: site-install-so site-install-rb
136
+ site-install-so: install-so
137
+ site-install-rb: install-rb
138
+
139
+ .SUFFIXES: .c .m .cc .cxx .cpp .C .o
140
+
141
+ .cc.o:
142
+ $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $<
143
+
144
+ .cxx.o:
145
+ $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $<
146
+
147
+ .cpp.o:
148
+ $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $<
149
+
150
+ .C.o:
151
+ $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $<
152
+
153
+ .c.o:
154
+ $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) -c $<
155
+
156
+ $(DLLIB): $(OBJS) Makefile
157
+ @-$(RM) $@
158
+ $(LDSHARED) -o $@ $(OBJS) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
159
+
160
+
161
+
162
+ $(OBJS): ruby.h defines.h
Binary file
data/ruby_lib/fancy.rb CHANGED
@@ -2,24 +2,7 @@ base = File.dirname(__FILE__)
2
2
  require File.expand_path("../boot/fancy_ext", base)
3
3
  require File.expand_path("../boot/load", base)
4
4
 
5
- do_retry = true
6
- begin
7
- Fancy::CodeLoader.load_compiled_file File.expand_path("../lib/boot", base)
8
- rescue RuntimeError => e
9
- # need to bootstrap first time
10
- if e.message =~ /File not found (.*)lib\/boot.fyc/
11
- if do_retry
12
- puts "Fancy hasn't been bootstrapped yet. Doing that now.\n\n"
13
- `cd #{base}/../ && rbx -S rake clean && rbx -S rake`
14
- do_retry = false
15
- retry
16
- else
17
- raise e
18
- end
19
- else
20
- raise e
21
- end
22
- end
5
+ Fancy::CodeLoader.load_compiled_file File.expand_path("../lib/boot", base)
23
6
 
24
7
  # Remove the bootstrapping code loader
25
8
  bcl = Fancy.send :remove_const, :CodeLoader
@@ -32,11 +15,25 @@ Fancy::CodeLoader.push_loadpath File.expand_path("../lib", base)
32
15
  Fancy::CodeLoader.load_compiled_file File.expand_path("../lib/eval", base)
33
16
 
34
17
  class Object
35
- def fy(hash_or_name)
36
- if hash_or_name.is_a? Hash
37
- self.send("#{hash_or_name.keys.join(':')}:", *hash_or_name.values)
18
+ def fancy_message_args name_and_args
19
+ method_name = []
20
+ args = []
21
+ name_and_args.each_with_index do |a, i|
22
+ if i % 2 == 0
23
+ method_name << a
24
+ else
25
+ args << a
26
+ end
27
+ end
28
+ return [method_name.join(":") + ":", args]
29
+ end
30
+
31
+ def fy(*array_or_name)
32
+ if array_or_name.size > 1
33
+ message_name, args = fancy_message_args array_or_name
34
+ self.send(message_name, *args)
38
35
  else
39
- self.send(":#{hash_or_name}")
36
+ self.send(":#{array_or_name}")
40
37
  end
41
38
  end
42
39
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fancy
3
3
  version: !ruby/object:Gem::Version
4
- hash: 17
4
+ hash: 23
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 1
10
- version: 0.3.1
9
+ - 2
10
+ version: 0.3.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Christopher Bertels
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-02-01 00:00:00 -08:00
18
+ date: 2011-03-08 00:00:00 -08:00
19
19
  default_executable:
20
20
  dependencies: []
21
21
 
@@ -153,6 +153,7 @@ files:
153
153
  - lib/parser/ext/ext.c
154
154
  - lib/parser/ext/ext.h
155
155
  - lib/parser/ext/extconf.rb
156
+ - lib/parser/ext/fancy_parser.bundle
156
157
  - lib/parser/ext/lexer.c
157
158
  - lib/parser/ext/lexer.h
158
159
  - lib/parser/ext/lexer.lex
@@ -257,6 +258,7 @@ files:
257
258
  - doc/features.md
258
259
  - boot/code_loader.rb
259
260
  - boot/compile.fy
261
+ - boot/compiler/parser/ext/fancy_parser.bundle
260
262
  - boot/fancy_ext/block_env.rb
261
263
  - boot/fancy_ext/class.rb
262
264
  - boot/fancy_ext/console.rb
@@ -300,6 +302,7 @@ files:
300
302
  - boot/rbx-compiler/parser/lexer.c
301
303
  - boot/rbx-compiler/parser/lexer.h
302
304
  - boot/rbx-compiler/parser/lexer.lex
305
+ - boot/rbx-compiler/parser/Makefile
303
306
  - boot/rbx-compiler/parser/parser.c
304
307
  - boot/rbx-compiler/parser/parser.h
305
308
  - boot/rbx-compiler/parser/parser.rb