fancy 0.9.0 → 0.10.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 (70) hide show
  1. data/bin/fancy +1 -1
  2. data/bin/fspec +1 -1
  3. data/bin/ifancy +1 -0
  4. data/boot/compiler/parser/ext/fancy_parser.bundle +0 -0
  5. data/boot/fancy_ext/array.rb +0 -1
  6. data/boot/fancy_ext/object.rb +10 -0
  7. data/boot/rbx-compiler/parser/Makefile +207 -0
  8. data/boot/rbx-compiler/parser/fancy_parser.bundle +0 -0
  9. data/boot/rbx-compiler/parser/lexer.c +2314 -0
  10. data/boot/rbx-compiler/parser/lexer.h +316 -0
  11. data/boot/rbx-compiler/parser/parser.c +3133 -0
  12. data/boot/rbx-compiler/parser/parser.h +131 -0
  13. data/doc/api/fancy.jsonp +1 -1
  14. data/examples/echo.fy +1 -1
  15. data/examples/stupid_quicksort.fy +1 -1
  16. data/lib/array.fy +4 -0
  17. data/lib/block.fy +11 -8
  18. data/lib/class.fy +21 -0
  19. data/lib/compiler/ast.fy +1 -0
  20. data/lib/compiler/ast/identifier.fy +1 -3
  21. data/lib/compiler/ast/method_spec.fy +6 -0
  22. data/lib/contracts.fy +2 -2
  23. data/lib/documentation.fy +25 -24
  24. data/lib/enumerable.fy +38 -21
  25. data/lib/fancy_spec.fy +24 -17
  26. data/lib/fdoc.fy +32 -16
  27. data/lib/future.fy +26 -1
  28. data/lib/object.fy +4 -1
  29. data/lib/parser/ext/Makefile +207 -0
  30. data/lib/parser/ext/fancy_parser.bundle +0 -0
  31. data/lib/parser/ext/lexer.c +2442 -0
  32. data/lib/parser/ext/lexer.h +316 -0
  33. data/lib/parser/ext/lexer.lex +4 -4
  34. data/lib/parser/ext/parser.c +3400 -0
  35. data/lib/parser/ext/parser.h +135 -0
  36. data/lib/parser/ext/parser.y +52 -74
  37. data/lib/parser/methods.fy +20 -8
  38. data/lib/parser/parse_error.fy +2 -2
  39. data/lib/range.fy +1 -1
  40. data/lib/rbx.fy +1 -0
  41. data/lib/rbx/block.fy +0 -12
  42. data/lib/rbx/class.fy +1 -1
  43. data/lib/rbx/compiled_method.fy +4 -0
  44. data/lib/{eval.fy → rbx/eval.fy} +3 -3
  45. data/lib/rbx/hash.fy +13 -3
  46. data/lib/rbx/method.fy +1 -0
  47. data/lib/rbx/object.fy +5 -1
  48. data/lib/rbx/range.fy +1 -1
  49. data/lib/rbx/scopes.fy +15 -0
  50. data/lib/rbx/symbol.fy +4 -0
  51. data/lib/rbx/thread.fy +1 -1
  52. data/lib/set.fy +11 -0
  53. data/lib/string.fy +17 -17
  54. data/lib/symbol.fy +7 -3
  55. data/lib/tuple.fy +3 -8
  56. data/lib/version.fy +1 -1
  57. data/ruby_lib/fancy +1 -1
  58. data/ruby_lib/fancy.rb +6 -19
  59. data/ruby_lib/interactive/hilight.rb +5 -5
  60. data/tests/block.fy +36 -13
  61. data/tests/class.fy +124 -120
  62. data/tests/contracts.fy +9 -8
  63. data/tests/future.fy +29 -10
  64. data/tests/method.fy +5 -0
  65. data/tests/range.fy +8 -0
  66. data/tests/set.fy +16 -6
  67. data/tests/struct.fy +4 -4
  68. metadata +60 -55
  69. data/lib/queue.fy +0 -7
  70. data/tests/future_proxy.fy +0 -8
data/bin/fancy CHANGED
@@ -25,7 +25,7 @@ begin
25
25
  Fancy::CodeLoader.push_loadpath File.expand_path("../lib", base)
26
26
 
27
27
  # Load compiler+eval support
28
- Fancy::CodeLoader.load_compiled_file File.expand_path("../lib/eval", base)
28
+ Fancy::CodeLoader.load_compiled_file File.expand_path("../lib/rbx/eval", base)
29
29
 
30
30
  # Run main
31
31
  Fancy::CodeLoader.load_compiled_file File.expand_path("../lib/main", base)
data/bin/fspec CHANGED
@@ -17,7 +17,7 @@ if: (test_files empty?) then: {
17
17
  test_files = Directory list: "#{test_dir}/**/*.fy"
18
18
  if: (test_files empty?) then: {
19
19
  if: (Directory exists?: test_dir) then: {
20
- "No test files found. Add them to the tests/ directory." println
20
+ "No test files found. Add them to '#{test_dir}'." println
21
21
  } else: {
22
22
  "Test directory '#{test_dir}' not found. Create it!" println
23
23
  }
data/bin/ifancy CHANGED
@@ -86,6 +86,7 @@ class Feature {
86
86
  @@hooks values sort_by: 'name . each: block
87
87
  }
88
88
 
89
+ metaclass provides_interface: 'each:
89
90
  extend: Fancy Enumerable
90
91
  }
91
92
 
@@ -7,7 +7,6 @@ class Array
7
7
  # definition, this fails. To make it work, we define these. Kinda
8
8
  # stupid, i know, but oh well. Maybe need to fix this in the future.
9
9
  def public
10
- puts self.inspect
11
10
  Rubinius::VariableScope.of_sender.method_visibility = nil
12
11
  end
13
12
  def private
@@ -22,6 +22,10 @@ class Object
22
22
  define_method("require:") do |path|
23
23
  Fancy::CodeLoader.send "require:", path
24
24
  end
25
+
26
+ def to_a
27
+ [self]
28
+ end
25
29
  end
26
30
 
27
31
  class Fancy
@@ -31,3 +35,9 @@ class Fancy
31
35
  end
32
36
  end
33
37
  end
38
+
39
+ class BasicObject
40
+ def method_missing(meth, *args)
41
+ ::Kernel.raise ::NoMethodError, "Unable to send '#{meth}' to instance of #{self.class}"
42
+ end
43
+ end
@@ -0,0 +1,207 @@
1
+
2
+ SHELL = /bin/sh
3
+
4
+ # V=0 quiet, V=1 verbose. other values don't work.
5
+ V = 0
6
+ Q1 = $(V:1=)
7
+ Q = $(Q1:0=@)
8
+ n=$(NULLCMD)
9
+ ECHO1 = $(V:1=@$n)
10
+ ECHO = $(ECHO1:0=@echo)
11
+
12
+ #### Start of system configuration section. ####
13
+
14
+ srcdir = /Users/bakkdoor/projects/fancy/fancy/boot/rbx-compiler/parser
15
+ topdir = /Users/bakkdoor/projects/ruby/rubinius/vm/capi/19/include
16
+ hdrdir = /Users/bakkdoor/projects/ruby/rubinius/vm/capi/19/include
17
+ arch_hdrdir = /Users/bakkdoor/projects/ruby/rubinius/vm/capi/19/include
18
+ VPATH = $(srcdir):$(arch_hdrdir)/ruby:$(hdrdir)/ruby
19
+ prefix = $(DESTDIR)/Users/bakkdoor/projects/ruby/rubinius
20
+ install_prefix = $(DESTDIR)
21
+ exec_prefix = $(prefix)
22
+ bindir = $(DESTDIR)/Users/bakkdoor/projects/ruby/rubinius/bin
23
+ sbindir = $(exec_prefix)/sbin
24
+ libexecdir = $(exec_prefix)/libexec
25
+ datarootdir = $(prefix)/share
26
+ datadir = $(datarootdir)
27
+ sysconfdir = $(prefix)/etc
28
+ sharedstatedir = $(prefix)/com
29
+ localstatedir = $(prefix)/var
30
+ includedir = $(prefix)/include
31
+ oldincludedir = $(DESTDIR)/usr/include
32
+ docdir = $(datarootdir)/doc/$(PACKAGE)
33
+ infodir = $(datarootdir)/info
34
+ htmldir = $(docdir)
35
+ dvidir = $(docdir)
36
+ pdfdir = $(docdir)
37
+ psdir = $(docdir)
38
+ libdir = $(exec_prefix)/lib
39
+ localedir = $(datarootdir)/locale
40
+ mandir = $(datarootdir)/man
41
+ rubyhdrdir = $(DESTDIR)/Users/bakkdoor/projects/ruby/rubinius/vm/capi/19/include
42
+ sitedir = $(DESTDIR)/Users/bakkdoor/projects/ruby/rubinius/site
43
+ sitelibdir = $(DESTDIR)/Users/bakkdoor/projects/ruby/rubinius/site
44
+ rubylibdir = $(DESTDIR)/Users/bakkdoor/projects/ruby/rubinius/site
45
+ archdir = $(DESTDIR)/Users/bakkdoor/projects/ruby/rubinius/site/x86_64-darwin12.4.0
46
+ sitearchdir = $(DESTDIR)/Users/bakkdoor/projects/ruby/rubinius/site/x86_64-darwin12.4.0
47
+
48
+ NULLCMD =
49
+
50
+ CC = gcc
51
+ CXX = g++
52
+ LIBRUBY = $(LIBRUBY_SO)
53
+ LIBRUBY_A =
54
+ LIBRUBYARG_SHARED =
55
+ LIBRUBYARG_STATIC =
56
+ OUTFLAG = -o
57
+ COUTFLAG = -o
58
+
59
+ RUBY_EXTCONF_H =
60
+ cflags =
61
+ optflags =
62
+ debugflags =
63
+ warnflags =
64
+ CFLAGS = -g -O2 -I/usr/local/include -fPIC -D_DARWIN_USE_64_BIT_INODE
65
+ INCFLAGS = -I. -I$(arch_hdrdir) -I$(hdrdir)/ruby/backward -I$(hdrdir) -I$(srcdir) -I/usr/local/include
66
+ DEFS =
67
+ CPPFLAGS =
68
+ CXXFLAGS = $(CFLAGS) -g -O2
69
+ ldflags = -L/usr/local/lib
70
+ dldflags =
71
+ ARCH_FLAG =
72
+ DLDFLAGS = $(ldflags) $(dldflags)
73
+ LDSHARED = gcc -bundle -undefined suppress -flat_namespace
74
+ LDSHAREDXX = g++ -bundle -undefined suppress -flat_namespace -lstdc++
75
+ AR = ar
76
+ EXEEXT =
77
+
78
+ RUBY_BASE_NAME =
79
+ RUBY_INSTALL_NAME = rbx
80
+ RUBY_SO_NAME = rubinius-2.0.0.rc1
81
+ arch = x86_64-darwin12.4.0
82
+ sitearch = x86_64-darwin12.4.0
83
+ ruby_version = 1.9
84
+ ruby = /Users/bakkdoor/projects/ruby/rubinius/bin/rbx
85
+ RUBY = $(ruby)
86
+ RM = rm -f
87
+ RM_RF = $(RUBY) -run -e rm -- -rf
88
+ RMDIRS = $(RUBY) -run -e rmdir -- -p
89
+ MAKEDIRS = mkdir -p
90
+ INSTALL = install -c
91
+ INSTALL_PROG = $(INSTALL) -m 0755
92
+ INSTALL_DATA = $(INSTALL) -m 644
93
+ COPY = cp
94
+
95
+ #### End of system configuration section. ####
96
+
97
+ preload =
98
+
99
+ libpath = . $(libdir) /usr/local/lib
100
+ LIBPATH = -L. -L$(libdir) -L/usr/local/lib
101
+ DEFFILE =
102
+
103
+ CLEANFILES = mkmf.log
104
+ DISTCLEANFILES =
105
+ DISTCLEANDIRS =
106
+
107
+ extout =
108
+ extout_prefix =
109
+ target_prefix =
110
+ LOCAL_LIBS =
111
+ LIBS = $(LIBRUBYARG_STATIC) -lfl
112
+ SRCS = fancy_parser.c lexer.c parser.c
113
+ OBJS = fancy_parser.o lexer.o parser.o
114
+ TARGET = fancy_parser
115
+ DLLIB = $(TARGET).bundle
116
+ EXTSTATIC =
117
+ STATIC_LIB =
118
+
119
+ BINDIR = $(bindir)
120
+ RUBYCOMMONDIR = $(sitedir)$(target_prefix)
121
+ RUBYLIBDIR = $(sitelibdir)$(target_prefix)
122
+ RUBYARCHDIR = $(sitearchdir)$(target_prefix)
123
+ HDRDIR = $(rubyhdrdir)/ruby$(target_prefix)
124
+ ARCHHDRDIR = $(rubyhdrdir)/$(arch)/ruby$(target_prefix)
125
+
126
+ TARGET_SO = $(DLLIB)
127
+ CLEANLIBS = $(TARGET).bundle
128
+ CLEANOBJS = *.o *.bak
129
+
130
+ all: $(DLLIB)
131
+ static: $(STATIC_LIB)
132
+ .PHONY: all install static install-so install-rb
133
+ .PHONY: clean clean-so clean-rb
134
+
135
+ clean-rb-default::
136
+ clean-rb::
137
+ clean-so::
138
+ clean: clean-so clean-rb-default clean-rb
139
+ @-$(RM) $(CLEANLIBS) $(CLEANOBJS) $(CLEANFILES)
140
+
141
+ distclean-rb-default::
142
+ distclean-rb::
143
+ distclean-so::
144
+ distclean: clean distclean-so distclean-rb-default distclean-rb
145
+ @-$(RM) Makefile $(RUBY_EXTCONF_H) conftest.* mkmf.log
146
+ @-$(RM) core ruby$(EXEEXT) *~ $(DISTCLEANFILES)
147
+ @-$(RMDIRS) $(DISTCLEANDIRS) 2> /dev/null || true
148
+
149
+ realclean: distclean
150
+ install: install-so install-rb
151
+
152
+ install-so: $(RUBYARCHDIR)
153
+ install-so: $(RUBYARCHDIR)/$(DLLIB)
154
+ $(RUBYARCHDIR)/$(DLLIB): $(DLLIB)
155
+ @-$(MAKEDIRS) $(@D)
156
+ $(INSTALL_PROG) $(DLLIB) $(@D)
157
+ install-rb: pre-install-rb install-rb-default
158
+ install-rb-default: pre-install-rb-default
159
+ pre-install-rb: Makefile
160
+ pre-install-rb-default: Makefile
161
+ pre-install-rb-default:
162
+ $(ECHO) installing default fancy_parser libraries
163
+ $(RUBYARCHDIR):
164
+ $(Q) $(MAKEDIRS) $@
165
+
166
+ site-install: site-install-so site-install-rb
167
+ site-install-so: install-so
168
+ site-install-rb: install-rb
169
+
170
+ .SUFFIXES: .c .m .cc .mm .cxx .cpp .C .o
171
+
172
+ .cc.o:
173
+ $(ECHO) compiling $(<)
174
+ $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $<
175
+
176
+ .mm.o:
177
+ $(ECHO) compiling $(<)
178
+ $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $<
179
+
180
+ .cxx.o:
181
+ $(ECHO) compiling $(<)
182
+ $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $<
183
+
184
+ .cpp.o:
185
+ $(ECHO) compiling $(<)
186
+ $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $<
187
+
188
+ .C.o:
189
+ $(ECHO) compiling $(<)
190
+ $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $<
191
+
192
+ .c.o:
193
+ $(ECHO) compiling $(<)
194
+ $(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -c $<
195
+
196
+ .m.o:
197
+ $(ECHO) compiling $(<)
198
+ $(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -c $<
199
+
200
+ $(DLLIB): $(OBJS) Makefile
201
+ $(ECHO) linking shared-object $(DLLIB)
202
+ @-$(RM) $(@)
203
+ $(Q) $(LDSHARED) -o $@ $(OBJS) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
204
+
205
+
206
+
207
+ $(OBJS): $(hdrdir)/ruby.h $(hdrdir)/ruby/defines.h $(arch_hdrdir)/ruby/config.h
@@ -0,0 +1,2314 @@
1
+ #line 2 "/Users/bakkdoor/projects/fancy/fancy/boot/rbx-compiler/parser/lexer.c"
2
+
3
+ #line 4 "/Users/bakkdoor/projects/fancy/fancy/boot/rbx-compiler/parser/lexer.c"
4
+
5
+ #define YY_INT_ALIGNED short int
6
+
7
+ /* A lexical scanner generated by flex */
8
+
9
+ #define FLEX_SCANNER
10
+ #define YY_FLEX_MAJOR_VERSION 2
11
+ #define YY_FLEX_MINOR_VERSION 5
12
+ #define YY_FLEX_SUBMINOR_VERSION 37
13
+ #if YY_FLEX_SUBMINOR_VERSION > 0
14
+ #define FLEX_BETA
15
+ #endif
16
+
17
+ /* First, we deal with platform-specific or compiler-specific issues. */
18
+
19
+ /* begin standard C headers. */
20
+ #include <stdio.h>
21
+ #include <string.h>
22
+ #include <errno.h>
23
+ #include <stdlib.h>
24
+
25
+ /* end standard C headers. */
26
+
27
+ /* flex integer type definitions */
28
+
29
+ #ifndef FLEXINT_H
30
+ #define FLEXINT_H
31
+
32
+ /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
33
+
34
+ #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
35
+
36
+ /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
37
+ * if you want the limit (max/min) macros for int types.
38
+ */
39
+ #ifndef __STDC_LIMIT_MACROS
40
+ #define __STDC_LIMIT_MACROS 1
41
+ #endif
42
+
43
+ #include <inttypes.h>
44
+ typedef int8_t flex_int8_t;
45
+ typedef uint8_t flex_uint8_t;
46
+ typedef int16_t flex_int16_t;
47
+ typedef uint16_t flex_uint16_t;
48
+ typedef int32_t flex_int32_t;
49
+ typedef uint32_t flex_uint32_t;
50
+ #else
51
+ typedef signed char flex_int8_t;
52
+ typedef short int flex_int16_t;
53
+ typedef int flex_int32_t;
54
+ typedef unsigned char flex_uint8_t;
55
+ typedef unsigned short int flex_uint16_t;
56
+ typedef unsigned int flex_uint32_t;
57
+
58
+ /* Limits of integral types. */
59
+ #ifndef INT8_MIN
60
+ #define INT8_MIN (-128)
61
+ #endif
62
+ #ifndef INT16_MIN
63
+ #define INT16_MIN (-32767-1)
64
+ #endif
65
+ #ifndef INT32_MIN
66
+ #define INT32_MIN (-2147483647-1)
67
+ #endif
68
+ #ifndef INT8_MAX
69
+ #define INT8_MAX (127)
70
+ #endif
71
+ #ifndef INT16_MAX
72
+ #define INT16_MAX (32767)
73
+ #endif
74
+ #ifndef INT32_MAX
75
+ #define INT32_MAX (2147483647)
76
+ #endif
77
+ #ifndef UINT8_MAX
78
+ #define UINT8_MAX (255U)
79
+ #endif
80
+ #ifndef UINT16_MAX
81
+ #define UINT16_MAX (65535U)
82
+ #endif
83
+ #ifndef UINT32_MAX
84
+ #define UINT32_MAX (4294967295U)
85
+ #endif
86
+
87
+ #endif /* ! C99 */
88
+
89
+ #endif /* ! FLEXINT_H */
90
+
91
+ #ifdef __cplusplus
92
+
93
+ /* The "const" storage-class-modifier is valid. */
94
+ #define YY_USE_CONST
95
+
96
+ #else /* ! __cplusplus */
97
+
98
+ /* C99 requires __STDC__ to be defined as 1. */
99
+ #if defined (__STDC__)
100
+
101
+ #define YY_USE_CONST
102
+
103
+ #endif /* defined (__STDC__) */
104
+ #endif /* ! __cplusplus */
105
+
106
+ #ifdef YY_USE_CONST
107
+ #define yyconst const
108
+ #else
109
+ #define yyconst
110
+ #endif
111
+
112
+ /* Returned upon end-of-file. */
113
+ #define YY_NULL 0
114
+
115
+ /* Promotes a possibly negative, possibly signed char to an unsigned
116
+ * integer for use as an array index. If the signed char is negative,
117
+ * we want to instead treat it as an 8-bit unsigned char, hence the
118
+ * double cast.
119
+ */
120
+ #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
121
+
122
+ /* Enter a start condition. This macro really ought to take a parameter,
123
+ * but we do it the disgusting crufty way forced on us by the ()-less
124
+ * definition of BEGIN.
125
+ */
126
+ #define BEGIN (yy_start) = 1 + 2 *
127
+
128
+ /* Translate the current start state into a value that can be later handed
129
+ * to BEGIN to return to the state. The YYSTATE alias is for lex
130
+ * compatibility.
131
+ */
132
+ #define YY_START (((yy_start) - 1) / 2)
133
+ #define YYSTATE YY_START
134
+
135
+ /* Action number for EOF rule of a given start state. */
136
+ #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
137
+
138
+ /* Special action meaning "start processing a new file". */
139
+ #define YY_NEW_FILE yyrestart(yyin )
140
+
141
+ #define YY_END_OF_BUFFER_CHAR 0
142
+
143
+ /* Size of default input buffer. */
144
+ #ifndef YY_BUF_SIZE
145
+ #define YY_BUF_SIZE 16384
146
+ #endif
147
+
148
+ /* The state buf must be large enough to hold one state per character in the main buffer.
149
+ */
150
+ #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
151
+
152
+ #ifndef YY_TYPEDEF_YY_BUFFER_STATE
153
+ #define YY_TYPEDEF_YY_BUFFER_STATE
154
+ typedef struct yy_buffer_state *YY_BUFFER_STATE;
155
+ #endif
156
+
157
+ #ifndef YY_TYPEDEF_YY_SIZE_T
158
+ #define YY_TYPEDEF_YY_SIZE_T
159
+ typedef size_t yy_size_t;
160
+ #endif
161
+
162
+ extern yy_size_t yyleng;
163
+
164
+ extern FILE *yyin, *yyout;
165
+
166
+ #define EOB_ACT_CONTINUE_SCAN 0
167
+ #define EOB_ACT_END_OF_FILE 1
168
+ #define EOB_ACT_LAST_MATCH 2
169
+
170
+ /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires
171
+ * access to the local variable yy_act. Since yyless() is a macro, it would break
172
+ * existing scanners that call yyless() from OUTSIDE yylex.
173
+ * One obvious solution it to make yy_act a global. I tried that, and saw
174
+ * a 5% performance hit in a non-yylineno scanner, because yy_act is
175
+ * normally declared as a register variable-- so it is not worth it.
176
+ */
177
+ #define YY_LESS_LINENO(n) \
178
+ do { \
179
+ int yyl;\
180
+ for ( yyl = n; yyl < yyleng; ++yyl )\
181
+ if ( yytext[yyl] == '\n' )\
182
+ --yylineno;\
183
+ }while(0)
184
+
185
+ /* Return all but the first "n" matched characters back to the input stream. */
186
+ #define yyless(n) \
187
+ do \
188
+ { \
189
+ /* Undo effects of setting up yytext. */ \
190
+ int yyless_macro_arg = (n); \
191
+ YY_LESS_LINENO(yyless_macro_arg);\
192
+ *yy_cp = (yy_hold_char); \
193
+ YY_RESTORE_YY_MORE_OFFSET \
194
+ (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
195
+ YY_DO_BEFORE_ACTION; /* set up yytext again */ \
196
+ } \
197
+ while ( 0 )
198
+
199
+ #define unput(c) yyunput( c, (yytext_ptr) )
200
+
201
+ #ifndef YY_STRUCT_YY_BUFFER_STATE
202
+ #define YY_STRUCT_YY_BUFFER_STATE
203
+ struct yy_buffer_state
204
+ {
205
+ FILE *yy_input_file;
206
+
207
+ char *yy_ch_buf; /* input buffer */
208
+ char *yy_buf_pos; /* current position in input buffer */
209
+
210
+ /* Size of input buffer in bytes, not including room for EOB
211
+ * characters.
212
+ */
213
+ yy_size_t yy_buf_size;
214
+
215
+ /* Number of characters read into yy_ch_buf, not including EOB
216
+ * characters.
217
+ */
218
+ yy_size_t yy_n_chars;
219
+
220
+ /* Whether we "own" the buffer - i.e., we know we created it,
221
+ * and can realloc() it to grow it, and should free() it to
222
+ * delete it.
223
+ */
224
+ int yy_is_our_buffer;
225
+
226
+ /* Whether this is an "interactive" input source; if so, and
227
+ * if we're using stdio for input, then we want to use getc()
228
+ * instead of fread(), to make sure we stop fetching input after
229
+ * each newline.
230
+ */
231
+ int yy_is_interactive;
232
+
233
+ /* Whether we're considered to be at the beginning of a line.
234
+ * If so, '^' rules will be active on the next match, otherwise
235
+ * not.
236
+ */
237
+ int yy_at_bol;
238
+
239
+ int yy_bs_lineno; /**< The line count. */
240
+ int yy_bs_column; /**< The column count. */
241
+
242
+ /* Whether to try to fill the input buffer when we reach the
243
+ * end of it.
244
+ */
245
+ int yy_fill_buffer;
246
+
247
+ int yy_buffer_status;
248
+
249
+ #define YY_BUFFER_NEW 0
250
+ #define YY_BUFFER_NORMAL 1
251
+ /* When an EOF's been seen but there's still some text to process
252
+ * then we mark the buffer as YY_EOF_PENDING, to indicate that we
253
+ * shouldn't try reading from the input source any more. We might
254
+ * still have a bunch of tokens to match, though, because of
255
+ * possible backing-up.
256
+ *
257
+ * When we actually see the EOF, we change the status to "new"
258
+ * (via yyrestart()), so that the user can continue scanning by
259
+ * just pointing yyin at a new input file.
260
+ */
261
+ #define YY_BUFFER_EOF_PENDING 2
262
+
263
+ };
264
+ #endif /* !YY_STRUCT_YY_BUFFER_STATE */
265
+
266
+ /* Stack of input buffers. */
267
+ static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
268
+ static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
269
+ static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
270
+
271
+ /* We provide macros for accessing buffer states in case in the
272
+ * future we want to put the buffer states in a more general
273
+ * "scanner state".
274
+ *
275
+ * Returns the top of the stack, or NULL.
276
+ */
277
+ #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
278
+ ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
279
+ : NULL)
280
+
281
+ /* Same as previous macro, but useful when we know that the buffer stack is not
282
+ * NULL or when we need an lvalue. For internal use only.
283
+ */
284
+ #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
285
+
286
+ /* yy_hold_char holds the character lost when yytext is formed. */
287
+ static char yy_hold_char;
288
+ static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */
289
+ yy_size_t yyleng;
290
+
291
+ /* Points to current character in buffer. */
292
+ static char *yy_c_buf_p = (char *) 0;
293
+ static int yy_init = 0; /* whether we need to initialize */
294
+ static int yy_start = 0; /* start state number */
295
+
296
+ /* Flag which is used to allow yywrap()'s to do buffer switches
297
+ * instead of setting up a fresh yyin. A bit of a hack ...
298
+ */
299
+ static int yy_did_buffer_switch_on_eof;
300
+
301
+ void yyrestart (FILE *input_file );
302
+ void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer );
303
+ YY_BUFFER_STATE yy_create_buffer (FILE *file,int size );
304
+ void yy_delete_buffer (YY_BUFFER_STATE b );
305
+ void yy_flush_buffer (YY_BUFFER_STATE b );
306
+ void yypush_buffer_state (YY_BUFFER_STATE new_buffer );
307
+ void yypop_buffer_state (void );
308
+
309
+ static void yyensure_buffer_stack (void );
310
+ static void yy_load_buffer_state (void );
311
+ static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file );
312
+
313
+ #define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
314
+
315
+ YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size );
316
+ YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str );
317
+ YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,yy_size_t len );
318
+
319
+ void *yyalloc (yy_size_t );
320
+ void *yyrealloc (void *,yy_size_t );
321
+ void yyfree (void * );
322
+
323
+ #define yy_new_buffer yy_create_buffer
324
+
325
+ #define yy_set_interactive(is_interactive) \
326
+ { \
327
+ if ( ! YY_CURRENT_BUFFER ){ \
328
+ yyensure_buffer_stack (); \
329
+ YY_CURRENT_BUFFER_LVALUE = \
330
+ yy_create_buffer(yyin,YY_BUF_SIZE ); \
331
+ } \
332
+ YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
333
+ }
334
+
335
+ #define yy_set_bol(at_bol) \
336
+ { \
337
+ if ( ! YY_CURRENT_BUFFER ){\
338
+ yyensure_buffer_stack (); \
339
+ YY_CURRENT_BUFFER_LVALUE = \
340
+ yy_create_buffer(yyin,YY_BUF_SIZE ); \
341
+ } \
342
+ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
343
+ }
344
+
345
+ #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
346
+
347
+ typedef unsigned char YY_CHAR;
348
+
349
+ FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
350
+
351
+ typedef int yy_state_type;
352
+
353
+ extern int yylineno;
354
+
355
+ int yylineno = 1;
356
+
357
+ extern char *yytext;
358
+ #define yytext_ptr yytext
359
+
360
+ static yy_state_type yy_get_previous_state (void );
361
+ static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
362
+ static int yy_get_next_buffer (void );
363
+ static void yy_fatal_error (yyconst char msg[] );
364
+
365
+ /* Done after the current pattern has been matched and before the
366
+ * corresponding action - sets up yytext.
367
+ */
368
+ #define YY_DO_BEFORE_ACTION \
369
+ (yytext_ptr) = yy_bp; \
370
+ yyleng = (size_t) (yy_cp - yy_bp); \
371
+ (yy_hold_char) = *yy_cp; \
372
+ *yy_cp = '\0'; \
373
+ (yy_c_buf_p) = yy_cp;
374
+
375
+ #define YY_NUM_RULES 51
376
+ #define YY_END_OF_BUFFER 52
377
+ /* This struct is not used in this scanner,
378
+ but its presence is necessary. */
379
+ struct yy_trans_info
380
+ {
381
+ flex_int32_t yy_verify;
382
+ flex_int32_t yy_nxt;
383
+ };
384
+ static yyconst flex_int16_t yy_accept[182] =
385
+ { 0,
386
+ 47, 47, 52, 50, 47, 49, 47, 23, 50, 46,
387
+ 45, 23, 50, 10, 11, 23, 41, 23, 44, 23,
388
+ 6, 6, 43, 42, 23, 22, 50, 37, 37, 15,
389
+ 50, 16, 34, 34, 34, 34, 34, 34, 34, 34,
390
+ 13, 19, 14, 47, 0, 23, 36, 0, 8, 0,
391
+ 46, 23, 35, 34, 34, 0, 39, 39, 39, 0,
392
+ 39, 0, 39, 39, 6, 21, 0, 23, 36, 23,
393
+ 0, 6, 0, 0, 0, 0, 17, 20, 34, 0,
394
+ 12, 37, 35, 37, 0, 0, 0, 48, 18, 34,
395
+ 34, 34, 34, 34, 34, 34, 34, 34, 23, 23,
396
+
397
+ 8, 0, 0, 39, 39, 39, 39, 39, 39, 0,
398
+ 39, 39, 39, 39, 39, 39, 39, 40, 7, 5,
399
+ 4, 3, 0, 34, 34, 34, 2, 34, 34, 34,
400
+ 34, 34, 26, 23, 0, 0, 0, 39, 39, 39,
401
+ 39, 39, 39, 39, 39, 39, 39, 38, 33, 34,
402
+ 34, 34, 34, 34, 34, 31, 34, 0, 39, 39,
403
+ 39, 38, 38, 27, 1, 34, 32, 29, 34, 30,
404
+ 9, 34, 25, 28, 34, 34, 34, 34, 34, 24,
405
+ 0
406
+ } ;
407
+
408
+ static yyconst flex_int32_t yy_ec[256] =
409
+ { 0,
410
+ 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
411
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
412
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
413
+ 1, 4, 5, 6, 7, 8, 5, 9, 10, 11,
414
+ 12, 9, 13, 14, 15, 16, 17, 18, 19, 20,
415
+ 20, 20, 20, 20, 20, 21, 21, 22, 23, 24,
416
+ 25, 26, 5, 27, 28, 29, 28, 28, 28, 28,
417
+ 30, 30, 30, 30, 30, 31, 30, 30, 32, 30,
418
+ 30, 30, 30, 30, 30, 30, 30, 33, 30, 30,
419
+ 34, 35, 36, 5, 37, 1, 38, 39, 40, 41,
420
+
421
+ 42, 43, 44, 45, 46, 44, 44, 47, 48, 49,
422
+ 50, 51, 44, 52, 53, 54, 55, 44, 44, 56,
423
+ 57, 44, 58, 59, 60, 5, 1, 1, 1, 1,
424
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
425
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
426
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
427
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
428
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
429
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
430
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
431
+
432
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
433
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
434
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
435
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
436
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
437
+ 1, 1, 1, 1, 1
438
+ } ;
439
+
440
+ static yyconst flex_int32_t yy_meta[61] =
441
+ { 0,
442
+ 1, 1, 2, 1, 3, 1, 1, 1, 4, 1,
443
+ 5, 1, 3, 1, 3, 1, 3, 6, 6, 6,
444
+ 6, 7, 1, 3, 3, 3, 8, 6, 6, 9,
445
+ 9, 9, 9, 1, 1, 1, 10, 11, 11, 11,
446
+ 11, 11, 11, 12, 12, 12, 12, 12, 12, 12,
447
+ 12, 12, 12, 12, 12, 12, 12, 13, 1, 1
448
+ } ;
449
+
450
+ static yyconst flex_int16_t yy_base[195] =
451
+ { 0,
452
+ 0, 0, 355, 769, 59, 769, 60, 342, 59, 0,
453
+ 769, 115, 149, 769, 769, 55, 769, 326, 769, 72,
454
+ 193, 51, 769, 769, 57, 67, 52, 245, 278, 769,
455
+ 348, 321, 311, 48, 304, 299, 306, 301, 48, 290,
456
+ 769, 282, 769, 78, 336, 328, 769, 78, 332, 331,
457
+ 0, 112, 769, 0, 0, 274, 0, 345, 0, 305,
458
+ 401, 295, 0, 271, 126, 318, 310, 222, 308, 248,
459
+ 81, 199, 86, 88, 0, 130, 769, 312, 0, 85,
460
+ 769, 315, 769, 313, 295, 125, 311, 769, 769, 61,
461
+ 275, 269, 262, 256, 255, 261, 250, 242, 286, 281,
462
+
463
+ 769, 149, 284, 0, 0, 0, 457, 0, 0, 258,
464
+ 0, 0, 0, 0, 0, 0, 512, 264, 149, 115,
465
+ 222, 0, 247, 226, 226, 211, 0, 217, 212, 104,
466
+ 208, 202, 0, 227, 210, 228, 226, 0, 0, 0,
467
+ 0, 0, 0, 0, 169, 281, 0, 567, 0, 179,
468
+ 170, 174, 165, 150, 133, 0, 120, 159, 0, 0,
469
+ 0, 600, 0, 0, 0, 114, 0, 0, 108, 0,
470
+ 769, 78, 85, 0, 71, 66, 71, 71, 45, 0,
471
+ 769, 635, 640, 653, 664, 676, 686, 697, 709, 719,
472
+ 726, 735, 745, 756
473
+
474
+ } ;
475
+
476
+ static yyconst flex_int16_t yy_def[195] =
477
+ { 0,
478
+ 181, 1, 181, 181, 181, 181, 181, 182, 183, 184,
479
+ 181, 185, 181, 181, 181, 182, 181, 16, 181, 186,
480
+ 181, 181, 181, 181, 182, 182, 187, 188, 188, 181,
481
+ 189, 181, 185, 33, 33, 33, 33, 33, 33, 33,
482
+ 181, 181, 181, 181, 181, 182, 181, 183, 181, 183,
483
+ 184, 33, 181, 33, 33, 181, 13, 181, 13, 190,
484
+ 181, 181, 58, 13, 181, 182, 186, 186, 186, 186,
485
+ 181, 181, 181, 181, 191, 181, 181, 182, 33, 187,
486
+ 181, 29, 181, 29, 181, 183, 189, 181, 181, 33,
487
+ 33, 33, 33, 33, 33, 33, 33, 33, 192, 181,
488
+
489
+ 181, 193, 181, 58, 58, 58, 181, 58, 58, 190,
490
+ 61, 107, 61, 61, 107, 107, 13, 186, 181, 181,
491
+ 181, 191, 181, 33, 33, 33, 33, 33, 33, 33,
492
+ 33, 33, 33, 192, 193, 181, 193, 13, 107, 107,
493
+ 107, 107, 107, 107, 117, 58, 146, 194, 33, 33,
494
+ 33, 33, 33, 33, 33, 33, 33, 181, 146, 146,
495
+ 146, 194, 162, 33, 33, 33, 33, 33, 33, 33,
496
+ 181, 33, 33, 33, 33, 33, 33, 33, 33, 33,
497
+ 0, 181, 181, 181, 181, 181, 181, 181, 181, 181,
498
+ 181, 181, 181, 181
499
+
500
+ } ;
501
+
502
+ static yyconst flex_int16_t yy_nxt[830] =
503
+ { 0,
504
+ 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
505
+ 14, 15, 16, 17, 18, 19, 20, 21, 22, 22,
506
+ 22, 23, 24, 25, 26, 8, 27, 28, 28, 28,
507
+ 29, 28, 28, 30, 31, 32, 33, 33, 33, 34,
508
+ 35, 33, 36, 33, 33, 33, 33, 37, 33, 33,
509
+ 33, 38, 39, 40, 33, 33, 33, 41, 42, 43,
510
+ 44, 44, 44, 44, 49, 47, 71, 47, 72, 72,
511
+ 72, 72, 65, 65, 65, 65, 68, 47, 80, 44,
512
+ 68, 44, 69, 101, 68, 90, 68, 76, 70, 96,
513
+ 77, 180, 78, 50, 91, 68, 68, 68, 119, 119,
514
+
515
+ 119, 119, 97, 120, 120, 121, 121, 121, 179, 81,
516
+ 178, 181, 50, 124, 125, 177, 52, 176, 45, 52,
517
+ 52, 175, 53, 52, 52, 53, 52, 52, 52, 52,
518
+ 49, 52, 120, 120, 174, 52, 52, 52, 52, 52,
519
+ 52, 71, 181, 72, 72, 72, 72, 72, 72, 72,
520
+ 72, 55, 56, 57, 136, 154, 173, 58, 155, 50,
521
+ 172, 57, 76, 57, 171, 57, 119, 119, 119, 119,
522
+ 59, 170, 57, 57, 57, 60, 61, 61, 61, 61,
523
+ 61, 61, 62, 137, 169, 63, 63, 63, 63, 63,
524
+ 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
525
+
526
+ 63, 63, 63, 63, 63, 63, 168, 64, 71, 167,
527
+ 72, 72, 72, 72, 71, 136, 72, 72, 72, 72,
528
+ 166, 73, 165, 164, 74, 75, 68, 64, 181, 76,
529
+ 68, 73, 69, 158, 68, 76, 68, 47, 70, 121,
530
+ 121, 121, 74, 157, 137, 68, 68, 68, 75, 82,
531
+ 156, 153, 68, 82, 152, 83, 68, 82, 69, 82,
532
+ 68, 82, 68, 151, 70, 150, 85, 149, 82, 82,
533
+ 82, 68, 68, 68, 148, 148, 148, 148, 148, 148,
534
+ 118, 82, 82, 86, 181, 159, 82, 138, 83, 160,
535
+ 82, 47, 82, 159, 82, 159, 47, 159, 133, 85,
536
+
537
+ 132, 82, 82, 82, 159, 159, 159, 131, 130, 129,
538
+ 128, 127, 126, 88, 82, 55, 123, 161, 181, 55,
539
+ 181, 83, 47, 55, 118, 55, 118, 55, 47, 117,
540
+ 59, 110, 103, 181, 55, 55, 55, 102, 47, 100,
541
+ 99, 98, 95, 94, 93, 92, 89, 55, 56, 104,
542
+ 88, 66, 47, 105, 181, 181, 181, 104, 181, 104,
543
+ 181, 104, 106, 106, 106, 106, 59, 181, 104, 104,
544
+ 104, 60, 107, 107, 107, 107, 107, 107, 62, 181,
545
+ 181, 108, 109, 109, 109, 109, 109, 109, 109, 109,
546
+ 109, 109, 109, 109, 109, 109, 109, 109, 109, 109,
547
+
548
+ 109, 109, 181, 64, 56, 111, 181, 181, 181, 112,
549
+ 181, 181, 181, 111, 181, 111, 181, 111, 113, 113,
550
+ 113, 113, 59, 181, 111, 111, 111, 60, 114, 114,
551
+ 114, 114, 114, 114, 62, 181, 181, 115, 116, 116,
552
+ 116, 116, 116, 116, 116, 116, 116, 116, 116, 116,
553
+ 116, 116, 116, 116, 116, 116, 116, 116, 181, 64,
554
+ 56, 139, 181, 181, 181, 140, 181, 181, 181, 139,
555
+ 181, 139, 181, 139, 141, 141, 141, 141, 59, 181,
556
+ 139, 139, 139, 60, 142, 142, 142, 142, 142, 142,
557
+ 62, 181, 181, 143, 144, 144, 144, 144, 144, 144,
558
+
559
+ 144, 144, 144, 144, 144, 144, 144, 144, 144, 144,
560
+ 144, 144, 144, 144, 181, 64, 145, 181, 181, 181,
561
+ 146, 181, 181, 181, 145, 181, 145, 181, 145, 181,
562
+ 181, 181, 181, 181, 181, 145, 145, 145, 181, 181,
563
+ 181, 181, 181, 181, 181, 181, 181, 181, 147, 181,
564
+ 181, 181, 181, 181, 181, 181, 181, 181, 181, 181,
565
+ 181, 181, 181, 181, 181, 181, 181, 181, 181, 181,
566
+ 117, 162, 181, 181, 181, 162, 181, 181, 181, 162,
567
+ 181, 162, 181, 162, 181, 181, 181, 181, 85, 181,
568
+ 162, 162, 162, 181, 181, 181, 181, 181, 181, 181,
569
+
570
+ 181, 181, 181, 162, 162, 181, 181, 181, 162, 181,
571
+ 181, 181, 162, 181, 162, 181, 162, 181, 181, 181,
572
+ 181, 85, 181, 162, 162, 162, 181, 181, 181, 181,
573
+ 181, 181, 181, 181, 181, 181, 162, 46, 46, 46,
574
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
575
+ 48, 48, 48, 51, 181, 51, 51, 51, 51, 51,
576
+ 51, 51, 51, 51, 51, 51, 54, 54, 54, 54,
577
+ 181, 181, 54, 54, 54, 54, 67, 181, 67, 67,
578
+ 67, 67, 67, 67, 67, 67, 67, 67, 67, 79,
579
+ 181, 181, 181, 79, 181, 79, 79, 79, 79, 84,
580
+
581
+ 84, 84, 84, 84, 181, 84, 84, 84, 84, 87,
582
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
583
+ 87, 87, 63, 181, 181, 181, 63, 181, 63, 63,
584
+ 63, 122, 181, 181, 181, 181, 122, 134, 134, 134,
585
+ 181, 181, 181, 181, 134, 135, 135, 135, 135, 135,
586
+ 135, 135, 135, 135, 135, 135, 135, 135, 163, 163,
587
+ 181, 163, 163, 181, 163, 163, 163, 163, 3, 181,
588
+ 181, 181, 181, 181, 181, 181, 181, 181, 181, 181,
589
+ 181, 181, 181, 181, 181, 181, 181, 181, 181, 181,
590
+ 181, 181, 181, 181, 181, 181, 181, 181, 181, 181,
591
+
592
+ 181, 181, 181, 181, 181, 181, 181, 181, 181, 181,
593
+ 181, 181, 181, 181, 181, 181, 181, 181, 181, 181,
594
+ 181, 181, 181, 181, 181, 181, 181, 181, 181
595
+ } ;
596
+
597
+ static yyconst flex_int16_t yy_chk[830] =
598
+ { 0,
599
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
600
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
601
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
602
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
603
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
604
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
605
+ 5, 7, 5, 7, 9, 16, 22, 25, 22, 22,
606
+ 22, 22, 16, 16, 16, 16, 20, 26, 27, 44,
607
+ 20, 44, 20, 48, 20, 34, 20, 22, 20, 39,
608
+ 25, 179, 26, 9, 34, 20, 20, 20, 71, 71,
609
+
610
+ 71, 71, 39, 73, 73, 74, 74, 74, 178, 27,
611
+ 177, 80, 48, 90, 90, 176, 52, 175, 7, 12,
612
+ 52, 173, 52, 12, 52, 12, 52, 12, 52, 12,
613
+ 86, 12, 120, 120, 172, 52, 52, 52, 12, 12,
614
+ 12, 65, 80, 65, 65, 65, 65, 76, 76, 76,
615
+ 76, 12, 13, 13, 102, 130, 169, 13, 130, 86,
616
+ 166, 13, 65, 13, 158, 13, 119, 119, 119, 119,
617
+ 13, 157, 13, 13, 13, 13, 13, 13, 13, 13,
618
+ 13, 13, 13, 102, 155, 13, 13, 13, 13, 13,
619
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
620
+
621
+ 13, 13, 13, 13, 13, 13, 154, 13, 21, 153,
622
+ 21, 21, 21, 21, 72, 135, 72, 72, 72, 72,
623
+ 152, 21, 151, 150, 21, 21, 68, 145, 137, 21,
624
+ 68, 21, 68, 136, 68, 72, 68, 134, 68, 121,
625
+ 121, 121, 21, 132, 135, 68, 68, 68, 21, 28,
626
+ 131, 129, 70, 28, 128, 28, 70, 28, 70, 28,
627
+ 70, 28, 70, 126, 70, 125, 28, 124, 28, 28,
628
+ 28, 70, 70, 70, 123, 123, 123, 123, 123, 123,
629
+ 118, 28, 29, 29, 110, 146, 29, 103, 29, 146,
630
+ 29, 100, 29, 146, 29, 146, 99, 146, 98, 29,
631
+
632
+ 97, 29, 29, 29, 146, 146, 146, 96, 95, 94,
633
+ 93, 92, 91, 87, 29, 33, 85, 146, 84, 33,
634
+ 82, 33, 78, 33, 69, 33, 67, 33, 66, 64,
635
+ 62, 60, 56, 50, 33, 33, 33, 49, 46, 45,
636
+ 42, 40, 38, 37, 36, 35, 32, 33, 58, 58,
637
+ 31, 18, 8, 58, 3, 0, 0, 58, 0, 58,
638
+ 0, 58, 58, 58, 58, 58, 58, 0, 58, 58,
639
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 0,
640
+ 0, 58, 58, 58, 58, 58, 58, 58, 58, 58,
641
+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
642
+
643
+ 58, 58, 0, 58, 61, 61, 0, 0, 0, 61,
644
+ 0, 0, 0, 61, 0, 61, 0, 61, 61, 61,
645
+ 61, 61, 61, 0, 61, 61, 61, 61, 61, 61,
646
+ 61, 61, 61, 61, 61, 0, 0, 61, 61, 61,
647
+ 61, 61, 61, 61, 61, 61, 61, 61, 61, 61,
648
+ 61, 61, 61, 61, 61, 61, 61, 61, 0, 61,
649
+ 107, 107, 0, 0, 0, 107, 0, 0, 0, 107,
650
+ 0, 107, 0, 107, 107, 107, 107, 107, 107, 0,
651
+ 107, 107, 107, 107, 107, 107, 107, 107, 107, 107,
652
+ 107, 0, 0, 107, 107, 107, 107, 107, 107, 107,
653
+
654
+ 107, 107, 107, 107, 107, 107, 107, 107, 107, 107,
655
+ 107, 107, 107, 107, 0, 107, 117, 0, 0, 0,
656
+ 117, 0, 0, 0, 117, 0, 117, 0, 117, 0,
657
+ 0, 0, 0, 0, 0, 117, 117, 117, 0, 0,
658
+ 0, 0, 0, 0, 0, 0, 0, 0, 117, 0,
659
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
660
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
661
+ 117, 148, 0, 0, 0, 148, 0, 0, 0, 148,
662
+ 0, 148, 0, 148, 0, 0, 0, 0, 148, 0,
663
+ 148, 148, 148, 0, 0, 0, 0, 0, 0, 0,
664
+
665
+ 0, 0, 0, 148, 162, 0, 0, 0, 162, 0,
666
+ 0, 0, 162, 0, 162, 0, 162, 0, 0, 0,
667
+ 0, 162, 0, 162, 162, 162, 0, 0, 0, 0,
668
+ 0, 0, 0, 0, 0, 0, 162, 182, 182, 182,
669
+ 183, 183, 183, 183, 183, 183, 183, 183, 183, 183,
670
+ 183, 183, 183, 184, 0, 184, 184, 184, 184, 184,
671
+ 184, 184, 184, 184, 184, 184, 185, 185, 185, 185,
672
+ 0, 0, 185, 185, 185, 185, 186, 0, 186, 186,
673
+ 186, 186, 186, 186, 186, 186, 186, 186, 186, 187,
674
+ 0, 0, 0, 187, 0, 187, 187, 187, 187, 188,
675
+
676
+ 188, 188, 188, 188, 0, 188, 188, 188, 188, 189,
677
+ 189, 189, 189, 189, 189, 189, 189, 189, 189, 189,
678
+ 189, 189, 190, 0, 0, 0, 190, 0, 190, 190,
679
+ 190, 191, 0, 0, 0, 0, 191, 192, 192, 192,
680
+ 0, 0, 0, 0, 192, 193, 193, 193, 193, 193,
681
+ 193, 193, 193, 193, 193, 193, 193, 193, 194, 194,
682
+ 0, 194, 194, 0, 194, 194, 194, 194, 181, 181,
683
+ 181, 181, 181, 181, 181, 181, 181, 181, 181, 181,
684
+ 181, 181, 181, 181, 181, 181, 181, 181, 181, 181,
685
+ 181, 181, 181, 181, 181, 181, 181, 181, 181, 181,
686
+
687
+ 181, 181, 181, 181, 181, 181, 181, 181, 181, 181,
688
+ 181, 181, 181, 181, 181, 181, 181, 181, 181, 181,
689
+ 181, 181, 181, 181, 181, 181, 181, 181, 181
690
+ } ;
691
+
692
+ /* Table of booleans, true if rule could match eol. */
693
+ static yyconst flex_int32_t yy_rule_can_match_eol[52] =
694
+ { 0,
695
+ 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
696
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
697
+ 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, };
698
+
699
+ static yy_state_type yy_last_accepting_state;
700
+ static char *yy_last_accepting_cpos;
701
+
702
+ extern int yy_flex_debug;
703
+ int yy_flex_debug = 0;
704
+
705
+ /* The intent behind this definition is that it'll catch
706
+ * any uses of REJECT which flex missed.
707
+ */
708
+ #define REJECT reject_used_but_not_detected
709
+ #define yymore() yymore_used_but_not_detected
710
+ #define YY_MORE_ADJ 0
711
+ #define YY_RESTORE_YY_MORE_OFFSET
712
+ char *yytext;
713
+ #line 1 "/Users/bakkdoor/projects/fancy/fancy/boot/rbx-compiler/parser/lexer.lex"
714
+ #line 2 "/Users/bakkdoor/projects/fancy/fancy/boot/rbx-compiler/parser/lexer.lex"
715
+ #include "ruby.h"
716
+ #include "parser.h"
717
+
718
+ int yyerror(char *s);
719
+ #line 720 "/Users/bakkdoor/projects/fancy/fancy/boot/rbx-compiler/parser/lexer.c"
720
+
721
+ #define INITIAL 0
722
+
723
+ #ifndef YY_NO_UNISTD_H
724
+ /* Special case for "unistd.h", since it is non-ANSI. We include it way
725
+ * down here because we want the user's section 1 to have been scanned first.
726
+ * The user has a chance to override it with an option.
727
+ */
728
+ #include <unistd.h>
729
+ #endif
730
+
731
+ #ifndef YY_EXTRA_TYPE
732
+ #define YY_EXTRA_TYPE void *
733
+ #endif
734
+
735
+ static int yy_init_globals (void );
736
+
737
+ /* Accessor methods to globals.
738
+ These are made visible to non-reentrant scanners for convenience. */
739
+
740
+ int yylex_destroy (void );
741
+
742
+ int yyget_debug (void );
743
+
744
+ void yyset_debug (int debug_flag );
745
+
746
+ YY_EXTRA_TYPE yyget_extra (void );
747
+
748
+ void yyset_extra (YY_EXTRA_TYPE user_defined );
749
+
750
+ FILE *yyget_in (void );
751
+
752
+ void yyset_in (FILE * in_str );
753
+
754
+ FILE *yyget_out (void );
755
+
756
+ void yyset_out (FILE * out_str );
757
+
758
+ yy_size_t yyget_leng (void );
759
+
760
+ char *yyget_text (void );
761
+
762
+ int yyget_lineno (void );
763
+
764
+ void yyset_lineno (int line_number );
765
+
766
+ /* Macros after this point can all be overridden by user definitions in
767
+ * section 1.
768
+ */
769
+
770
+ #ifndef YY_SKIP_YYWRAP
771
+ #ifdef __cplusplus
772
+ extern "C" int yywrap (void );
773
+ #else
774
+ extern int yywrap (void );
775
+ #endif
776
+ #endif
777
+
778
+ static void yyunput (int c,char *buf_ptr );
779
+
780
+ #ifndef yytext_ptr
781
+ static void yy_flex_strncpy (char *,yyconst char *,int );
782
+ #endif
783
+
784
+ #ifdef YY_NEED_STRLEN
785
+ static int yy_flex_strlen (yyconst char * );
786
+ #endif
787
+
788
+ #ifndef YY_NO_INPUT
789
+
790
+ #ifdef __cplusplus
791
+ static int yyinput (void );
792
+ #else
793
+ static int input (void );
794
+ #endif
795
+
796
+ #endif
797
+
798
+ /* Amount of stuff to slurp up with each read. */
799
+ #ifndef YY_READ_BUF_SIZE
800
+ #define YY_READ_BUF_SIZE 8192
801
+ #endif
802
+
803
+ /* Copy whatever the last rule matched to the standard output. */
804
+ #ifndef ECHO
805
+ /* This used to be an fputs(), but since the string might contain NUL's,
806
+ * we now use fwrite().
807
+ */
808
+ #define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
809
+ #endif
810
+
811
+ /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
812
+ * is returned in "result".
813
+ */
814
+ #ifndef YY_INPUT
815
+ #define YY_INPUT(buf,result,max_size) \
816
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
817
+ { \
818
+ int c = '*'; \
819
+ size_t n; \
820
+ for ( n = 0; n < max_size && \
821
+ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
822
+ buf[n] = (char) c; \
823
+ if ( c == '\n' ) \
824
+ buf[n++] = (char) c; \
825
+ if ( c == EOF && ferror( yyin ) ) \
826
+ YY_FATAL_ERROR( "input in flex scanner failed" ); \
827
+ result = n; \
828
+ } \
829
+ else \
830
+ { \
831
+ errno=0; \
832
+ while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
833
+ { \
834
+ if( errno != EINTR) \
835
+ { \
836
+ YY_FATAL_ERROR( "input in flex scanner failed" ); \
837
+ break; \
838
+ } \
839
+ errno=0; \
840
+ clearerr(yyin); \
841
+ } \
842
+ }\
843
+ \
844
+
845
+ #endif
846
+
847
+ /* No semi-colon after return; correct usage is to write "yyterminate();" -
848
+ * we don't want an extra ';' after the "return" because that will cause
849
+ * some compilers to complain about unreachable statements.
850
+ */
851
+ #ifndef yyterminate
852
+ #define yyterminate() return YY_NULL
853
+ #endif
854
+
855
+ /* Number of entries by which start-condition stack grows. */
856
+ #ifndef YY_START_STACK_INCR
857
+ #define YY_START_STACK_INCR 25
858
+ #endif
859
+
860
+ /* Report a fatal error. */
861
+ #ifndef YY_FATAL_ERROR
862
+ #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
863
+ #endif
864
+
865
+ /* end tables serialization structures and prototypes */
866
+
867
+ /* Default declaration of generated scanner - a define so the user can
868
+ * easily add parameters.
869
+ */
870
+ #ifndef YY_DECL
871
+ #define YY_DECL_IS_OURS 1
872
+
873
+ extern int yylex (void);
874
+
875
+ #define YY_DECL int yylex (void)
876
+ #endif /* !YY_DECL */
877
+
878
+ /* Code executed at the beginning of each rule, after yytext and yyleng
879
+ * have been set up.
880
+ */
881
+ #ifndef YY_USER_ACTION
882
+ #define YY_USER_ACTION
883
+ #endif
884
+
885
+ /* Code executed at the end of each rule. */
886
+ #ifndef YY_BREAK
887
+ #define YY_BREAK break;
888
+ #endif
889
+
890
+ #define YY_RULE_SETUP \
891
+ YY_USER_ACTION
892
+
893
+ /** The main scanner function which does all the work.
894
+ */
895
+ YY_DECL
896
+ {
897
+ register yy_state_type yy_current_state;
898
+ register char *yy_cp, *yy_bp;
899
+ register int yy_act;
900
+
901
+ #line 69 "/Users/bakkdoor/projects/fancy/fancy/boot/rbx-compiler/parser/lexer.lex"
902
+
903
+
904
+ #line 905 "/Users/bakkdoor/projects/fancy/fancy/boot/rbx-compiler/parser/lexer.c"
905
+
906
+ if ( !(yy_init) )
907
+ {
908
+ (yy_init) = 1;
909
+
910
+ #ifdef YY_USER_INIT
911
+ YY_USER_INIT;
912
+ #endif
913
+
914
+ if ( ! (yy_start) )
915
+ (yy_start) = 1; /* first start state */
916
+
917
+ if ( ! yyin )
918
+ yyin = stdin;
919
+
920
+ if ( ! yyout )
921
+ yyout = stdout;
922
+
923
+ if ( ! YY_CURRENT_BUFFER ) {
924
+ yyensure_buffer_stack ();
925
+ YY_CURRENT_BUFFER_LVALUE =
926
+ yy_create_buffer(yyin,YY_BUF_SIZE );
927
+ }
928
+
929
+ yy_load_buffer_state( );
930
+ }
931
+
932
+ while ( 1 ) /* loops until end-of-file is reached */
933
+ {
934
+ yy_cp = (yy_c_buf_p);
935
+
936
+ /* Support of yytext. */
937
+ *yy_cp = (yy_hold_char);
938
+
939
+ /* yy_bp points to the position in yy_ch_buf of the start of
940
+ * the current run.
941
+ */
942
+ yy_bp = yy_cp;
943
+
944
+ yy_current_state = (yy_start);
945
+ yy_match:
946
+ do
947
+ {
948
+ register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
949
+ if ( yy_accept[yy_current_state] )
950
+ {
951
+ (yy_last_accepting_state) = yy_current_state;
952
+ (yy_last_accepting_cpos) = yy_cp;
953
+ }
954
+ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
955
+ {
956
+ yy_current_state = (int) yy_def[yy_current_state];
957
+ if ( yy_current_state >= 182 )
958
+ yy_c = yy_meta[(unsigned int) yy_c];
959
+ }
960
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
961
+ ++yy_cp;
962
+ }
963
+ while ( yy_base[yy_current_state] != 769 );
964
+
965
+ yy_find_action:
966
+ yy_act = yy_accept[yy_current_state];
967
+ if ( yy_act == 0 )
968
+ { /* have to back up */
969
+ yy_cp = (yy_last_accepting_cpos);
970
+ yy_current_state = (yy_last_accepting_state);
971
+ yy_act = yy_accept[yy_current_state];
972
+ }
973
+
974
+ YY_DO_BEFORE_ACTION;
975
+
976
+ if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )
977
+ {
978
+ int yyl;
979
+ for ( yyl = 0; yyl < yyleng; ++yyl )
980
+ if ( yytext[yyl] == '\n' )
981
+
982
+ yylineno++;
983
+ ;
984
+ }
985
+
986
+ do_action: /* This label is used only to access EOF actions. */
987
+
988
+ switch ( yy_act )
989
+ { /* beginning of action switch */
990
+ case 0: /* must back up */
991
+ /* undo the effects of YY_DO_BEFORE_ACTION */
992
+ *yy_cp = (yy_hold_char);
993
+ yy_cp = (yy_last_accepting_cpos);
994
+ yy_current_state = (yy_last_accepting_state);
995
+ goto yy_find_action;
996
+
997
+ case 1:
998
+ YY_RULE_SETUP
999
+ #line 71 "/Users/bakkdoor/projects/fancy/fancy/boot/rbx-compiler/parser/lexer.lex"
1000
+ { return CLASS; }
1001
+ YY_BREAK
1002
+ case 2:
1003
+ YY_RULE_SETUP
1004
+ #line 72 "/Users/bakkdoor/projects/fancy/fancy/boot/rbx-compiler/parser/lexer.lex"
1005
+ { return DEF; }
1006
+ YY_BREAK
1007
+ case 3:
1008
+ YY_RULE_SETUP
1009
+ #line 73 "/Users/bakkdoor/projects/fancy/fancy/boot/rbx-compiler/parser/lexer.lex"
1010
+ {
1011
+ yylval.object = rb_str_new2(yytext);
1012
+ return HEX_LITERAL;
1013
+ }
1014
+ YY_BREAK
1015
+ case 4:
1016
+ YY_RULE_SETUP
1017
+ #line 77 "/Users/bakkdoor/projects/fancy/fancy/boot/rbx-compiler/parser/lexer.lex"
1018
+ {
1019
+ yylval.object = rb_str_new2(yytext);
1020
+ return OCT_LITERAL;
1021
+ }
1022
+ YY_BREAK
1023
+ case 5:
1024
+ YY_RULE_SETUP
1025
+ #line 81 "/Users/bakkdoor/projects/fancy/fancy/boot/rbx-compiler/parser/lexer.lex"
1026
+ {
1027
+ yylval.object = rb_str_new2(yytext);
1028
+ return BIN_LITERAL;
1029
+ }
1030
+ YY_BREAK
1031
+ case 6:
1032
+ YY_RULE_SETUP
1033
+ #line 85 "/Users/bakkdoor/projects/fancy/fancy/boot/rbx-compiler/parser/lexer.lex"
1034
+ {
1035
+ yylval.object = rb_str_new2(yytext);
1036
+ return INTEGER_LITERAL;
1037
+ }
1038
+ YY_BREAK
1039
+ case 7:
1040
+ YY_RULE_SETUP
1041
+ #line 89 "/Users/bakkdoor/projects/fancy/fancy/boot/rbx-compiler/parser/lexer.lex"
1042
+ {
1043
+ yylval.object = rb_str_new2(yytext);
1044
+ return DOUBLE_LITERAL;
1045
+ }
1046
+ YY_BREAK
1047
+ case 8:
1048
+ /* rule 8 can match eol */
1049
+ YY_RULE_SETUP
1050
+ #line 93 "/Users/bakkdoor/projects/fancy/fancy/boot/rbx-compiler/parser/lexer.lex"
1051
+ {
1052
+ yylval.object = rb_str_new2(yytext);
1053
+ return STRING_LITERAL;
1054
+ }
1055
+ YY_BREAK
1056
+ case 9:
1057
+ /* rule 9 can match eol */
1058
+ YY_RULE_SETUP
1059
+ #line 97 "/Users/bakkdoor/projects/fancy/fancy/boot/rbx-compiler/parser/lexer.lex"
1060
+ {
1061
+ yylval.object = rb_str_new2(yytext);
1062
+ return MULTI_STRING_LITERAL;
1063
+ }
1064
+ YY_BREAK
1065
+ case 10:
1066
+ YY_RULE_SETUP
1067
+ #line 101 "/Users/bakkdoor/projects/fancy/fancy/boot/rbx-compiler/parser/lexer.lex"
1068
+ { return LPAREN; }
1069
+ YY_BREAK
1070
+ case 11:
1071
+ YY_RULE_SETUP
1072
+ #line 102 "/Users/bakkdoor/projects/fancy/fancy/boot/rbx-compiler/parser/lexer.lex"
1073
+ { return RPAREN; }
1074
+ YY_BREAK
1075
+ case 12:
1076
+ YY_RULE_SETUP
1077
+ #line 103 "/Users/bakkdoor/projects/fancy/fancy/boot/rbx-compiler/parser/lexer.lex"
1078
+ { return AT_LCURLY; }
1079
+ YY_BREAK
1080
+ case 13:
1081
+ YY_RULE_SETUP
1082
+ #line 104 "/Users/bakkdoor/projects/fancy/fancy/boot/rbx-compiler/parser/lexer.lex"
1083
+ { return LCURLY; }
1084
+ YY_BREAK
1085
+ case 14:
1086
+ YY_RULE_SETUP
1087
+ #line 105 "/Users/bakkdoor/projects/fancy/fancy/boot/rbx-compiler/parser/lexer.lex"
1088
+ { return RCURLY; }
1089
+ YY_BREAK
1090
+ case 15:
1091
+ YY_RULE_SETUP
1092
+ #line 106 "/Users/bakkdoor/projects/fancy/fancy/boot/rbx-compiler/parser/lexer.lex"
1093
+ { return LBRACKET; }
1094
+ YY_BREAK
1095
+ case 16:
1096
+ YY_RULE_SETUP
1097
+ #line 107 "/Users/bakkdoor/projects/fancy/fancy/boot/rbx-compiler/parser/lexer.lex"
1098
+ { return RBRACKET; }
1099
+ YY_BREAK
1100
+ case 17:
1101
+ YY_RULE_SETUP
1102
+ #line 108 "/Users/bakkdoor/projects/fancy/fancy/boot/rbx-compiler/parser/lexer.lex"
1103
+ { return LEFTHASH; }
1104
+ YY_BREAK
1105
+ case 18:
1106
+ YY_RULE_SETUP
1107
+ #line 109 "/Users/bakkdoor/projects/fancy/fancy/boot/rbx-compiler/parser/lexer.lex"
1108
+ { return RIGHTHASH; }
1109
+ YY_BREAK
1110
+ case 19:
1111
+ YY_RULE_SETUP
1112
+ #line 110 "/Users/bakkdoor/projects/fancy/fancy/boot/rbx-compiler/parser/lexer.lex"
1113
+ { return STAB; }
1114
+ YY_BREAK
1115
+ case 20:
1116
+ YY_RULE_SETUP
1117
+ #line 111 "/Users/bakkdoor/projects/fancy/fancy/boot/rbx-compiler/parser/lexer.lex"
1118
+ { return ARROW; }
1119
+ YY_BREAK
1120
+ case 21:
1121
+ YY_RULE_SETUP
1122
+ #line 112 "/Users/bakkdoor/projects/fancy/fancy/boot/rbx-compiler/parser/lexer.lex"
1123
+ { return THIN_ARROW; }
1124
+ YY_BREAK
1125
+ case 22:
1126
+ YY_RULE_SETUP
1127
+ #line 113 "/Users/bakkdoor/projects/fancy/fancy/boot/rbx-compiler/parser/lexer.lex"
1128
+ { return EQUALS; }
1129
+ YY_BREAK
1130
+ case 23:
1131
+ YY_RULE_SETUP
1132
+ #line 114 "/Users/bakkdoor/projects/fancy/fancy/boot/rbx-compiler/parser/lexer.lex"
1133
+ {
1134
+ yylval.object = rb_str_new2(yytext);
1135
+ return OPERATOR;
1136
+ }
1137
+ YY_BREAK
1138
+ case 24:
1139
+ YY_RULE_SETUP
1140
+ #line 118 "/Users/bakkdoor/projects/fancy/fancy/boot/rbx-compiler/parser/lexer.lex"
1141
+ { return RETURN_LOCAL; }
1142
+ YY_BREAK
1143
+ case 25:
1144
+ YY_RULE_SETUP
1145
+ #line 119 "/Users/bakkdoor/projects/fancy/fancy/boot/rbx-compiler/parser/lexer.lex"
1146
+ { return RETURN; }
1147
+ YY_BREAK
1148
+ case 26:
1149
+ YY_RULE_SETUP
1150
+ #line 120 "/Users/bakkdoor/projects/fancy/fancy/boot/rbx-compiler/parser/lexer.lex"
1151
+ { return TRY; }
1152
+ YY_BREAK
1153
+ case 27:
1154
+ YY_RULE_SETUP
1155
+ #line 121 "/Users/bakkdoor/projects/fancy/fancy/boot/rbx-compiler/parser/lexer.lex"
1156
+ { return CATCH; }
1157
+ YY_BREAK
1158
+ case 28:
1159
+ YY_RULE_SETUP
1160
+ #line 122 "/Users/bakkdoor/projects/fancy/fancy/boot/rbx-compiler/parser/lexer.lex"
1161
+ { return FINALLY; }
1162
+ YY_BREAK
1163
+ case 29:
1164
+ YY_RULE_SETUP
1165
+ #line 123 "/Users/bakkdoor/projects/fancy/fancy/boot/rbx-compiler/parser/lexer.lex"
1166
+ { return RETRY; }
1167
+ YY_BREAK
1168
+ case 30:
1169
+ YY_RULE_SETUP
1170
+ #line 124 "/Users/bakkdoor/projects/fancy/fancy/boot/rbx-compiler/parser/lexer.lex"
1171
+ { return SUPER; }
1172
+ YY_BREAK
1173
+ case 31:
1174
+ YY_RULE_SETUP
1175
+ #line 125 "/Users/bakkdoor/projects/fancy/fancy/boot/rbx-compiler/parser/lexer.lex"
1176
+ {
1177
+ yylval.object = rb_str_new2(yytext);
1178
+ return IDENTIFIER;
1179
+ }
1180
+ YY_BREAK
1181
+ case 32:
1182
+ YY_RULE_SETUP
1183
+ #line 129 "/Users/bakkdoor/projects/fancy/fancy/boot/rbx-compiler/parser/lexer.lex"
1184
+ {
1185
+ return MATCH;
1186
+ }
1187
+ YY_BREAK
1188
+ case 33:
1189
+ YY_RULE_SETUP
1190
+ #line 132 "/Users/bakkdoor/projects/fancy/fancy/boot/rbx-compiler/parser/lexer.lex"
1191
+ {
1192
+ return CASE;
1193
+ }
1194
+ YY_BREAK
1195
+ case 34:
1196
+ YY_RULE_SETUP
1197
+ #line 135 "/Users/bakkdoor/projects/fancy/fancy/boot/rbx-compiler/parser/lexer.lex"
1198
+ {
1199
+ yylval.object = rb_str_new2(yytext);
1200
+ return IDENTIFIER;
1201
+ }
1202
+ YY_BREAK
1203
+ case 35:
1204
+ YY_RULE_SETUP
1205
+ #line 139 "/Users/bakkdoor/projects/fancy/fancy/boot/rbx-compiler/parser/lexer.lex"
1206
+ {
1207
+ yylval.object = rb_str_new2(yytext);
1208
+ return RUBY_SEND_OPEN;
1209
+ }
1210
+ YY_BREAK
1211
+ case 36:
1212
+ YY_RULE_SETUP
1213
+ #line 143 "/Users/bakkdoor/projects/fancy/fancy/boot/rbx-compiler/parser/lexer.lex"
1214
+ {
1215
+ yylval.object = rb_str_new2(yytext);
1216
+ return RUBY_OPER_OPEN;
1217
+ }
1218
+ YY_BREAK
1219
+ case 37:
1220
+ YY_RULE_SETUP
1221
+ #line 147 "/Users/bakkdoor/projects/fancy/fancy/boot/rbx-compiler/parser/lexer.lex"
1222
+ {
1223
+ yylval.object = rb_str_new2(yytext);
1224
+ return CONSTANT;
1225
+ }
1226
+ YY_BREAK
1227
+ case 38:
1228
+ YY_RULE_SETUP
1229
+ #line 151 "/Users/bakkdoor/projects/fancy/fancy/boot/rbx-compiler/parser/lexer.lex"
1230
+ {
1231
+ yylval.object = rb_str_new2(yytext);
1232
+ return CONSTANT;
1233
+ }
1234
+ YY_BREAK
1235
+ case 39:
1236
+ YY_RULE_SETUP
1237
+ #line 155 "/Users/bakkdoor/projects/fancy/fancy/boot/rbx-compiler/parser/lexer.lex"
1238
+ {
1239
+ yylval.object = rb_str_new2(yytext);
1240
+ return SYMBOL_LITERAL;
1241
+ }
1242
+ YY_BREAK
1243
+ case 40:
1244
+ YY_RULE_SETUP
1245
+ #line 159 "/Users/bakkdoor/projects/fancy/fancy/boot/rbx-compiler/parser/lexer.lex"
1246
+ {
1247
+ yylval.object = rb_str_new2(yytext);
1248
+ return REGEX_LITERAL;
1249
+ }
1250
+ YY_BREAK
1251
+ case 41:
1252
+ YY_RULE_SETUP
1253
+ #line 163 "/Users/bakkdoor/projects/fancy/fancy/boot/rbx-compiler/parser/lexer.lex"
1254
+ { return COMMA; }
1255
+ YY_BREAK
1256
+ case 42:
1257
+ YY_RULE_SETUP
1258
+ #line 164 "/Users/bakkdoor/projects/fancy/fancy/boot/rbx-compiler/parser/lexer.lex"
1259
+ { return SEMI; }
1260
+ YY_BREAK
1261
+ case 43:
1262
+ YY_RULE_SETUP
1263
+ #line 165 "/Users/bakkdoor/projects/fancy/fancy/boot/rbx-compiler/parser/lexer.lex"
1264
+ { return COLON; }
1265
+ YY_BREAK
1266
+ case 44:
1267
+ YY_RULE_SETUP
1268
+ #line 166 "/Users/bakkdoor/projects/fancy/fancy/boot/rbx-compiler/parser/lexer.lex"
1269
+ { return DOT; }
1270
+ YY_BREAK
1271
+ case 45:
1272
+ YY_RULE_SETUP
1273
+ #line 167 "/Users/bakkdoor/projects/fancy/fancy/boot/rbx-compiler/parser/lexer.lex"
1274
+ { return DOLLAR; }
1275
+ YY_BREAK
1276
+ case 46:
1277
+ YY_RULE_SETUP
1278
+ #line 169 "/Users/bakkdoor/projects/fancy/fancy/boot/rbx-compiler/parser/lexer.lex"
1279
+ {}
1280
+ YY_BREAK
1281
+ case 47:
1282
+ YY_RULE_SETUP
1283
+ #line 171 "/Users/bakkdoor/projects/fancy/fancy/boot/rbx-compiler/parser/lexer.lex"
1284
+ {}
1285
+ YY_BREAK
1286
+ case 48:
1287
+ /* rule 48 can match eol */
1288
+ YY_RULE_SETUP
1289
+ #line 172 "/Users/bakkdoor/projects/fancy/fancy/boot/rbx-compiler/parser/lexer.lex"
1290
+ {}
1291
+ YY_BREAK
1292
+ case 49:
1293
+ /* rule 49 can match eol */
1294
+ YY_RULE_SETUP
1295
+ #line 173 "/Users/bakkdoor/projects/fancy/fancy/boot/rbx-compiler/parser/lexer.lex"
1296
+ { return NL; }
1297
+ YY_BREAK
1298
+ case 50:
1299
+ YY_RULE_SETUP
1300
+ #line 175 "/Users/bakkdoor/projects/fancy/fancy/boot/rbx-compiler/parser/lexer.lex"
1301
+ { fprintf(stderr, "SCANNER %d", yyerror("")); exit(1); }
1302
+ YY_BREAK
1303
+ case 51:
1304
+ YY_RULE_SETUP
1305
+ #line 177 "/Users/bakkdoor/projects/fancy/fancy/boot/rbx-compiler/parser/lexer.lex"
1306
+ ECHO;
1307
+ YY_BREAK
1308
+ #line 1309 "/Users/bakkdoor/projects/fancy/fancy/boot/rbx-compiler/parser/lexer.c"
1309
+ case YY_STATE_EOF(INITIAL):
1310
+ yyterminate();
1311
+
1312
+ case YY_END_OF_BUFFER:
1313
+ {
1314
+ /* Amount of text matched not including the EOB char. */
1315
+ int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
1316
+
1317
+ /* Undo the effects of YY_DO_BEFORE_ACTION. */
1318
+ *yy_cp = (yy_hold_char);
1319
+ YY_RESTORE_YY_MORE_OFFSET
1320
+
1321
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1322
+ {
1323
+ /* We're scanning a new file or input source. It's
1324
+ * possible that this happened because the user
1325
+ * just pointed yyin at a new source and called
1326
+ * yylex(). If so, then we have to assure
1327
+ * consistency between YY_CURRENT_BUFFER and our
1328
+ * globals. Here is the right place to do so, because
1329
+ * this is the first action (other than possibly a
1330
+ * back-up) that will match for the new input source.
1331
+ */
1332
+ (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1333
+ YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
1334
+ YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1335
+ }
1336
+
1337
+ /* Note that here we test for yy_c_buf_p "<=" to the position
1338
+ * of the first EOB in the buffer, since yy_c_buf_p will
1339
+ * already have been incremented past the NUL character
1340
+ * (since all states make transitions on EOB to the
1341
+ * end-of-buffer state). Contrast this with the test
1342
+ * in input().
1343
+ */
1344
+ if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1345
+ { /* This was really a NUL. */
1346
+ yy_state_type yy_next_state;
1347
+
1348
+ (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
1349
+
1350
+ yy_current_state = yy_get_previous_state( );
1351
+
1352
+ /* Okay, we're now positioned to make the NUL
1353
+ * transition. We couldn't have
1354
+ * yy_get_previous_state() go ahead and do it
1355
+ * for us because it doesn't know how to deal
1356
+ * with the possibility of jamming (and we don't
1357
+ * want to build jamming into it because then it
1358
+ * will run more slowly).
1359
+ */
1360
+
1361
+ yy_next_state = yy_try_NUL_trans( yy_current_state );
1362
+
1363
+ yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1364
+
1365
+ if ( yy_next_state )
1366
+ {
1367
+ /* Consume the NUL. */
1368
+ yy_cp = ++(yy_c_buf_p);
1369
+ yy_current_state = yy_next_state;
1370
+ goto yy_match;
1371
+ }
1372
+
1373
+ else
1374
+ {
1375
+ yy_cp = (yy_c_buf_p);
1376
+ goto yy_find_action;
1377
+ }
1378
+ }
1379
+
1380
+ else switch ( yy_get_next_buffer( ) )
1381
+ {
1382
+ case EOB_ACT_END_OF_FILE:
1383
+ {
1384
+ (yy_did_buffer_switch_on_eof) = 0;
1385
+
1386
+ if ( yywrap( ) )
1387
+ {
1388
+ /* Note: because we've taken care in
1389
+ * yy_get_next_buffer() to have set up
1390
+ * yytext, we can now set up
1391
+ * yy_c_buf_p so that if some total
1392
+ * hoser (like flex itself) wants to
1393
+ * call the scanner after we return the
1394
+ * YY_NULL, it'll still work - another
1395
+ * YY_NULL will get returned.
1396
+ */
1397
+ (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
1398
+
1399
+ yy_act = YY_STATE_EOF(YY_START);
1400
+ goto do_action;
1401
+ }
1402
+
1403
+ else
1404
+ {
1405
+ if ( ! (yy_did_buffer_switch_on_eof) )
1406
+ YY_NEW_FILE;
1407
+ }
1408
+ break;
1409
+ }
1410
+
1411
+ case EOB_ACT_CONTINUE_SCAN:
1412
+ (yy_c_buf_p) =
1413
+ (yytext_ptr) + yy_amount_of_matched_text;
1414
+
1415
+ yy_current_state = yy_get_previous_state( );
1416
+
1417
+ yy_cp = (yy_c_buf_p);
1418
+ yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1419
+ goto yy_match;
1420
+
1421
+ case EOB_ACT_LAST_MATCH:
1422
+ (yy_c_buf_p) =
1423
+ &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
1424
+
1425
+ yy_current_state = yy_get_previous_state( );
1426
+
1427
+ yy_cp = (yy_c_buf_p);
1428
+ yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1429
+ goto yy_find_action;
1430
+ }
1431
+ break;
1432
+ }
1433
+
1434
+ default:
1435
+ YY_FATAL_ERROR(
1436
+ "fatal flex scanner internal error--no action found" );
1437
+ } /* end of action switch */
1438
+ } /* end of scanning one token */
1439
+ } /* end of yylex */
1440
+
1441
+ /* yy_get_next_buffer - try to read in a new buffer
1442
+ *
1443
+ * Returns a code representing an action:
1444
+ * EOB_ACT_LAST_MATCH -
1445
+ * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1446
+ * EOB_ACT_END_OF_FILE - end of file
1447
+ */
1448
+ static int yy_get_next_buffer (void)
1449
+ {
1450
+ register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1451
+ register char *source = (yytext_ptr);
1452
+ register int number_to_move, i;
1453
+ int ret_val;
1454
+
1455
+ if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
1456
+ YY_FATAL_ERROR(
1457
+ "fatal flex scanner internal error--end of buffer missed" );
1458
+
1459
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1460
+ { /* Don't try to fill the buffer, so this is an EOF. */
1461
+ if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
1462
+ {
1463
+ /* We matched a single character, the EOB, so
1464
+ * treat this as a final EOF.
1465
+ */
1466
+ return EOB_ACT_END_OF_FILE;
1467
+ }
1468
+
1469
+ else
1470
+ {
1471
+ /* We matched some text prior to the EOB, first
1472
+ * process it.
1473
+ */
1474
+ return EOB_ACT_LAST_MATCH;
1475
+ }
1476
+ }
1477
+
1478
+ /* Try to read more data. */
1479
+
1480
+ /* First move last chars to start of buffer. */
1481
+ number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
1482
+
1483
+ for ( i = 0; i < number_to_move; ++i )
1484
+ *(dest++) = *(source++);
1485
+
1486
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1487
+ /* don't do the read, it's not guaranteed to return an EOF,
1488
+ * just force an EOF
1489
+ */
1490
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
1491
+
1492
+ else
1493
+ {
1494
+ yy_size_t num_to_read =
1495
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1496
+
1497
+ while ( num_to_read <= 0 )
1498
+ { /* Not enough room in the buffer - grow it. */
1499
+
1500
+ /* just a shorter name for the current buffer */
1501
+ YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
1502
+
1503
+ int yy_c_buf_p_offset =
1504
+ (int) ((yy_c_buf_p) - b->yy_ch_buf);
1505
+
1506
+ if ( b->yy_is_our_buffer )
1507
+ {
1508
+ yy_size_t new_size = b->yy_buf_size * 2;
1509
+
1510
+ if ( new_size <= 0 )
1511
+ b->yy_buf_size += b->yy_buf_size / 8;
1512
+ else
1513
+ b->yy_buf_size *= 2;
1514
+
1515
+ b->yy_ch_buf = (char *)
1516
+ /* Include room in for 2 EOB chars. */
1517
+ yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
1518
+ }
1519
+ else
1520
+ /* Can't grow it, we don't own it. */
1521
+ b->yy_ch_buf = 0;
1522
+
1523
+ if ( ! b->yy_ch_buf )
1524
+ YY_FATAL_ERROR(
1525
+ "fatal error - scanner input buffer overflow" );
1526
+
1527
+ (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
1528
+
1529
+ num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1530
+ number_to_move - 1;
1531
+
1532
+ }
1533
+
1534
+ if ( num_to_read > YY_READ_BUF_SIZE )
1535
+ num_to_read = YY_READ_BUF_SIZE;
1536
+
1537
+ /* Read in more data. */
1538
+ YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1539
+ (yy_n_chars), num_to_read );
1540
+
1541
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1542
+ }
1543
+
1544
+ if ( (yy_n_chars) == 0 )
1545
+ {
1546
+ if ( number_to_move == YY_MORE_ADJ )
1547
+ {
1548
+ ret_val = EOB_ACT_END_OF_FILE;
1549
+ yyrestart(yyin );
1550
+ }
1551
+
1552
+ else
1553
+ {
1554
+ ret_val = EOB_ACT_LAST_MATCH;
1555
+ YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1556
+ YY_BUFFER_EOF_PENDING;
1557
+ }
1558
+ }
1559
+
1560
+ else
1561
+ ret_val = EOB_ACT_CONTINUE_SCAN;
1562
+
1563
+ if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1564
+ /* Extend the array by 50%, plus the number we really need. */
1565
+ yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
1566
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
1567
+ if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1568
+ YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
1569
+ }
1570
+
1571
+ (yy_n_chars) += number_to_move;
1572
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
1573
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
1574
+
1575
+ (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1576
+
1577
+ return ret_val;
1578
+ }
1579
+
1580
+ /* yy_get_previous_state - get the state just before the EOB char was reached */
1581
+
1582
+ static yy_state_type yy_get_previous_state (void)
1583
+ {
1584
+ register yy_state_type yy_current_state;
1585
+ register char *yy_cp;
1586
+
1587
+ yy_current_state = (yy_start);
1588
+
1589
+ for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
1590
+ {
1591
+ register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1592
+ if ( yy_accept[yy_current_state] )
1593
+ {
1594
+ (yy_last_accepting_state) = yy_current_state;
1595
+ (yy_last_accepting_cpos) = yy_cp;
1596
+ }
1597
+ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1598
+ {
1599
+ yy_current_state = (int) yy_def[yy_current_state];
1600
+ if ( yy_current_state >= 182 )
1601
+ yy_c = yy_meta[(unsigned int) yy_c];
1602
+ }
1603
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1604
+ }
1605
+
1606
+ return yy_current_state;
1607
+ }
1608
+
1609
+ /* yy_try_NUL_trans - try to make a transition on the NUL character
1610
+ *
1611
+ * synopsis
1612
+ * next_state = yy_try_NUL_trans( current_state );
1613
+ */
1614
+ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
1615
+ {
1616
+ register int yy_is_jam;
1617
+ register char *yy_cp = (yy_c_buf_p);
1618
+
1619
+ register YY_CHAR yy_c = 1;
1620
+ if ( yy_accept[yy_current_state] )
1621
+ {
1622
+ (yy_last_accepting_state) = yy_current_state;
1623
+ (yy_last_accepting_cpos) = yy_cp;
1624
+ }
1625
+ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1626
+ {
1627
+ yy_current_state = (int) yy_def[yy_current_state];
1628
+ if ( yy_current_state >= 182 )
1629
+ yy_c = yy_meta[(unsigned int) yy_c];
1630
+ }
1631
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1632
+ yy_is_jam = (yy_current_state == 181);
1633
+
1634
+ return yy_is_jam ? 0 : yy_current_state;
1635
+ }
1636
+
1637
+ static void yyunput (int c, register char * yy_bp )
1638
+ {
1639
+ register char *yy_cp;
1640
+
1641
+ yy_cp = (yy_c_buf_p);
1642
+
1643
+ /* undo effects of setting up yytext */
1644
+ *yy_cp = (yy_hold_char);
1645
+
1646
+ if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1647
+ { /* need to shift things up to make room */
1648
+ /* +2 for EOB chars. */
1649
+ register yy_size_t number_to_move = (yy_n_chars) + 2;
1650
+ register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
1651
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
1652
+ register char *source =
1653
+ &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
1654
+
1655
+ while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1656
+ *--dest = *--source;
1657
+
1658
+ yy_cp += (int) (dest - source);
1659
+ yy_bp += (int) (dest - source);
1660
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
1661
+ (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
1662
+
1663
+ if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1664
+ YY_FATAL_ERROR( "flex scanner push-back overflow" );
1665
+ }
1666
+
1667
+ *--yy_cp = (char) c;
1668
+
1669
+ if ( c == '\n' ){
1670
+ --yylineno;
1671
+ }
1672
+
1673
+ (yytext_ptr) = yy_bp;
1674
+ (yy_hold_char) = *yy_cp;
1675
+ (yy_c_buf_p) = yy_cp;
1676
+ }
1677
+
1678
+ #ifndef YY_NO_INPUT
1679
+ #ifdef __cplusplus
1680
+ static int yyinput (void)
1681
+ #else
1682
+ static int input (void)
1683
+ #endif
1684
+
1685
+ {
1686
+ int c;
1687
+
1688
+ *(yy_c_buf_p) = (yy_hold_char);
1689
+
1690
+ if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
1691
+ {
1692
+ /* yy_c_buf_p now points to the character we want to return.
1693
+ * If this occurs *before* the EOB characters, then it's a
1694
+ * valid NUL; if not, then we've hit the end of the buffer.
1695
+ */
1696
+ if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1697
+ /* This was really a NUL. */
1698
+ *(yy_c_buf_p) = '\0';
1699
+
1700
+ else
1701
+ { /* need more input */
1702
+ yy_size_t offset = (yy_c_buf_p) - (yytext_ptr);
1703
+ ++(yy_c_buf_p);
1704
+
1705
+ switch ( yy_get_next_buffer( ) )
1706
+ {
1707
+ case EOB_ACT_LAST_MATCH:
1708
+ /* This happens because yy_g_n_b()
1709
+ * sees that we've accumulated a
1710
+ * token and flags that we need to
1711
+ * try matching the token before
1712
+ * proceeding. But for input(),
1713
+ * there's no matching to consider.
1714
+ * So convert the EOB_ACT_LAST_MATCH
1715
+ * to EOB_ACT_END_OF_FILE.
1716
+ */
1717
+
1718
+ /* Reset buffer status. */
1719
+ yyrestart(yyin );
1720
+
1721
+ /*FALLTHROUGH*/
1722
+
1723
+ case EOB_ACT_END_OF_FILE:
1724
+ {
1725
+ if ( yywrap( ) )
1726
+ return EOF;
1727
+
1728
+ if ( ! (yy_did_buffer_switch_on_eof) )
1729
+ YY_NEW_FILE;
1730
+ #ifdef __cplusplus
1731
+ return yyinput();
1732
+ #else
1733
+ return input();
1734
+ #endif
1735
+ }
1736
+
1737
+ case EOB_ACT_CONTINUE_SCAN:
1738
+ (yy_c_buf_p) = (yytext_ptr) + offset;
1739
+ break;
1740
+ }
1741
+ }
1742
+ }
1743
+
1744
+ c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
1745
+ *(yy_c_buf_p) = '\0'; /* preserve yytext */
1746
+ (yy_hold_char) = *++(yy_c_buf_p);
1747
+
1748
+ if ( c == '\n' )
1749
+
1750
+ yylineno++;
1751
+ ;
1752
+
1753
+ return c;
1754
+ }
1755
+ #endif /* ifndef YY_NO_INPUT */
1756
+
1757
+ /** Immediately switch to a different input stream.
1758
+ * @param input_file A readable stream.
1759
+ *
1760
+ * @note This function does not reset the start condition to @c INITIAL .
1761
+ */
1762
+ void yyrestart (FILE * input_file )
1763
+ {
1764
+
1765
+ if ( ! YY_CURRENT_BUFFER ){
1766
+ yyensure_buffer_stack ();
1767
+ YY_CURRENT_BUFFER_LVALUE =
1768
+ yy_create_buffer(yyin,YY_BUF_SIZE );
1769
+ }
1770
+
1771
+ yy_init_buffer(YY_CURRENT_BUFFER,input_file );
1772
+ yy_load_buffer_state( );
1773
+ }
1774
+
1775
+ /** Switch to a different input buffer.
1776
+ * @param new_buffer The new input buffer.
1777
+ *
1778
+ */
1779
+ void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
1780
+ {
1781
+
1782
+ /* TODO. We should be able to replace this entire function body
1783
+ * with
1784
+ * yypop_buffer_state();
1785
+ * yypush_buffer_state(new_buffer);
1786
+ */
1787
+ yyensure_buffer_stack ();
1788
+ if ( YY_CURRENT_BUFFER == new_buffer )
1789
+ return;
1790
+
1791
+ if ( YY_CURRENT_BUFFER )
1792
+ {
1793
+ /* Flush out information for old buffer. */
1794
+ *(yy_c_buf_p) = (yy_hold_char);
1795
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1796
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1797
+ }
1798
+
1799
+ YY_CURRENT_BUFFER_LVALUE = new_buffer;
1800
+ yy_load_buffer_state( );
1801
+
1802
+ /* We don't actually know whether we did this switch during
1803
+ * EOF (yywrap()) processing, but the only time this flag
1804
+ * is looked at is after yywrap() is called, so it's safe
1805
+ * to go ahead and always set it.
1806
+ */
1807
+ (yy_did_buffer_switch_on_eof) = 1;
1808
+ }
1809
+
1810
+ static void yy_load_buffer_state (void)
1811
+ {
1812
+ (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1813
+ (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
1814
+ yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
1815
+ (yy_hold_char) = *(yy_c_buf_p);
1816
+ }
1817
+
1818
+ /** Allocate and initialize an input buffer state.
1819
+ * @param file A readable stream.
1820
+ * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
1821
+ *
1822
+ * @return the allocated buffer state.
1823
+ */
1824
+ YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
1825
+ {
1826
+ YY_BUFFER_STATE b;
1827
+
1828
+ b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
1829
+ if ( ! b )
1830
+ YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1831
+
1832
+ b->yy_buf_size = size;
1833
+
1834
+ /* yy_ch_buf has to be 2 characters longer than the size given because
1835
+ * we need to put in 2 end-of-buffer characters.
1836
+ */
1837
+ b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 );
1838
+ if ( ! b->yy_ch_buf )
1839
+ YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1840
+
1841
+ b->yy_is_our_buffer = 1;
1842
+
1843
+ yy_init_buffer(b,file );
1844
+
1845
+ return b;
1846
+ }
1847
+
1848
+ /** Destroy the buffer.
1849
+ * @param b a buffer created with yy_create_buffer()
1850
+ *
1851
+ */
1852
+ void yy_delete_buffer (YY_BUFFER_STATE b )
1853
+ {
1854
+
1855
+ if ( ! b )
1856
+ return;
1857
+
1858
+ if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
1859
+ YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
1860
+
1861
+ if ( b->yy_is_our_buffer )
1862
+ yyfree((void *) b->yy_ch_buf );
1863
+
1864
+ yyfree((void *) b );
1865
+ }
1866
+
1867
+ /* Initializes or reinitializes a buffer.
1868
+ * This function is sometimes called more than once on the same buffer,
1869
+ * such as during a yyrestart() or at EOF.
1870
+ */
1871
+ static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
1872
+
1873
+ {
1874
+ int oerrno = errno;
1875
+
1876
+ yy_flush_buffer(b );
1877
+
1878
+ b->yy_input_file = file;
1879
+ b->yy_fill_buffer = 1;
1880
+
1881
+ /* If b is the current buffer, then yy_init_buffer was _probably_
1882
+ * called from yyrestart() or through yy_get_next_buffer.
1883
+ * In that case, we don't want to reset the lineno or column.
1884
+ */
1885
+ if (b != YY_CURRENT_BUFFER){
1886
+ b->yy_bs_lineno = 1;
1887
+ b->yy_bs_column = 0;
1888
+ }
1889
+
1890
+ b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1891
+
1892
+ errno = oerrno;
1893
+ }
1894
+
1895
+ /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
1896
+ * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
1897
+ *
1898
+ */
1899
+ void yy_flush_buffer (YY_BUFFER_STATE b )
1900
+ {
1901
+ if ( ! b )
1902
+ return;
1903
+
1904
+ b->yy_n_chars = 0;
1905
+
1906
+ /* We always need two end-of-buffer characters. The first causes
1907
+ * a transition to the end-of-buffer state. The second causes
1908
+ * a jam in that state.
1909
+ */
1910
+ b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1911
+ b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1912
+
1913
+ b->yy_buf_pos = &b->yy_ch_buf[0];
1914
+
1915
+ b->yy_at_bol = 1;
1916
+ b->yy_buffer_status = YY_BUFFER_NEW;
1917
+
1918
+ if ( b == YY_CURRENT_BUFFER )
1919
+ yy_load_buffer_state( );
1920
+ }
1921
+
1922
+ /** Pushes the new state onto the stack. The new state becomes
1923
+ * the current state. This function will allocate the stack
1924
+ * if necessary.
1925
+ * @param new_buffer The new state.
1926
+ *
1927
+ */
1928
+ void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
1929
+ {
1930
+ if (new_buffer == NULL)
1931
+ return;
1932
+
1933
+ yyensure_buffer_stack();
1934
+
1935
+ /* This block is copied from yy_switch_to_buffer. */
1936
+ if ( YY_CURRENT_BUFFER )
1937
+ {
1938
+ /* Flush out information for old buffer. */
1939
+ *(yy_c_buf_p) = (yy_hold_char);
1940
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1941
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1942
+ }
1943
+
1944
+ /* Only push if top exists. Otherwise, replace top. */
1945
+ if (YY_CURRENT_BUFFER)
1946
+ (yy_buffer_stack_top)++;
1947
+ YY_CURRENT_BUFFER_LVALUE = new_buffer;
1948
+
1949
+ /* copied from yy_switch_to_buffer. */
1950
+ yy_load_buffer_state( );
1951
+ (yy_did_buffer_switch_on_eof) = 1;
1952
+ }
1953
+
1954
+ /** Removes and deletes the top of the stack, if present.
1955
+ * The next element becomes the new top.
1956
+ *
1957
+ */
1958
+ void yypop_buffer_state (void)
1959
+ {
1960
+ if (!YY_CURRENT_BUFFER)
1961
+ return;
1962
+
1963
+ yy_delete_buffer(YY_CURRENT_BUFFER );
1964
+ YY_CURRENT_BUFFER_LVALUE = NULL;
1965
+ if ((yy_buffer_stack_top) > 0)
1966
+ --(yy_buffer_stack_top);
1967
+
1968
+ if (YY_CURRENT_BUFFER) {
1969
+ yy_load_buffer_state( );
1970
+ (yy_did_buffer_switch_on_eof) = 1;
1971
+ }
1972
+ }
1973
+
1974
+ /* Allocates the stack if it does not exist.
1975
+ * Guarantees space for at least one push.
1976
+ */
1977
+ static void yyensure_buffer_stack (void)
1978
+ {
1979
+ yy_size_t num_to_alloc;
1980
+
1981
+ if (!(yy_buffer_stack)) {
1982
+
1983
+ /* First allocation is just for 2 elements, since we don't know if this
1984
+ * scanner will even need a stack. We use 2 instead of 1 to avoid an
1985
+ * immediate realloc on the next call.
1986
+ */
1987
+ num_to_alloc = 1;
1988
+ (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
1989
+ (num_to_alloc * sizeof(struct yy_buffer_state*)
1990
+ );
1991
+ if ( ! (yy_buffer_stack) )
1992
+ YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
1993
+
1994
+ memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
1995
+
1996
+ (yy_buffer_stack_max) = num_to_alloc;
1997
+ (yy_buffer_stack_top) = 0;
1998
+ return;
1999
+ }
2000
+
2001
+ if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
2002
+
2003
+ /* Increase the buffer to prepare for a possible push. */
2004
+ int grow_size = 8 /* arbitrary grow size */;
2005
+
2006
+ num_to_alloc = (yy_buffer_stack_max) + grow_size;
2007
+ (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
2008
+ ((yy_buffer_stack),
2009
+ num_to_alloc * sizeof(struct yy_buffer_state*)
2010
+ );
2011
+ if ( ! (yy_buffer_stack) )
2012
+ YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
2013
+
2014
+ /* zero only the new slots.*/
2015
+ memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
2016
+ (yy_buffer_stack_max) = num_to_alloc;
2017
+ }
2018
+ }
2019
+
2020
+ /** Setup the input buffer state to scan directly from a user-specified character buffer.
2021
+ * @param base the character buffer
2022
+ * @param size the size in bytes of the character buffer
2023
+ *
2024
+ * @return the newly allocated buffer state object.
2025
+ */
2026
+ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
2027
+ {
2028
+ YY_BUFFER_STATE b;
2029
+
2030
+ if ( size < 2 ||
2031
+ base[size-2] != YY_END_OF_BUFFER_CHAR ||
2032
+ base[size-1] != YY_END_OF_BUFFER_CHAR )
2033
+ /* They forgot to leave room for the EOB's. */
2034
+ return 0;
2035
+
2036
+ b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
2037
+ if ( ! b )
2038
+ YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
2039
+
2040
+ b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
2041
+ b->yy_buf_pos = b->yy_ch_buf = base;
2042
+ b->yy_is_our_buffer = 0;
2043
+ b->yy_input_file = 0;
2044
+ b->yy_n_chars = b->yy_buf_size;
2045
+ b->yy_is_interactive = 0;
2046
+ b->yy_at_bol = 1;
2047
+ b->yy_fill_buffer = 0;
2048
+ b->yy_buffer_status = YY_BUFFER_NEW;
2049
+
2050
+ yy_switch_to_buffer(b );
2051
+
2052
+ return b;
2053
+ }
2054
+
2055
+ /** Setup the input buffer state to scan a string. The next call to yylex() will
2056
+ * scan from a @e copy of @a str.
2057
+ * @param yystr a NUL-terminated string to scan
2058
+ *
2059
+ * @return the newly allocated buffer state object.
2060
+ * @note If you want to scan bytes that may contain NUL values, then use
2061
+ * yy_scan_bytes() instead.
2062
+ */
2063
+ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
2064
+ {
2065
+
2066
+ return yy_scan_bytes(yystr,strlen(yystr) );
2067
+ }
2068
+
2069
+ /** Setup the input buffer state to scan the given bytes. The next call to yylex() will
2070
+ * scan from a @e copy of @a bytes.
2071
+ * @param yybytes the byte buffer to scan
2072
+ * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
2073
+ *
2074
+ * @return the newly allocated buffer state object.
2075
+ */
2076
+ YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len )
2077
+ {
2078
+ YY_BUFFER_STATE b;
2079
+ char *buf;
2080
+ yy_size_t n;
2081
+ int i;
2082
+
2083
+ /* Get memory for full buffer, including space for trailing EOB's. */
2084
+ n = _yybytes_len + 2;
2085
+ buf = (char *) yyalloc(n );
2086
+ if ( ! buf )
2087
+ YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
2088
+
2089
+ for ( i = 0; i < _yybytes_len; ++i )
2090
+ buf[i] = yybytes[i];
2091
+
2092
+ buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
2093
+
2094
+ b = yy_scan_buffer(buf,n );
2095
+ if ( ! b )
2096
+ YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
2097
+
2098
+ /* It's okay to grow etc. this buffer, and we should throw it
2099
+ * away when we're done.
2100
+ */
2101
+ b->yy_is_our_buffer = 1;
2102
+
2103
+ return b;
2104
+ }
2105
+
2106
+ #ifndef YY_EXIT_FAILURE
2107
+ #define YY_EXIT_FAILURE 2
2108
+ #endif
2109
+
2110
+ static void yy_fatal_error (yyconst char* msg )
2111
+ {
2112
+ (void) fprintf( stderr, "%s\n", msg );
2113
+ exit( YY_EXIT_FAILURE );
2114
+ }
2115
+
2116
+ /* Redefine yyless() so it works in section 3 code. */
2117
+
2118
+ #undef yyless
2119
+ #define yyless(n) \
2120
+ do \
2121
+ { \
2122
+ /* Undo effects of setting up yytext. */ \
2123
+ int yyless_macro_arg = (n); \
2124
+ YY_LESS_LINENO(yyless_macro_arg);\
2125
+ yytext[yyleng] = (yy_hold_char); \
2126
+ (yy_c_buf_p) = yytext + yyless_macro_arg; \
2127
+ (yy_hold_char) = *(yy_c_buf_p); \
2128
+ *(yy_c_buf_p) = '\0'; \
2129
+ yyleng = yyless_macro_arg; \
2130
+ } \
2131
+ while ( 0 )
2132
+
2133
+ /* Accessor methods (get/set functions) to struct members. */
2134
+
2135
+ /** Get the current line number.
2136
+ *
2137
+ */
2138
+ int yyget_lineno (void)
2139
+ {
2140
+
2141
+ return yylineno;
2142
+ }
2143
+
2144
+ /** Get the input stream.
2145
+ *
2146
+ */
2147
+ FILE *yyget_in (void)
2148
+ {
2149
+ return yyin;
2150
+ }
2151
+
2152
+ /** Get the output stream.
2153
+ *
2154
+ */
2155
+ FILE *yyget_out (void)
2156
+ {
2157
+ return yyout;
2158
+ }
2159
+
2160
+ /** Get the length of the current token.
2161
+ *
2162
+ */
2163
+ yy_size_t yyget_leng (void)
2164
+ {
2165
+ return yyleng;
2166
+ }
2167
+
2168
+ /** Get the current token.
2169
+ *
2170
+ */
2171
+
2172
+ char *yyget_text (void)
2173
+ {
2174
+ return yytext;
2175
+ }
2176
+
2177
+ /** Set the current line number.
2178
+ * @param line_number
2179
+ *
2180
+ */
2181
+ void yyset_lineno (int line_number )
2182
+ {
2183
+
2184
+ yylineno = line_number;
2185
+ }
2186
+
2187
+ /** Set the input stream. This does not discard the current
2188
+ * input buffer.
2189
+ * @param in_str A readable stream.
2190
+ *
2191
+ * @see yy_switch_to_buffer
2192
+ */
2193
+ void yyset_in (FILE * in_str )
2194
+ {
2195
+ yyin = in_str ;
2196
+ }
2197
+
2198
+ void yyset_out (FILE * out_str )
2199
+ {
2200
+ yyout = out_str ;
2201
+ }
2202
+
2203
+ int yyget_debug (void)
2204
+ {
2205
+ return yy_flex_debug;
2206
+ }
2207
+
2208
+ void yyset_debug (int bdebug )
2209
+ {
2210
+ yy_flex_debug = bdebug ;
2211
+ }
2212
+
2213
+ static int yy_init_globals (void)
2214
+ {
2215
+ /* Initialization is the same as for the non-reentrant scanner.
2216
+ * This function is called from yylex_destroy(), so don't allocate here.
2217
+ */
2218
+
2219
+ /* We do not touch yylineno unless the option is enabled. */
2220
+ yylineno = 1;
2221
+
2222
+ (yy_buffer_stack) = 0;
2223
+ (yy_buffer_stack_top) = 0;
2224
+ (yy_buffer_stack_max) = 0;
2225
+ (yy_c_buf_p) = (char *) 0;
2226
+ (yy_init) = 0;
2227
+ (yy_start) = 0;
2228
+
2229
+ /* Defined in main.c */
2230
+ #ifdef YY_STDINIT
2231
+ yyin = stdin;
2232
+ yyout = stdout;
2233
+ #else
2234
+ yyin = (FILE *) 0;
2235
+ yyout = (FILE *) 0;
2236
+ #endif
2237
+
2238
+ /* For future reference: Set errno on error, since we are called by
2239
+ * yylex_init()
2240
+ */
2241
+ return 0;
2242
+ }
2243
+
2244
+ /* yylex_destroy is for both reentrant and non-reentrant scanners. */
2245
+ int yylex_destroy (void)
2246
+ {
2247
+
2248
+ /* Pop the buffer stack, destroying each element. */
2249
+ while(YY_CURRENT_BUFFER){
2250
+ yy_delete_buffer(YY_CURRENT_BUFFER );
2251
+ YY_CURRENT_BUFFER_LVALUE = NULL;
2252
+ yypop_buffer_state();
2253
+ }
2254
+
2255
+ /* Destroy the stack itself. */
2256
+ yyfree((yy_buffer_stack) );
2257
+ (yy_buffer_stack) = NULL;
2258
+
2259
+ /* Reset the globals. This is important in a non-reentrant scanner so the next time
2260
+ * yylex() is called, initialization will occur. */
2261
+ yy_init_globals( );
2262
+
2263
+ return 0;
2264
+ }
2265
+
2266
+ /*
2267
+ * Internal utility routines.
2268
+ */
2269
+
2270
+ #ifndef yytext_ptr
2271
+ static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
2272
+ {
2273
+ register int i;
2274
+ for ( i = 0; i < n; ++i )
2275
+ s1[i] = s2[i];
2276
+ }
2277
+ #endif
2278
+
2279
+ #ifdef YY_NEED_STRLEN
2280
+ static int yy_flex_strlen (yyconst char * s )
2281
+ {
2282
+ register int n;
2283
+ for ( n = 0; s[n]; ++n )
2284
+ ;
2285
+
2286
+ return n;
2287
+ }
2288
+ #endif
2289
+
2290
+ void *yyalloc (yy_size_t size )
2291
+ {
2292
+ return (void *) malloc( size );
2293
+ }
2294
+
2295
+ void *yyrealloc (void * ptr, yy_size_t size )
2296
+ {
2297
+ /* The cast to (char *) in the following accommodates both
2298
+ * implementations that use char* generic pointers, and those
2299
+ * that use void* generic pointers. It works with the latter
2300
+ * because both ANSI C and C++ allow castless assignment from
2301
+ * any pointer type to void*, and deal with argument conversions
2302
+ * as though doing an assignment.
2303
+ */
2304
+ return (void *) realloc( (char *) ptr, size );
2305
+ }
2306
+
2307
+ void yyfree (void * ptr )
2308
+ {
2309
+ free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
2310
+ }
2311
+
2312
+ #define YYTABLES_NAME "yytables"
2313
+
2314
+ #line 177 "/Users/bakkdoor/projects/fancy/fancy/boot/rbx-compiler/parser/lexer.lex"