fancy 0.9.0 → 0.10.0

Sign up to get free protection for your applications and to get access to all the features.
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
@@ -82,14 +82,24 @@ class Fancy FDoc {
82
82
 
83
83
  @documented_objects = @documented_objects select_keys: |k| { @objects_to_remove includes?: k . not }
84
84
 
85
+ # display progress
86
+ t = Thread new: {
87
+ loop: {
88
+ "." print
89
+ sleep: 0.1
90
+ }
91
+ }
92
+
85
93
  # by now simply produce a apidoc/fancy.jsonp file.
86
94
  json = JSON new: @documented_objects add_github_links: add_github_links github_repo: github_repo
87
95
  json write: (File expand_path("fancy.jsonp", output_dir))
88
96
 
89
- ["Open your browser at " ++ output_dir ++ "index.html ",
97
+ ["\n\nOpen your browser at " ++ output_dir ++ "index.html ",
90
98
  " " ++ (json classes size) ++ " classes. ",
91
99
  " " ++ (json methods size) ++ " methods. ",
92
100
  " " ++ (json objects size) ++ " other objects. "] println
101
+
102
+ t kill
93
103
  }
94
104
 
95
105
 
@@ -99,17 +109,18 @@ class Fancy FDoc {
99
109
  def initialize: documented add_github_links: @add_github_links github_repo: @github_repo {
100
110
  @documented_objects = documented
101
111
 
102
- is_class = |o| { o kind_of?: Module }
103
- is_method = |o| { o kind_of?: Rubinius CompiledMethod }
104
- is_block = |o| { o kind_of?: Rubinius BlockEnvironment }
105
- all_other = |o| {
106
- [is_class, is_method, is_block] all?() |b| { b call: [o] == false }
112
+ class? = @{ kind_of?: Module }
113
+ method? = @{ kind_of?: Rubinius CompiledMethod }
114
+ block? = @{ kind_of?: Rubinius BlockEnvironment }
115
+ other? = |o| {
116
+ [class?, method?, block?] any?: @{ call: [o] } . not
107
117
  }
108
118
 
109
- @classes = @documented_objects keys select: is_class
110
- @methods = @documented_objects keys select: is_method
111
- @blocks = @documented_objects keys select: is_block
112
- @objects = @documented_objects keys select: all_other
119
+ types = [class?, method?, block?, other?]
120
+
121
+ @classes, @methods, @blocks, @objects = types map: |type| {
122
+ @documented_objects keys select: type
123
+ }
113
124
  }
114
125
 
115
126
  def string_to_json: obj {
@@ -181,10 +192,15 @@ class Fancy FDoc {
181
192
  }
182
193
 
183
194
  def generate_map {
184
- map = <['title => "Fancy Documentation", 'date => Time now() to_s(),
185
- 'classes => <[]>, 'methods => <[]>, 'objects => <[]> ]>
195
+ map = <[
196
+ 'title => "Fancy Documentation",
197
+ 'date => Time now to_s,
198
+ 'classes => <[]>,
199
+ 'methods => <[]>,
200
+ 'objects => <[]>
201
+ ]>
186
202
 
187
- methods = @methods dup()
203
+ methods = @methods dup
188
204
 
189
205
  @classes each: |cls| {
190
206
  name = cls name gsub("::", " ")
@@ -193,7 +209,7 @@ class Fancy FDoc {
193
209
  'doc => doc format: 'fdoc,
194
210
  'instance_methods => <[]>,
195
211
  'methods => <[]>,
196
- 'ancestors => cls ancestors() map: |c| { (c name || "") gsub("::", " ") }
212
+ 'ancestors => cls ancestors map: @{ name to_s gsub("::", " ") }
197
213
  ]>
198
214
  popuplate_methods: cls on: attr type: 'instance_method known: methods
199
215
  popuplate_methods: cls on: attr type: 'method known: methods
@@ -201,7 +217,7 @@ class Fancy FDoc {
201
217
  }
202
218
 
203
219
  methods each: |cm| {
204
- cls = cm scope() module()
220
+ cls = cm scope module
205
221
  cls_name = cls name gsub("::", " ")
206
222
  cls_attr = map['classes][cls_name]
207
223
 
@@ -223,7 +239,7 @@ class Fancy FDoc {
223
239
  map = generate_map
224
240
  json = to_json: map
225
241
  js = "(function() { #{name}(#{@add_github_links}, #{@github_repo inspect}, #{json}); })();"
226
- File open: filename modes: ['write] with: |out| { out print: js }
242
+ File open: filename modes: ['write] with: @{ print: js }
227
243
  }
228
244
  }
229
245
 
@@ -186,15 +186,40 @@ class FutureSend {
186
186
  }
187
187
 
188
188
  class FutureCollection {
189
+ """
190
+ Helper class for dealing with a collection of @FutureSend@s.
191
+ Implements the @Fancy::Enumerable@ interface.
192
+ """
193
+
189
194
  include: Fancy Enumerable
190
195
 
196
+ def self [futures] {
197
+ """
198
+ @futures @Fany::Enumerable@ of @FutureSend@s.
199
+ @return @FutureCollection@ for @futures.
200
+ """
201
+
202
+ new: futures
203
+ }
204
+
191
205
  def initialize: @futures
192
206
 
193
207
  def each: block {
208
+ """
209
+ @block @Block@ to be called with the value of each future.
210
+
211
+ Calls @block with each value of each future in @self.
212
+ Registers @block as a continuation for each future.
213
+ """
214
+
194
215
  @futures each: @{ when_done: block }
195
216
  }
196
217
 
197
218
  def await_all {
198
- @futures each: 'value
219
+ """
220
+ Awaits all futures in @self to complete, before returning.
221
+ """
222
+
223
+ @futures each: @{ value }
199
224
  }
200
225
  }
@@ -394,10 +394,13 @@ class Object {
394
394
  def backtick: str {
395
395
  """
396
396
  This is the default implementation for backtick: which gets called when using the backtick syntax.
397
+
397
398
  For example:
398
399
  `cat README`
400
+
399
401
  Gets translated to the following message send:
400
402
  self backtick: \"cat README\"
403
+
401
404
  Which allows for custom implementations of the backtick: method, if needed.
402
405
  This default implementation works the same way as in Ruby, Perl or Bash.
403
406
  It returns the output of running the given string on the command line as a @String@.
@@ -683,7 +686,7 @@ class Object {
683
686
  @return @Array@ of slot names that @self has.
684
687
  """
685
688
 
686
- instance_variables map: @{ rest to_sym }
689
+ instance_variables map: @{ to_s rest to_sym }
687
690
  }
688
691
 
689
692
  def sleep: seconds {
@@ -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/lib/parser/ext
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 = ext.c lexer.c parser.c
113
+ OBJS = ext.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,2442 @@
1
+ #line 2 "/Users/bakkdoor/projects/fancy/fancy/lib/parser/ext/lexer.c"
2
+
3
+ #line 4 "/Users/bakkdoor/projects/fancy/fancy/lib/parser/ext/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 56
376
+ #define YY_END_OF_BUFFER 57
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[205] =
385
+ { 0,
386
+ 52, 52, 57, 55, 52, 54, 52, 26, 55, 51,
387
+ 50, 26, 55, 11, 12, 26, 46, 26, 49, 26,
388
+ 6, 6, 48, 47, 26, 25, 13, 41, 41, 18,
389
+ 55, 19, 37, 55, 37, 37, 37, 37, 37, 37,
390
+ 37, 16, 22, 17, 52, 0, 0, 26, 40, 0,
391
+ 8, 0, 51, 26, 39, 37, 38, 37, 0, 44,
392
+ 44, 44, 0, 44, 0, 44, 44, 6, 24, 0,
393
+ 26, 40, 26, 0, 6, 0, 0, 0, 0, 0,
394
+ 20, 23, 37, 14, 15, 41, 39, 41, 38, 0,
395
+ 0, 0, 53, 21, 0, 0, 9, 37, 37, 37,
396
+
397
+ 37, 37, 37, 37, 37, 37, 26, 26, 8, 0,
398
+ 0, 0, 44, 44, 44, 44, 44, 44, 0, 44,
399
+ 44, 44, 44, 44, 44, 44, 45, 7, 5, 4,
400
+ 3, 43, 37, 37, 0, 0, 0, 9, 37, 37,
401
+ 37, 2, 37, 37, 37, 37, 37, 29, 26, 0,
402
+ 0, 0, 44, 44, 44, 44, 44, 44, 44, 44,
403
+ 44, 44, 43, 43, 0, 42, 36, 37, 37, 37,
404
+ 37, 37, 37, 34, 37, 0, 44, 44, 44, 0,
405
+ 42, 42, 0, 30, 1, 37, 35, 32, 37, 33,
406
+ 10, 43, 37, 28, 43, 43, 31, 37, 37, 37,
407
+
408
+ 37, 37, 27, 0
409
+ } ;
410
+
411
+ static yyconst flex_int32_t yy_ec[256] =
412
+ { 0,
413
+ 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
414
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
415
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
416
+ 1, 4, 5, 6, 7, 8, 5, 9, 10, 11,
417
+ 12, 9, 13, 14, 15, 16, 17, 18, 19, 20,
418
+ 20, 20, 20, 20, 20, 21, 21, 22, 23, 24,
419
+ 25, 26, 5, 27, 28, 29, 28, 28, 28, 28,
420
+ 30, 30, 30, 30, 30, 31, 30, 30, 32, 30,
421
+ 30, 30, 30, 30, 30, 30, 30, 33, 30, 30,
422
+ 34, 35, 36, 5, 37, 38, 39, 40, 41, 42,
423
+
424
+ 43, 44, 45, 46, 47, 45, 45, 48, 49, 50,
425
+ 51, 52, 45, 53, 54, 55, 56, 45, 45, 57,
426
+ 58, 45, 59, 60, 61, 5, 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
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
432
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
433
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
434
+
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, 1, 1, 1, 1, 1,
438
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
439
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
440
+ 1, 1, 1, 1, 1
441
+ } ;
442
+
443
+ static yyconst flex_int32_t yy_meta[62] =
444
+ { 0,
445
+ 1, 1, 2, 1, 3, 1, 1, 1, 4, 1,
446
+ 5, 1, 3, 1, 3, 1, 3, 6, 6, 6,
447
+ 6, 7, 1, 3, 3, 3, 8, 9, 9, 10,
448
+ 10, 10, 10, 11, 1, 1, 12, 1, 13, 13,
449
+ 13, 13, 13, 13, 14, 14, 14, 14, 14, 14,
450
+ 14, 14, 14, 14, 14, 14, 14, 14, 15, 1,
451
+ 1
452
+ } ;
453
+
454
+ static yyconst flex_int16_t yy_base[224] =
455
+ { 0,
456
+ 0, 0, 514, 1121, 60, 1121, 61, 62, 60, 0,
457
+ 1121, 117, 151, 1121, 1121, 63, 1121, 78, 1121, 120,
458
+ 196, 87, 480, 1121, 57, 226, 42, 249, 282, 1121,
459
+ 497, 472, 316, 55, 37, 453, 447, 454, 449, 57,
460
+ 431, 1121, 423, 1121, 68, 478, 476, 252, 1121, 74,
461
+ 465, 465, 0, 285, 1121, 0, 1121, 0, 93, 0,
462
+ 350, 0, 418, 407, 407, 0, 382, 99, 319, 413,
463
+ 461, 404, 464, 129, 203, 93, 139, 0, 151, 251,
464
+ 1121, 486, 508, 159, 1121, 204, 1121, 207, 397, 88,
465
+ 127, 415, 1121, 1121, 192, 311, 1121, 97, 378, 371,
466
+
467
+ 364, 358, 354, 338, 321, 306, 351, 345, 1121, 214,
468
+ 344, 343, 0, 0, 0, 542, 0, 0, 312, 0,
469
+ 0, 0, 0, 0, 0, 598, 320, 297, 237, 332,
470
+ 0, 654, 687, 0, 476, 254, 323, 322, 292, 282,
471
+ 268, 0, 274, 271, 332, 261, 260, 0, 274, 266,
472
+ 264, 265, 0, 0, 0, 0, 0, 0, 0, 199,
473
+ 511, 0, 720, 0, 226, 753, 0, 200, 190, 190,
474
+ 188, 174, 173, 0, 136, 181, 0, 0, 0, 510,
475
+ 786, 0, 152, 0, 0, 115, 0, 0, 111, 0,
476
+ 1121, 819, 82, 101, 852, 0, 0, 79, 65, 73,
477
+
478
+ 63, 44, 0, 1121, 889, 904, 917, 929, 935, 948,
479
+ 956, 969, 983, 998, 1010, 1019, 1030, 1044, 1057, 1069,
480
+ 1082, 1094, 1106
481
+ } ;
482
+
483
+ static yyconst flex_int16_t yy_def[224] =
484
+ { 0,
485
+ 204, 1, 204, 204, 204, 204, 204, 204, 205, 206,
486
+ 204, 207, 204, 204, 204, 208, 204, 208, 204, 209,
487
+ 204, 204, 204, 204, 210, 204, 211, 212, 212, 204,
488
+ 213, 204, 207, 214, 33, 33, 33, 33, 33, 33,
489
+ 33, 204, 204, 204, 204, 204, 204, 204, 204, 205,
490
+ 204, 205, 206, 33, 204, 33, 204, 33, 204, 13,
491
+ 204, 13, 215, 204, 204, 61, 13, 204, 204, 209,
492
+ 209, 209, 209, 204, 204, 204, 204, 216, 204, 204,
493
+ 204, 204, 217, 211, 204, 29, 204, 29, 204, 205,
494
+ 214, 213, 204, 204, 214, 218, 204, 33, 33, 33,
495
+
496
+ 33, 33, 33, 33, 33, 33, 219, 204, 204, 220,
497
+ 204, 204, 61, 61, 61, 204, 61, 61, 215, 64,
498
+ 116, 64, 64, 116, 116, 13, 209, 204, 204, 204,
499
+ 216, 221, 217, 133, 204, 214, 218, 214, 33, 33,
500
+ 33, 33, 33, 33, 33, 33, 33, 33, 219, 220,
501
+ 204, 220, 13, 116, 116, 116, 116, 116, 116, 126,
502
+ 61, 161, 221, 163, 204, 222, 33, 33, 33, 33,
503
+ 33, 33, 33, 33, 33, 204, 161, 161, 161, 204,
504
+ 222, 181, 204, 33, 33, 33, 33, 33, 33, 33,
505
+ 204, 223, 33, 33, 223, 195, 33, 33, 33, 33,
506
+
507
+ 33, 33, 33, 0, 204, 204, 204, 204, 204, 204,
508
+ 204, 204, 204, 204, 204, 204, 204, 204, 204, 204,
509
+ 204, 204, 204
510
+ } ;
511
+
512
+ static yyconst flex_int16_t yy_nxt[1183] =
513
+ { 0,
514
+ 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
515
+ 14, 15, 16, 17, 18, 19, 20, 21, 22, 22,
516
+ 22, 23, 24, 25, 26, 8, 27, 28, 28, 28,
517
+ 29, 28, 28, 30, 31, 32, 33, 34, 33, 33,
518
+ 35, 36, 33, 37, 33, 33, 33, 33, 38, 33,
519
+ 33, 33, 39, 40, 41, 33, 33, 33, 42, 43,
520
+ 44, 45, 45, 45, 45, 51, 48, 49, 84, 45,
521
+ 48, 45, 49, 49, 48, 98, 48, 46, 48, 109,
522
+ 68, 68, 68, 68, 99, 48, 48, 48, 49, 96,
523
+ 81, 203, 97, 51, 52, 68, 68, 68, 68, 104,
524
+
525
+ 85, 202, 74, 69, 75, 75, 75, 75, 52, 111,
526
+ 129, 129, 105, 201, 74, 200, 75, 75, 75, 75,
527
+ 47, 54, 52, 79, 71, 54, 199, 55, 71, 54,
528
+ 72, 54, 71, 54, 71, 79, 73, 198, 57, 197,
529
+ 54, 54, 54, 71, 71, 71, 128, 128, 128, 128,
530
+ 139, 140, 112, 58, 59, 60, 130, 130, 130, 61,
531
+ 194, 96, 193, 60, 97, 60, 62, 60, 75, 75,
532
+ 75, 75, 62, 135, 60, 60, 60, 63, 64, 64,
533
+ 64, 64, 64, 64, 65, 204, 191, 66, 190, 66,
534
+ 66, 66, 66, 66, 66, 66, 66, 66, 66, 66,
535
+
536
+ 66, 66, 66, 66, 66, 66, 66, 66, 66, 204,
537
+ 67, 74, 204, 75, 75, 75, 75, 204, 74, 151,
538
+ 75, 75, 75, 75, 76, 189, 96, 77, 78, 97,
539
+ 48, 188, 79, 187, 48, 76, 49, 186, 48, 79,
540
+ 48, 204, 48, 185, 204, 184, 77, 180, 152, 48,
541
+ 48, 82, 78, 86, 129, 129, 48, 86, 67, 87,
542
+ 48, 86, 49, 86, 48, 86, 48, 204, 48, 176,
543
+ 89, 151, 86, 86, 86, 48, 48, 48, 132, 132,
544
+ 132, 132, 132, 132, 49, 86, 86, 90, 96, 54,
545
+ 86, 97, 87, 54, 86, 55, 86, 54, 86, 54,
546
+
547
+ 152, 54, 175, 89, 174, 86, 86, 86, 54, 54,
548
+ 54, 171, 170, 95, 128, 128, 128, 128, 86, 91,
549
+ 58, 169, 168, 48, 58, 95, 87, 48, 58, 49,
550
+ 58, 48, 58, 48, 167, 48, 127, 57, 204, 58,
551
+ 58, 58, 48, 48, 48, 137, 153, 153, 138, 130,
552
+ 130, 130, 58, 59, 113, 49, 96, 137, 114, 97,
553
+ 138, 49, 113, 148, 113, 62, 113, 115, 115, 115,
554
+ 115, 62, 147, 113, 113, 113, 63, 116, 116, 116,
555
+ 116, 116, 116, 65, 172, 146, 117, 173, 118, 118,
556
+ 118, 118, 118, 118, 118, 118, 118, 118, 118, 118,
557
+
558
+ 118, 118, 118, 118, 118, 118, 118, 118, 145, 67,
559
+ 59, 120, 144, 143, 142, 121, 141, 93, 135, 120,
560
+ 127, 120, 62, 120, 122, 122, 122, 122, 62, 127,
561
+ 120, 120, 120, 63, 123, 123, 123, 123, 123, 123,
562
+ 65, 126, 62, 124, 119, 125, 125, 125, 125, 125,
563
+ 125, 125, 125, 125, 125, 125, 125, 125, 125, 125,
564
+ 125, 125, 125, 125, 125, 71, 67, 204, 71, 71,
565
+ 110, 72, 71, 71, 72, 71, 71, 73, 71, 108,
566
+ 73, 108, 107, 106, 71, 71, 71, 71, 71, 71,
567
+ 48, 103, 102, 101, 48, 100, 49, 94, 48, 93,
568
+
569
+ 48, 80, 48, 166, 166, 166, 166, 166, 166, 48,
570
+ 48, 48, 133, 204, 204, 177, 133, 204, 87, 178,
571
+ 133, 204, 133, 177, 133, 177, 204, 177, 204, 204,
572
+ 204, 133, 133, 133, 177, 177, 177, 192, 192, 192,
573
+ 192, 192, 192, 204, 133, 59, 154, 179, 204, 204,
574
+ 155, 204, 204, 204, 154, 204, 154, 62, 154, 156,
575
+ 156, 156, 156, 62, 204, 154, 154, 154, 63, 157,
576
+ 157, 157, 157, 157, 157, 65, 204, 204, 158, 204,
577
+ 159, 159, 159, 159, 159, 159, 159, 159, 159, 159,
578
+ 159, 159, 159, 159, 159, 159, 159, 159, 159, 159,
579
+
580
+ 204, 67, 160, 204, 204, 204, 161, 204, 204, 204,
581
+ 160, 204, 160, 204, 160, 204, 204, 204, 204, 204,
582
+ 204, 160, 160, 160, 204, 204, 204, 204, 204, 204,
583
+ 204, 204, 204, 204, 162, 204, 204, 204, 204, 204,
584
+ 204, 204, 204, 204, 204, 204, 204, 204, 204, 204,
585
+ 204, 204, 204, 204, 204, 204, 204, 126, 163, 204,
586
+ 204, 204, 163, 204, 204, 204, 163, 204, 163, 204,
587
+ 163, 204, 204, 204, 204, 165, 204, 163, 163, 163,
588
+ 204, 204, 204, 204, 204, 204, 204, 204, 204, 204,
589
+ 163, 133, 204, 204, 204, 133, 204, 87, 204, 133,
590
+
591
+ 204, 133, 204, 133, 204, 204, 204, 204, 204, 204,
592
+ 133, 133, 133, 204, 204, 204, 204, 204, 204, 204,
593
+ 204, 204, 204, 133, 163, 204, 204, 204, 163, 204,
594
+ 204, 204, 163, 204, 163, 204, 163, 204, 204, 204,
595
+ 204, 165, 204, 163, 163, 163, 204, 204, 204, 204,
596
+ 204, 204, 204, 204, 204, 204, 163, 181, 204, 204,
597
+ 204, 181, 204, 204, 204, 181, 204, 181, 204, 181,
598
+ 204, 204, 204, 204, 183, 204, 181, 181, 181, 204,
599
+ 204, 204, 204, 204, 204, 204, 204, 204, 204, 181,
600
+ 181, 204, 204, 204, 181, 204, 204, 204, 181, 204,
601
+
602
+ 181, 204, 181, 204, 204, 204, 204, 183, 204, 181,
603
+ 181, 181, 204, 204, 204, 204, 204, 204, 204, 204,
604
+ 204, 204, 181, 195, 204, 204, 204, 195, 204, 204,
605
+ 204, 195, 204, 195, 204, 195, 204, 204, 204, 204,
606
+ 165, 204, 195, 195, 195, 204, 204, 204, 204, 204,
607
+ 204, 204, 204, 204, 204, 195, 195, 204, 204, 204,
608
+ 195, 204, 204, 204, 195, 204, 195, 204, 195, 204,
609
+ 204, 204, 204, 165, 204, 195, 195, 195, 204, 204,
610
+ 204, 204, 204, 204, 204, 204, 204, 204, 195, 50,
611
+ 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
612
+
613
+ 50, 50, 50, 50, 53, 204, 53, 53, 53, 53,
614
+ 53, 53, 53, 53, 53, 53, 53, 53, 53, 56,
615
+ 56, 56, 56, 56, 204, 56, 56, 204, 56, 56,
616
+ 56, 48, 48, 48, 48, 70, 204, 70, 70, 70,
617
+ 70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
618
+ 48, 48, 48, 204, 204, 204, 204, 204, 48, 83,
619
+ 204, 204, 204, 83, 204, 204, 204, 83, 83, 83,
620
+ 83, 88, 88, 88, 88, 88, 204, 88, 88, 204,
621
+ 88, 88, 88, 92, 92, 92, 92, 92, 92, 92,
622
+ 92, 92, 92, 92, 92, 92, 92, 92, 95, 95,
623
+
624
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
625
+ 95, 95, 95, 66, 204, 204, 204, 66, 204, 204,
626
+ 204, 66, 66, 66, 131, 204, 204, 131, 204, 204,
627
+ 204, 131, 134, 134, 134, 134, 204, 204, 134, 134,
628
+ 204, 134, 134, 134, 136, 136, 136, 136, 136, 136,
629
+ 136, 136, 136, 136, 136, 136, 136, 136, 136, 149,
630
+ 149, 149, 204, 204, 204, 204, 204, 204, 149, 150,
631
+ 150, 150, 150, 150, 150, 150, 150, 150, 150, 150,
632
+ 150, 150, 150, 150, 164, 164, 204, 164, 164, 204,
633
+ 164, 164, 204, 164, 164, 164, 182, 182, 204, 182,
634
+
635
+ 182, 204, 182, 182, 204, 182, 182, 182, 196, 196,
636
+ 204, 196, 196, 204, 196, 196, 204, 196, 196, 196,
637
+ 3, 204, 204, 204, 204, 204, 204, 204, 204, 204,
638
+ 204, 204, 204, 204, 204, 204, 204, 204, 204, 204,
639
+ 204, 204, 204, 204, 204, 204, 204, 204, 204, 204,
640
+ 204, 204, 204, 204, 204, 204, 204, 204, 204, 204,
641
+ 204, 204, 204, 204, 204, 204, 204, 204, 204, 204,
642
+ 204, 204, 204, 204, 204, 204, 204, 204, 204, 204,
643
+ 204, 204
644
+ } ;
645
+
646
+ static yyconst flex_int16_t yy_chk[1183] =
647
+ { 0,
648
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
649
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
650
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
651
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
652
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
653
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
654
+ 1, 5, 7, 5, 7, 9, 8, 25, 27, 45,
655
+ 8, 45, 8, 16, 8, 35, 8, 7, 8, 50,
656
+ 16, 16, 16, 16, 35, 8, 8, 8, 18, 34,
657
+ 25, 202, 34, 90, 9, 18, 18, 18, 18, 40,
658
+
659
+ 27, 201, 22, 18, 22, 22, 22, 22, 50, 59,
660
+ 76, 76, 40, 200, 68, 199, 68, 68, 68, 68,
661
+ 7, 12, 90, 22, 20, 12, 198, 12, 20, 12,
662
+ 20, 12, 20, 12, 20, 68, 20, 194, 12, 193,
663
+ 12, 12, 12, 20, 20, 20, 74, 74, 74, 74,
664
+ 98, 98, 59, 12, 13, 13, 77, 77, 77, 13,
665
+ 189, 91, 186, 13, 91, 13, 13, 13, 79, 79,
666
+ 79, 79, 13, 183, 13, 13, 13, 13, 13, 13,
667
+ 13, 13, 13, 13, 13, 84, 176, 13, 175, 13,
668
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
669
+
670
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 86,
671
+ 13, 21, 88, 21, 21, 21, 21, 84, 75, 110,
672
+ 75, 75, 75, 75, 21, 173, 95, 21, 21, 95,
673
+ 26, 172, 21, 171, 26, 21, 26, 170, 26, 75,
674
+ 26, 86, 26, 169, 88, 168, 21, 165, 110, 26,
675
+ 26, 26, 21, 28, 129, 129, 48, 28, 160, 28,
676
+ 48, 28, 48, 28, 48, 28, 48, 152, 48, 151,
677
+ 28, 150, 28, 28, 28, 48, 48, 48, 80, 80,
678
+ 80, 80, 80, 80, 149, 28, 29, 29, 136, 54,
679
+ 29, 136, 29, 54, 29, 54, 29, 54, 29, 54,
680
+
681
+ 150, 54, 147, 29, 146, 29, 29, 29, 54, 54,
682
+ 54, 144, 143, 96, 128, 128, 128, 128, 29, 29,
683
+ 33, 141, 140, 69, 33, 137, 33, 69, 33, 69,
684
+ 33, 69, 33, 69, 139, 69, 127, 33, 119, 33,
685
+ 33, 33, 69, 69, 69, 96, 112, 111, 96, 130,
686
+ 130, 130, 33, 61, 61, 108, 138, 137, 61, 138,
687
+ 137, 107, 61, 106, 61, 61, 61, 61, 61, 61,
688
+ 61, 61, 105, 61, 61, 61, 61, 61, 61, 61,
689
+ 61, 61, 61, 61, 145, 104, 61, 145, 61, 61,
690
+ 61, 61, 61, 61, 61, 61, 61, 61, 61, 61,
691
+
692
+ 61, 61, 61, 61, 61, 61, 61, 61, 103, 61,
693
+ 64, 64, 102, 101, 100, 64, 99, 92, 89, 64,
694
+ 72, 64, 64, 64, 64, 64, 64, 64, 64, 70,
695
+ 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
696
+ 64, 67, 65, 64, 63, 64, 64, 64, 64, 64,
697
+ 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
698
+ 64, 64, 64, 64, 64, 71, 64, 52, 73, 71,
699
+ 51, 71, 73, 71, 73, 71, 73, 71, 73, 47,
700
+ 73, 46, 43, 41, 71, 71, 71, 73, 73, 73,
701
+ 82, 39, 38, 37, 82, 36, 82, 32, 82, 31,
702
+
703
+ 82, 23, 82, 135, 135, 135, 135, 135, 135, 82,
704
+ 82, 82, 83, 3, 0, 161, 83, 0, 83, 161,
705
+ 83, 0, 83, 161, 83, 161, 0, 161, 0, 0,
706
+ 0, 83, 83, 83, 161, 161, 161, 180, 180, 180,
707
+ 180, 180, 180, 0, 83, 116, 116, 161, 0, 0,
708
+ 116, 0, 0, 0, 116, 0, 116, 116, 116, 116,
709
+ 116, 116, 116, 116, 0, 116, 116, 116, 116, 116,
710
+ 116, 116, 116, 116, 116, 116, 0, 0, 116, 0,
711
+ 116, 116, 116, 116, 116, 116, 116, 116, 116, 116,
712
+ 116, 116, 116, 116, 116, 116, 116, 116, 116, 116,
713
+
714
+ 0, 116, 126, 0, 0, 0, 126, 0, 0, 0,
715
+ 126, 0, 126, 0, 126, 0, 0, 0, 0, 0,
716
+ 0, 126, 126, 126, 0, 0, 0, 0, 0, 0,
717
+ 0, 0, 0, 0, 126, 0, 0, 0, 0, 0,
718
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
719
+ 0, 0, 0, 0, 0, 0, 0, 126, 132, 0,
720
+ 0, 0, 132, 0, 0, 0, 132, 0, 132, 0,
721
+ 132, 0, 0, 0, 0, 132, 0, 132, 132, 132,
722
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
723
+ 132, 133, 0, 0, 0, 133, 0, 133, 0, 133,
724
+
725
+ 0, 133, 0, 133, 0, 0, 0, 0, 0, 0,
726
+ 133, 133, 133, 0, 0, 0, 0, 0, 0, 0,
727
+ 0, 0, 0, 133, 163, 0, 0, 0, 163, 0,
728
+ 0, 0, 163, 0, 163, 0, 163, 0, 0, 0,
729
+ 0, 163, 0, 163, 163, 163, 0, 0, 0, 0,
730
+ 0, 0, 0, 0, 0, 0, 163, 166, 0, 0,
731
+ 0, 166, 0, 0, 0, 166, 0, 166, 0, 166,
732
+ 0, 0, 0, 0, 166, 0, 166, 166, 166, 0,
733
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 166,
734
+ 181, 0, 0, 0, 181, 0, 0, 0, 181, 0,
735
+
736
+ 181, 0, 181, 0, 0, 0, 0, 181, 0, 181,
737
+ 181, 181, 0, 0, 0, 0, 0, 0, 0, 0,
738
+ 0, 0, 181, 192, 0, 0, 0, 192, 0, 0,
739
+ 0, 192, 0, 192, 0, 192, 0, 0, 0, 0,
740
+ 192, 0, 192, 192, 192, 0, 0, 0, 0, 0,
741
+ 0, 0, 0, 0, 0, 192, 195, 0, 0, 0,
742
+ 195, 0, 0, 0, 195, 0, 195, 0, 195, 0,
743
+ 0, 0, 0, 195, 0, 195, 195, 195, 0, 0,
744
+ 0, 0, 0, 0, 0, 0, 0, 0, 195, 205,
745
+ 205, 205, 205, 205, 205, 205, 205, 205, 205, 205,
746
+
747
+ 205, 205, 205, 205, 206, 0, 206, 206, 206, 206,
748
+ 206, 206, 206, 206, 206, 206, 206, 206, 206, 207,
749
+ 207, 207, 207, 207, 0, 207, 207, 0, 207, 207,
750
+ 207, 208, 208, 208, 208, 209, 0, 209, 209, 209,
751
+ 209, 209, 209, 209, 209, 209, 209, 209, 209, 209,
752
+ 210, 210, 210, 0, 0, 0, 0, 0, 210, 211,
753
+ 0, 0, 0, 211, 0, 0, 0, 211, 211, 211,
754
+ 211, 212, 212, 212, 212, 212, 0, 212, 212, 0,
755
+ 212, 212, 212, 213, 213, 213, 213, 213, 213, 213,
756
+ 213, 213, 213, 213, 213, 213, 213, 213, 214, 214,
757
+
758
+ 214, 214, 214, 214, 214, 214, 214, 214, 214, 214,
759
+ 214, 214, 214, 215, 0, 0, 0, 215, 0, 0,
760
+ 0, 215, 215, 215, 216, 0, 0, 216, 0, 0,
761
+ 0, 216, 217, 217, 217, 217, 0, 0, 217, 217,
762
+ 0, 217, 217, 217, 218, 218, 218, 218, 218, 218,
763
+ 218, 218, 218, 218, 218, 218, 218, 218, 218, 219,
764
+ 219, 219, 0, 0, 0, 0, 0, 0, 219, 220,
765
+ 220, 220, 220, 220, 220, 220, 220, 220, 220, 220,
766
+ 220, 220, 220, 220, 221, 221, 0, 221, 221, 0,
767
+ 221, 221, 0, 221, 221, 221, 222, 222, 0, 222,
768
+
769
+ 222, 0, 222, 222, 0, 222, 222, 222, 223, 223,
770
+ 0, 223, 223, 0, 223, 223, 0, 223, 223, 223,
771
+ 204, 204, 204, 204, 204, 204, 204, 204, 204, 204,
772
+ 204, 204, 204, 204, 204, 204, 204, 204, 204, 204,
773
+ 204, 204, 204, 204, 204, 204, 204, 204, 204, 204,
774
+ 204, 204, 204, 204, 204, 204, 204, 204, 204, 204,
775
+ 204, 204, 204, 204, 204, 204, 204, 204, 204, 204,
776
+ 204, 204, 204, 204, 204, 204, 204, 204, 204, 204,
777
+ 204, 204
778
+ } ;
779
+
780
+ /* Table of booleans, true if rule could match eol. */
781
+ static yyconst flex_int32_t yy_rule_can_match_eol[57] =
782
+ { 0,
783
+ 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
784
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
785
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, };
786
+
787
+ static yy_state_type yy_last_accepting_state;
788
+ static char *yy_last_accepting_cpos;
789
+
790
+ extern int yy_flex_debug;
791
+ int yy_flex_debug = 0;
792
+
793
+ /* The intent behind this definition is that it'll catch
794
+ * any uses of REJECT which flex missed.
795
+ */
796
+ #define REJECT reject_used_but_not_detected
797
+ #define yymore() yymore_used_but_not_detected
798
+ #define YY_MORE_ADJ 0
799
+ #define YY_RESTORE_YY_MORE_OFFSET
800
+ char *yytext;
801
+ #line 1 "/Users/bakkdoor/projects/fancy/fancy/lib/parser/ext/lexer.lex"
802
+ #line 2 "/Users/bakkdoor/projects/fancy/fancy/lib/parser/ext/lexer.lex"
803
+ #include "ruby.h"
804
+ #include "parser.h"
805
+
806
+ int yyerror(VALUE self, char *s);
807
+ #line 808 "/Users/bakkdoor/projects/fancy/fancy/lib/parser/ext/lexer.c"
808
+
809
+ #define INITIAL 0
810
+
811
+ #ifndef YY_NO_UNISTD_H
812
+ /* Special case for "unistd.h", since it is non-ANSI. We include it way
813
+ * down here because we want the user's section 1 to have been scanned first.
814
+ * The user has a chance to override it with an option.
815
+ */
816
+ #include <unistd.h>
817
+ #endif
818
+
819
+ #ifndef YY_EXTRA_TYPE
820
+ #define YY_EXTRA_TYPE void *
821
+ #endif
822
+
823
+ static int yy_init_globals (void );
824
+
825
+ /* Accessor methods to globals.
826
+ These are made visible to non-reentrant scanners for convenience. */
827
+
828
+ int yylex_destroy (void );
829
+
830
+ int yyget_debug (void );
831
+
832
+ void yyset_debug (int debug_flag );
833
+
834
+ YY_EXTRA_TYPE yyget_extra (void );
835
+
836
+ void yyset_extra (YY_EXTRA_TYPE user_defined );
837
+
838
+ FILE *yyget_in (void );
839
+
840
+ void yyset_in (FILE * in_str );
841
+
842
+ FILE *yyget_out (void );
843
+
844
+ void yyset_out (FILE * out_str );
845
+
846
+ yy_size_t yyget_leng (void );
847
+
848
+ char *yyget_text (void );
849
+
850
+ int yyget_lineno (void );
851
+
852
+ void yyset_lineno (int line_number );
853
+
854
+ /* Macros after this point can all be overridden by user definitions in
855
+ * section 1.
856
+ */
857
+
858
+ #ifndef YY_SKIP_YYWRAP
859
+ #ifdef __cplusplus
860
+ extern "C" int yywrap (void );
861
+ #else
862
+ extern int yywrap (void );
863
+ #endif
864
+ #endif
865
+
866
+ static void yyunput (int c,char *buf_ptr );
867
+
868
+ #ifndef yytext_ptr
869
+ static void yy_flex_strncpy (char *,yyconst char *,int );
870
+ #endif
871
+
872
+ #ifdef YY_NEED_STRLEN
873
+ static int yy_flex_strlen (yyconst char * );
874
+ #endif
875
+
876
+ #ifndef YY_NO_INPUT
877
+
878
+ #ifdef __cplusplus
879
+ static int yyinput (void );
880
+ #else
881
+ static int input (void );
882
+ #endif
883
+
884
+ #endif
885
+
886
+ /* Amount of stuff to slurp up with each read. */
887
+ #ifndef YY_READ_BUF_SIZE
888
+ #define YY_READ_BUF_SIZE 8192
889
+ #endif
890
+
891
+ /* Copy whatever the last rule matched to the standard output. */
892
+ #ifndef ECHO
893
+ /* This used to be an fputs(), but since the string might contain NUL's,
894
+ * we now use fwrite().
895
+ */
896
+ #define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
897
+ #endif
898
+
899
+ /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
900
+ * is returned in "result".
901
+ */
902
+ #ifndef YY_INPUT
903
+ #define YY_INPUT(buf,result,max_size) \
904
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
905
+ { \
906
+ int c = '*'; \
907
+ size_t n; \
908
+ for ( n = 0; n < max_size && \
909
+ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
910
+ buf[n] = (char) c; \
911
+ if ( c == '\n' ) \
912
+ buf[n++] = (char) c; \
913
+ if ( c == EOF && ferror( yyin ) ) \
914
+ YY_FATAL_ERROR( "input in flex scanner failed" ); \
915
+ result = n; \
916
+ } \
917
+ else \
918
+ { \
919
+ errno=0; \
920
+ while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
921
+ { \
922
+ if( errno != EINTR) \
923
+ { \
924
+ YY_FATAL_ERROR( "input in flex scanner failed" ); \
925
+ break; \
926
+ } \
927
+ errno=0; \
928
+ clearerr(yyin); \
929
+ } \
930
+ }\
931
+ \
932
+
933
+ #endif
934
+
935
+ /* No semi-colon after return; correct usage is to write "yyterminate();" -
936
+ * we don't want an extra ';' after the "return" because that will cause
937
+ * some compilers to complain about unreachable statements.
938
+ */
939
+ #ifndef yyterminate
940
+ #define yyterminate() return YY_NULL
941
+ #endif
942
+
943
+ /* Number of entries by which start-condition stack grows. */
944
+ #ifndef YY_START_STACK_INCR
945
+ #define YY_START_STACK_INCR 25
946
+ #endif
947
+
948
+ /* Report a fatal error. */
949
+ #ifndef YY_FATAL_ERROR
950
+ #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
951
+ #endif
952
+
953
+ /* end tables serialization structures and prototypes */
954
+
955
+ /* Default declaration of generated scanner - a define so the user can
956
+ * easily add parameters.
957
+ */
958
+ #ifndef YY_DECL
959
+ #define YY_DECL_IS_OURS 1
960
+
961
+ extern int yylex (void);
962
+
963
+ #define YY_DECL int yylex (void)
964
+ #endif /* !YY_DECL */
965
+
966
+ /* Code executed at the beginning of each rule, after yytext and yyleng
967
+ * have been set up.
968
+ */
969
+ #ifndef YY_USER_ACTION
970
+ #define YY_USER_ACTION
971
+ #endif
972
+
973
+ /* Code executed at the end of each rule. */
974
+ #ifndef YY_BREAK
975
+ #define YY_BREAK break;
976
+ #endif
977
+
978
+ #define YY_RULE_SETUP \
979
+ YY_USER_ACTION
980
+
981
+ /** The main scanner function which does all the work.
982
+ */
983
+ YY_DECL
984
+ {
985
+ register yy_state_type yy_current_state;
986
+ register char *yy_cp, *yy_bp;
987
+ register int yy_act;
988
+
989
+ #line 74 "/Users/bakkdoor/projects/fancy/fancy/lib/parser/ext/lexer.lex"
990
+
991
+
992
+ #line 993 "/Users/bakkdoor/projects/fancy/fancy/lib/parser/ext/lexer.c"
993
+
994
+ if ( !(yy_init) )
995
+ {
996
+ (yy_init) = 1;
997
+
998
+ #ifdef YY_USER_INIT
999
+ YY_USER_INIT;
1000
+ #endif
1001
+
1002
+ if ( ! (yy_start) )
1003
+ (yy_start) = 1; /* first start state */
1004
+
1005
+ if ( ! yyin )
1006
+ yyin = stdin;
1007
+
1008
+ if ( ! yyout )
1009
+ yyout = stdout;
1010
+
1011
+ if ( ! YY_CURRENT_BUFFER ) {
1012
+ yyensure_buffer_stack ();
1013
+ YY_CURRENT_BUFFER_LVALUE =
1014
+ yy_create_buffer(yyin,YY_BUF_SIZE );
1015
+ }
1016
+
1017
+ yy_load_buffer_state( );
1018
+ }
1019
+
1020
+ while ( 1 ) /* loops until end-of-file is reached */
1021
+ {
1022
+ yy_cp = (yy_c_buf_p);
1023
+
1024
+ /* Support of yytext. */
1025
+ *yy_cp = (yy_hold_char);
1026
+
1027
+ /* yy_bp points to the position in yy_ch_buf of the start of
1028
+ * the current run.
1029
+ */
1030
+ yy_bp = yy_cp;
1031
+
1032
+ yy_current_state = (yy_start);
1033
+ yy_match:
1034
+ do
1035
+ {
1036
+ register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
1037
+ if ( yy_accept[yy_current_state] )
1038
+ {
1039
+ (yy_last_accepting_state) = yy_current_state;
1040
+ (yy_last_accepting_cpos) = yy_cp;
1041
+ }
1042
+ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1043
+ {
1044
+ yy_current_state = (int) yy_def[yy_current_state];
1045
+ if ( yy_current_state >= 205 )
1046
+ yy_c = yy_meta[(unsigned int) yy_c];
1047
+ }
1048
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1049
+ ++yy_cp;
1050
+ }
1051
+ while ( yy_base[yy_current_state] != 1121 );
1052
+
1053
+ yy_find_action:
1054
+ yy_act = yy_accept[yy_current_state];
1055
+ if ( yy_act == 0 )
1056
+ { /* have to back up */
1057
+ yy_cp = (yy_last_accepting_cpos);
1058
+ yy_current_state = (yy_last_accepting_state);
1059
+ yy_act = yy_accept[yy_current_state];
1060
+ }
1061
+
1062
+ YY_DO_BEFORE_ACTION;
1063
+
1064
+ if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )
1065
+ {
1066
+ int yyl;
1067
+ for ( yyl = 0; yyl < yyleng; ++yyl )
1068
+ if ( yytext[yyl] == '\n' )
1069
+
1070
+ yylineno++;
1071
+ ;
1072
+ }
1073
+
1074
+ do_action: /* This label is used only to access EOF actions. */
1075
+
1076
+ switch ( yy_act )
1077
+ { /* beginning of action switch */
1078
+ case 0: /* must back up */
1079
+ /* undo the effects of YY_DO_BEFORE_ACTION */
1080
+ *yy_cp = (yy_hold_char);
1081
+ yy_cp = (yy_last_accepting_cpos);
1082
+ yy_current_state = (yy_last_accepting_state);
1083
+ goto yy_find_action;
1084
+
1085
+ case 1:
1086
+ YY_RULE_SETUP
1087
+ #line 76 "/Users/bakkdoor/projects/fancy/fancy/lib/parser/ext/lexer.lex"
1088
+ { return CLASS; }
1089
+ YY_BREAK
1090
+ case 2:
1091
+ YY_RULE_SETUP
1092
+ #line 77 "/Users/bakkdoor/projects/fancy/fancy/lib/parser/ext/lexer.lex"
1093
+ { return DEF; }
1094
+ YY_BREAK
1095
+ case 3:
1096
+ YY_RULE_SETUP
1097
+ #line 78 "/Users/bakkdoor/projects/fancy/fancy/lib/parser/ext/lexer.lex"
1098
+ {
1099
+ yylval.object = rb_str_new2(yytext);
1100
+ return HEX_LITERAL;
1101
+ }
1102
+ YY_BREAK
1103
+ case 4:
1104
+ YY_RULE_SETUP
1105
+ #line 82 "/Users/bakkdoor/projects/fancy/fancy/lib/parser/ext/lexer.lex"
1106
+ {
1107
+ yylval.object = rb_str_new2(yytext);
1108
+ return OCT_LITERAL;
1109
+ }
1110
+ YY_BREAK
1111
+ case 5:
1112
+ YY_RULE_SETUP
1113
+ #line 86 "/Users/bakkdoor/projects/fancy/fancy/lib/parser/ext/lexer.lex"
1114
+ {
1115
+ yylval.object = rb_str_new2(yytext);
1116
+ return BIN_LITERAL;
1117
+ }
1118
+ YY_BREAK
1119
+ case 6:
1120
+ YY_RULE_SETUP
1121
+ #line 90 "/Users/bakkdoor/projects/fancy/fancy/lib/parser/ext/lexer.lex"
1122
+ {
1123
+ yylval.object = rb_str_new2(yytext);
1124
+ return INTEGER_LITERAL;
1125
+ }
1126
+ YY_BREAK
1127
+ case 7:
1128
+ YY_RULE_SETUP
1129
+ #line 94 "/Users/bakkdoor/projects/fancy/fancy/lib/parser/ext/lexer.lex"
1130
+ {
1131
+ yylval.object = rb_str_new2(yytext);
1132
+ return DOUBLE_LITERAL;
1133
+ }
1134
+ YY_BREAK
1135
+ case 8:
1136
+ /* rule 8 can match eol */
1137
+ YY_RULE_SETUP
1138
+ #line 98 "/Users/bakkdoor/projects/fancy/fancy/lib/parser/ext/lexer.lex"
1139
+ {
1140
+ yylval.object = rb_str_new2(yytext);
1141
+ return STRING_LITERAL;
1142
+ }
1143
+ YY_BREAK
1144
+ case 9:
1145
+ /* rule 9 can match eol */
1146
+ YY_RULE_SETUP
1147
+ #line 102 "/Users/bakkdoor/projects/fancy/fancy/lib/parser/ext/lexer.lex"
1148
+ {
1149
+ yylval.object = rb_str_new2(yytext);
1150
+ return BACKTICK_LITERAL;
1151
+ }
1152
+ YY_BREAK
1153
+ case 10:
1154
+ /* rule 10 can match eol */
1155
+ YY_RULE_SETUP
1156
+ #line 106 "/Users/bakkdoor/projects/fancy/fancy/lib/parser/ext/lexer.lex"
1157
+ {
1158
+ yylval.object = rb_str_new2(yytext);
1159
+ return MULTI_STRING_LITERAL;
1160
+ }
1161
+ YY_BREAK
1162
+ case 11:
1163
+ YY_RULE_SETUP
1164
+ #line 110 "/Users/bakkdoor/projects/fancy/fancy/lib/parser/ext/lexer.lex"
1165
+ { return LPAREN; }
1166
+ YY_BREAK
1167
+ case 12:
1168
+ YY_RULE_SETUP
1169
+ #line 111 "/Users/bakkdoor/projects/fancy/fancy/lib/parser/ext/lexer.lex"
1170
+ { return RPAREN; }
1171
+ YY_BREAK
1172
+ case 13:
1173
+ YY_RULE_SETUP
1174
+ #line 112 "/Users/bakkdoor/projects/fancy/fancy/lib/parser/ext/lexer.lex"
1175
+ { return FUTURE_SEND; }
1176
+ YY_BREAK
1177
+ case 14:
1178
+ YY_RULE_SETUP
1179
+ #line 113 "/Users/bakkdoor/projects/fancy/fancy/lib/parser/ext/lexer.lex"
1180
+ { return ASYNC_SEND; }
1181
+ YY_BREAK
1182
+ case 15:
1183
+ YY_RULE_SETUP
1184
+ #line 114 "/Users/bakkdoor/projects/fancy/fancy/lib/parser/ext/lexer.lex"
1185
+ { return AT_LCURLY; }
1186
+ YY_BREAK
1187
+ case 16:
1188
+ YY_RULE_SETUP
1189
+ #line 115 "/Users/bakkdoor/projects/fancy/fancy/lib/parser/ext/lexer.lex"
1190
+ { return LCURLY; }
1191
+ YY_BREAK
1192
+ case 17:
1193
+ YY_RULE_SETUP
1194
+ #line 116 "/Users/bakkdoor/projects/fancy/fancy/lib/parser/ext/lexer.lex"
1195
+ { return RCURLY; }
1196
+ YY_BREAK
1197
+ case 18:
1198
+ YY_RULE_SETUP
1199
+ #line 117 "/Users/bakkdoor/projects/fancy/fancy/lib/parser/ext/lexer.lex"
1200
+ { return LBRACKET; }
1201
+ YY_BREAK
1202
+ case 19:
1203
+ YY_RULE_SETUP
1204
+ #line 118 "/Users/bakkdoor/projects/fancy/fancy/lib/parser/ext/lexer.lex"
1205
+ { return RBRACKET; }
1206
+ YY_BREAK
1207
+ case 20:
1208
+ YY_RULE_SETUP
1209
+ #line 119 "/Users/bakkdoor/projects/fancy/fancy/lib/parser/ext/lexer.lex"
1210
+ { return LEFTHASH; }
1211
+ YY_BREAK
1212
+ case 21:
1213
+ YY_RULE_SETUP
1214
+ #line 120 "/Users/bakkdoor/projects/fancy/fancy/lib/parser/ext/lexer.lex"
1215
+ { return RIGHTHASH; }
1216
+ YY_BREAK
1217
+ case 22:
1218
+ YY_RULE_SETUP
1219
+ #line 121 "/Users/bakkdoor/projects/fancy/fancy/lib/parser/ext/lexer.lex"
1220
+ { return STAB; }
1221
+ YY_BREAK
1222
+ case 23:
1223
+ YY_RULE_SETUP
1224
+ #line 122 "/Users/bakkdoor/projects/fancy/fancy/lib/parser/ext/lexer.lex"
1225
+ { return ARROW; }
1226
+ YY_BREAK
1227
+ case 24:
1228
+ YY_RULE_SETUP
1229
+ #line 123 "/Users/bakkdoor/projects/fancy/fancy/lib/parser/ext/lexer.lex"
1230
+ { return THIN_ARROW; }
1231
+ YY_BREAK
1232
+ case 25:
1233
+ YY_RULE_SETUP
1234
+ #line 124 "/Users/bakkdoor/projects/fancy/fancy/lib/parser/ext/lexer.lex"
1235
+ { return EQUALS; }
1236
+ YY_BREAK
1237
+ case 26:
1238
+ YY_RULE_SETUP
1239
+ #line 125 "/Users/bakkdoor/projects/fancy/fancy/lib/parser/ext/lexer.lex"
1240
+ {
1241
+ yylval.object = rb_str_new2(yytext);
1242
+ return OPERATOR;
1243
+ }
1244
+ YY_BREAK
1245
+ case 27:
1246
+ YY_RULE_SETUP
1247
+ #line 129 "/Users/bakkdoor/projects/fancy/fancy/lib/parser/ext/lexer.lex"
1248
+ { return RETURN_LOCAL; }
1249
+ YY_BREAK
1250
+ case 28:
1251
+ YY_RULE_SETUP
1252
+ #line 130 "/Users/bakkdoor/projects/fancy/fancy/lib/parser/ext/lexer.lex"
1253
+ { return RETURN; }
1254
+ YY_BREAK
1255
+ case 29:
1256
+ YY_RULE_SETUP
1257
+ #line 131 "/Users/bakkdoor/projects/fancy/fancy/lib/parser/ext/lexer.lex"
1258
+ { return TRY; }
1259
+ YY_BREAK
1260
+ case 30:
1261
+ YY_RULE_SETUP
1262
+ #line 132 "/Users/bakkdoor/projects/fancy/fancy/lib/parser/ext/lexer.lex"
1263
+ { return CATCH; }
1264
+ YY_BREAK
1265
+ case 31:
1266
+ YY_RULE_SETUP
1267
+ #line 133 "/Users/bakkdoor/projects/fancy/fancy/lib/parser/ext/lexer.lex"
1268
+ { return FINALLY; }
1269
+ YY_BREAK
1270
+ case 32:
1271
+ YY_RULE_SETUP
1272
+ #line 134 "/Users/bakkdoor/projects/fancy/fancy/lib/parser/ext/lexer.lex"
1273
+ { return RETRY; }
1274
+ YY_BREAK
1275
+ case 33:
1276
+ YY_RULE_SETUP
1277
+ #line 135 "/Users/bakkdoor/projects/fancy/fancy/lib/parser/ext/lexer.lex"
1278
+ { return SUPER; }
1279
+ YY_BREAK
1280
+ case 34:
1281
+ YY_RULE_SETUP
1282
+ #line 136 "/Users/bakkdoor/projects/fancy/fancy/lib/parser/ext/lexer.lex"
1283
+ {
1284
+ yylval.object = rb_str_new2(yytext);
1285
+ return IDENTIFIER;
1286
+ }
1287
+ YY_BREAK
1288
+ case 35:
1289
+ YY_RULE_SETUP
1290
+ #line 140 "/Users/bakkdoor/projects/fancy/fancy/lib/parser/ext/lexer.lex"
1291
+ {
1292
+ return MATCH;
1293
+ }
1294
+ YY_BREAK
1295
+ case 36:
1296
+ YY_RULE_SETUP
1297
+ #line 143 "/Users/bakkdoor/projects/fancy/fancy/lib/parser/ext/lexer.lex"
1298
+ {
1299
+ return CASE;
1300
+ }
1301
+ YY_BREAK
1302
+ case 37:
1303
+ YY_RULE_SETUP
1304
+ #line 146 "/Users/bakkdoor/projects/fancy/fancy/lib/parser/ext/lexer.lex"
1305
+ {
1306
+ yylval.object = rb_str_new2(yytext);
1307
+ return IDENTIFIER;
1308
+ }
1309
+ YY_BREAK
1310
+ case 38:
1311
+ YY_RULE_SETUP
1312
+ #line 150 "/Users/bakkdoor/projects/fancy/fancy/lib/parser/ext/lexer.lex"
1313
+ {
1314
+ yylval.object = rb_str_new2(yytext);
1315
+ return SELECTOR;
1316
+ }
1317
+ YY_BREAK
1318
+ case 39:
1319
+ YY_RULE_SETUP
1320
+ #line 154 "/Users/bakkdoor/projects/fancy/fancy/lib/parser/ext/lexer.lex"
1321
+ {
1322
+ yylval.object = rb_str_new2(yytext);
1323
+ return RUBY_SEND_OPEN;
1324
+ }
1325
+ YY_BREAK
1326
+ case 40:
1327
+ YY_RULE_SETUP
1328
+ #line 158 "/Users/bakkdoor/projects/fancy/fancy/lib/parser/ext/lexer.lex"
1329
+ {
1330
+ yylval.object = rb_str_new2(yytext);
1331
+ return RUBY_OPER_OPEN;
1332
+ }
1333
+ YY_BREAK
1334
+ case 41:
1335
+ YY_RULE_SETUP
1336
+ #line 162 "/Users/bakkdoor/projects/fancy/fancy/lib/parser/ext/lexer.lex"
1337
+ {
1338
+ yylval.object = rb_str_new2(yytext);
1339
+ return CONSTANT;
1340
+ }
1341
+ YY_BREAK
1342
+ case 42:
1343
+ YY_RULE_SETUP
1344
+ #line 166 "/Users/bakkdoor/projects/fancy/fancy/lib/parser/ext/lexer.lex"
1345
+ {
1346
+ yylval.object = rb_str_new2(yytext);
1347
+ return CONSTANT;
1348
+ }
1349
+ YY_BREAK
1350
+ case 43:
1351
+ YY_RULE_SETUP
1352
+ #line 170 "/Users/bakkdoor/projects/fancy/fancy/lib/parser/ext/lexer.lex"
1353
+ {
1354
+ yylval.object = rb_str_new2(yytext);
1355
+ return CONSTANT;
1356
+ }
1357
+ YY_BREAK
1358
+ case 44:
1359
+ YY_RULE_SETUP
1360
+ #line 174 "/Users/bakkdoor/projects/fancy/fancy/lib/parser/ext/lexer.lex"
1361
+ {
1362
+ yylval.object = rb_str_new2(yytext);
1363
+ return SYMBOL_LITERAL;
1364
+ }
1365
+ YY_BREAK
1366
+ case 45:
1367
+ YY_RULE_SETUP
1368
+ #line 178 "/Users/bakkdoor/projects/fancy/fancy/lib/parser/ext/lexer.lex"
1369
+ {
1370
+ yylval.object = rb_str_new2(yytext);
1371
+ return REGEX_LITERAL;
1372
+ }
1373
+ YY_BREAK
1374
+ case 46:
1375
+ YY_RULE_SETUP
1376
+ #line 182 "/Users/bakkdoor/projects/fancy/fancy/lib/parser/ext/lexer.lex"
1377
+ { return COMMA; }
1378
+ YY_BREAK
1379
+ case 47:
1380
+ YY_RULE_SETUP
1381
+ #line 183 "/Users/bakkdoor/projects/fancy/fancy/lib/parser/ext/lexer.lex"
1382
+ { return SEMI; }
1383
+ YY_BREAK
1384
+ case 48:
1385
+ YY_RULE_SETUP
1386
+ #line 184 "/Users/bakkdoor/projects/fancy/fancy/lib/parser/ext/lexer.lex"
1387
+ { return COLON; }
1388
+ YY_BREAK
1389
+ case 49:
1390
+ YY_RULE_SETUP
1391
+ #line 185 "/Users/bakkdoor/projects/fancy/fancy/lib/parser/ext/lexer.lex"
1392
+ { return DOT; }
1393
+ YY_BREAK
1394
+ case 50:
1395
+ YY_RULE_SETUP
1396
+ #line 186 "/Users/bakkdoor/projects/fancy/fancy/lib/parser/ext/lexer.lex"
1397
+ { return DOLLAR; }
1398
+ YY_BREAK
1399
+ case 51:
1400
+ YY_RULE_SETUP
1401
+ #line 188 "/Users/bakkdoor/projects/fancy/fancy/lib/parser/ext/lexer.lex"
1402
+ {}
1403
+ YY_BREAK
1404
+ case 52:
1405
+ YY_RULE_SETUP
1406
+ #line 190 "/Users/bakkdoor/projects/fancy/fancy/lib/parser/ext/lexer.lex"
1407
+ {}
1408
+ YY_BREAK
1409
+ case 53:
1410
+ /* rule 53 can match eol */
1411
+ YY_RULE_SETUP
1412
+ #line 191 "/Users/bakkdoor/projects/fancy/fancy/lib/parser/ext/lexer.lex"
1413
+ {}
1414
+ YY_BREAK
1415
+ case 54:
1416
+ /* rule 54 can match eol */
1417
+ YY_RULE_SETUP
1418
+ #line 192 "/Users/bakkdoor/projects/fancy/fancy/lib/parser/ext/lexer.lex"
1419
+ { return NL; }
1420
+ YY_BREAK
1421
+ case 55:
1422
+ YY_RULE_SETUP
1423
+ #line 194 "/Users/bakkdoor/projects/fancy/fancy/lib/parser/ext/lexer.lex"
1424
+ {
1425
+ fprintf(stderr, "Invalid token: %s\n", yytext);
1426
+ VALUE fancy = rb_const_get(rb_cObject, rb_intern("Fancy"));
1427
+ VALUE parser = rb_const_get(fancy, rb_intern("Parser"));
1428
+ yyerror(parser, yytext);
1429
+ }
1430
+ YY_BREAK
1431
+ case 56:
1432
+ YY_RULE_SETUP
1433
+ #line 201 "/Users/bakkdoor/projects/fancy/fancy/lib/parser/ext/lexer.lex"
1434
+ ECHO;
1435
+ YY_BREAK
1436
+ #line 1437 "/Users/bakkdoor/projects/fancy/fancy/lib/parser/ext/lexer.c"
1437
+ case YY_STATE_EOF(INITIAL):
1438
+ yyterminate();
1439
+
1440
+ case YY_END_OF_BUFFER:
1441
+ {
1442
+ /* Amount of text matched not including the EOB char. */
1443
+ int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
1444
+
1445
+ /* Undo the effects of YY_DO_BEFORE_ACTION. */
1446
+ *yy_cp = (yy_hold_char);
1447
+ YY_RESTORE_YY_MORE_OFFSET
1448
+
1449
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1450
+ {
1451
+ /* We're scanning a new file or input source. It's
1452
+ * possible that this happened because the user
1453
+ * just pointed yyin at a new source and called
1454
+ * yylex(). If so, then we have to assure
1455
+ * consistency between YY_CURRENT_BUFFER and our
1456
+ * globals. Here is the right place to do so, because
1457
+ * this is the first action (other than possibly a
1458
+ * back-up) that will match for the new input source.
1459
+ */
1460
+ (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1461
+ YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
1462
+ YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1463
+ }
1464
+
1465
+ /* Note that here we test for yy_c_buf_p "<=" to the position
1466
+ * of the first EOB in the buffer, since yy_c_buf_p will
1467
+ * already have been incremented past the NUL character
1468
+ * (since all states make transitions on EOB to the
1469
+ * end-of-buffer state). Contrast this with the test
1470
+ * in input().
1471
+ */
1472
+ if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1473
+ { /* This was really a NUL. */
1474
+ yy_state_type yy_next_state;
1475
+
1476
+ (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
1477
+
1478
+ yy_current_state = yy_get_previous_state( );
1479
+
1480
+ /* Okay, we're now positioned to make the NUL
1481
+ * transition. We couldn't have
1482
+ * yy_get_previous_state() go ahead and do it
1483
+ * for us because it doesn't know how to deal
1484
+ * with the possibility of jamming (and we don't
1485
+ * want to build jamming into it because then it
1486
+ * will run more slowly).
1487
+ */
1488
+
1489
+ yy_next_state = yy_try_NUL_trans( yy_current_state );
1490
+
1491
+ yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1492
+
1493
+ if ( yy_next_state )
1494
+ {
1495
+ /* Consume the NUL. */
1496
+ yy_cp = ++(yy_c_buf_p);
1497
+ yy_current_state = yy_next_state;
1498
+ goto yy_match;
1499
+ }
1500
+
1501
+ else
1502
+ {
1503
+ yy_cp = (yy_c_buf_p);
1504
+ goto yy_find_action;
1505
+ }
1506
+ }
1507
+
1508
+ else switch ( yy_get_next_buffer( ) )
1509
+ {
1510
+ case EOB_ACT_END_OF_FILE:
1511
+ {
1512
+ (yy_did_buffer_switch_on_eof) = 0;
1513
+
1514
+ if ( yywrap( ) )
1515
+ {
1516
+ /* Note: because we've taken care in
1517
+ * yy_get_next_buffer() to have set up
1518
+ * yytext, we can now set up
1519
+ * yy_c_buf_p so that if some total
1520
+ * hoser (like flex itself) wants to
1521
+ * call the scanner after we return the
1522
+ * YY_NULL, it'll still work - another
1523
+ * YY_NULL will get returned.
1524
+ */
1525
+ (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
1526
+
1527
+ yy_act = YY_STATE_EOF(YY_START);
1528
+ goto do_action;
1529
+ }
1530
+
1531
+ else
1532
+ {
1533
+ if ( ! (yy_did_buffer_switch_on_eof) )
1534
+ YY_NEW_FILE;
1535
+ }
1536
+ break;
1537
+ }
1538
+
1539
+ case EOB_ACT_CONTINUE_SCAN:
1540
+ (yy_c_buf_p) =
1541
+ (yytext_ptr) + yy_amount_of_matched_text;
1542
+
1543
+ yy_current_state = yy_get_previous_state( );
1544
+
1545
+ yy_cp = (yy_c_buf_p);
1546
+ yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1547
+ goto yy_match;
1548
+
1549
+ case EOB_ACT_LAST_MATCH:
1550
+ (yy_c_buf_p) =
1551
+ &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
1552
+
1553
+ yy_current_state = yy_get_previous_state( );
1554
+
1555
+ yy_cp = (yy_c_buf_p);
1556
+ yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1557
+ goto yy_find_action;
1558
+ }
1559
+ break;
1560
+ }
1561
+
1562
+ default:
1563
+ YY_FATAL_ERROR(
1564
+ "fatal flex scanner internal error--no action found" );
1565
+ } /* end of action switch */
1566
+ } /* end of scanning one token */
1567
+ } /* end of yylex */
1568
+
1569
+ /* yy_get_next_buffer - try to read in a new buffer
1570
+ *
1571
+ * Returns a code representing an action:
1572
+ * EOB_ACT_LAST_MATCH -
1573
+ * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1574
+ * EOB_ACT_END_OF_FILE - end of file
1575
+ */
1576
+ static int yy_get_next_buffer (void)
1577
+ {
1578
+ register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1579
+ register char *source = (yytext_ptr);
1580
+ register int number_to_move, i;
1581
+ int ret_val;
1582
+
1583
+ if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
1584
+ YY_FATAL_ERROR(
1585
+ "fatal flex scanner internal error--end of buffer missed" );
1586
+
1587
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1588
+ { /* Don't try to fill the buffer, so this is an EOF. */
1589
+ if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
1590
+ {
1591
+ /* We matched a single character, the EOB, so
1592
+ * treat this as a final EOF.
1593
+ */
1594
+ return EOB_ACT_END_OF_FILE;
1595
+ }
1596
+
1597
+ else
1598
+ {
1599
+ /* We matched some text prior to the EOB, first
1600
+ * process it.
1601
+ */
1602
+ return EOB_ACT_LAST_MATCH;
1603
+ }
1604
+ }
1605
+
1606
+ /* Try to read more data. */
1607
+
1608
+ /* First move last chars to start of buffer. */
1609
+ number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
1610
+
1611
+ for ( i = 0; i < number_to_move; ++i )
1612
+ *(dest++) = *(source++);
1613
+
1614
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1615
+ /* don't do the read, it's not guaranteed to return an EOF,
1616
+ * just force an EOF
1617
+ */
1618
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
1619
+
1620
+ else
1621
+ {
1622
+ yy_size_t num_to_read =
1623
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1624
+
1625
+ while ( num_to_read <= 0 )
1626
+ { /* Not enough room in the buffer - grow it. */
1627
+
1628
+ /* just a shorter name for the current buffer */
1629
+ YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
1630
+
1631
+ int yy_c_buf_p_offset =
1632
+ (int) ((yy_c_buf_p) - b->yy_ch_buf);
1633
+
1634
+ if ( b->yy_is_our_buffer )
1635
+ {
1636
+ yy_size_t new_size = b->yy_buf_size * 2;
1637
+
1638
+ if ( new_size <= 0 )
1639
+ b->yy_buf_size += b->yy_buf_size / 8;
1640
+ else
1641
+ b->yy_buf_size *= 2;
1642
+
1643
+ b->yy_ch_buf = (char *)
1644
+ /* Include room in for 2 EOB chars. */
1645
+ yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
1646
+ }
1647
+ else
1648
+ /* Can't grow it, we don't own it. */
1649
+ b->yy_ch_buf = 0;
1650
+
1651
+ if ( ! b->yy_ch_buf )
1652
+ YY_FATAL_ERROR(
1653
+ "fatal error - scanner input buffer overflow" );
1654
+
1655
+ (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
1656
+
1657
+ num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1658
+ number_to_move - 1;
1659
+
1660
+ }
1661
+
1662
+ if ( num_to_read > YY_READ_BUF_SIZE )
1663
+ num_to_read = YY_READ_BUF_SIZE;
1664
+
1665
+ /* Read in more data. */
1666
+ YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1667
+ (yy_n_chars), num_to_read );
1668
+
1669
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1670
+ }
1671
+
1672
+ if ( (yy_n_chars) == 0 )
1673
+ {
1674
+ if ( number_to_move == YY_MORE_ADJ )
1675
+ {
1676
+ ret_val = EOB_ACT_END_OF_FILE;
1677
+ yyrestart(yyin );
1678
+ }
1679
+
1680
+ else
1681
+ {
1682
+ ret_val = EOB_ACT_LAST_MATCH;
1683
+ YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1684
+ YY_BUFFER_EOF_PENDING;
1685
+ }
1686
+ }
1687
+
1688
+ else
1689
+ ret_val = EOB_ACT_CONTINUE_SCAN;
1690
+
1691
+ if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1692
+ /* Extend the array by 50%, plus the number we really need. */
1693
+ yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
1694
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
1695
+ if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1696
+ YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
1697
+ }
1698
+
1699
+ (yy_n_chars) += number_to_move;
1700
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
1701
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
1702
+
1703
+ (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1704
+
1705
+ return ret_val;
1706
+ }
1707
+
1708
+ /* yy_get_previous_state - get the state just before the EOB char was reached */
1709
+
1710
+ static yy_state_type yy_get_previous_state (void)
1711
+ {
1712
+ register yy_state_type yy_current_state;
1713
+ register char *yy_cp;
1714
+
1715
+ yy_current_state = (yy_start);
1716
+
1717
+ for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
1718
+ {
1719
+ register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1720
+ if ( yy_accept[yy_current_state] )
1721
+ {
1722
+ (yy_last_accepting_state) = yy_current_state;
1723
+ (yy_last_accepting_cpos) = yy_cp;
1724
+ }
1725
+ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1726
+ {
1727
+ yy_current_state = (int) yy_def[yy_current_state];
1728
+ if ( yy_current_state >= 205 )
1729
+ yy_c = yy_meta[(unsigned int) yy_c];
1730
+ }
1731
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1732
+ }
1733
+
1734
+ return yy_current_state;
1735
+ }
1736
+
1737
+ /* yy_try_NUL_trans - try to make a transition on the NUL character
1738
+ *
1739
+ * synopsis
1740
+ * next_state = yy_try_NUL_trans( current_state );
1741
+ */
1742
+ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
1743
+ {
1744
+ register int yy_is_jam;
1745
+ register char *yy_cp = (yy_c_buf_p);
1746
+
1747
+ register YY_CHAR yy_c = 1;
1748
+ if ( yy_accept[yy_current_state] )
1749
+ {
1750
+ (yy_last_accepting_state) = yy_current_state;
1751
+ (yy_last_accepting_cpos) = yy_cp;
1752
+ }
1753
+ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1754
+ {
1755
+ yy_current_state = (int) yy_def[yy_current_state];
1756
+ if ( yy_current_state >= 205 )
1757
+ yy_c = yy_meta[(unsigned int) yy_c];
1758
+ }
1759
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1760
+ yy_is_jam = (yy_current_state == 204);
1761
+
1762
+ return yy_is_jam ? 0 : yy_current_state;
1763
+ }
1764
+
1765
+ static void yyunput (int c, register char * yy_bp )
1766
+ {
1767
+ register char *yy_cp;
1768
+
1769
+ yy_cp = (yy_c_buf_p);
1770
+
1771
+ /* undo effects of setting up yytext */
1772
+ *yy_cp = (yy_hold_char);
1773
+
1774
+ if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1775
+ { /* need to shift things up to make room */
1776
+ /* +2 for EOB chars. */
1777
+ register yy_size_t number_to_move = (yy_n_chars) + 2;
1778
+ register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
1779
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
1780
+ register char *source =
1781
+ &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
1782
+
1783
+ while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1784
+ *--dest = *--source;
1785
+
1786
+ yy_cp += (int) (dest - source);
1787
+ yy_bp += (int) (dest - source);
1788
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
1789
+ (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
1790
+
1791
+ if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1792
+ YY_FATAL_ERROR( "flex scanner push-back overflow" );
1793
+ }
1794
+
1795
+ *--yy_cp = (char) c;
1796
+
1797
+ if ( c == '\n' ){
1798
+ --yylineno;
1799
+ }
1800
+
1801
+ (yytext_ptr) = yy_bp;
1802
+ (yy_hold_char) = *yy_cp;
1803
+ (yy_c_buf_p) = yy_cp;
1804
+ }
1805
+
1806
+ #ifndef YY_NO_INPUT
1807
+ #ifdef __cplusplus
1808
+ static int yyinput (void)
1809
+ #else
1810
+ static int input (void)
1811
+ #endif
1812
+
1813
+ {
1814
+ int c;
1815
+
1816
+ *(yy_c_buf_p) = (yy_hold_char);
1817
+
1818
+ if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
1819
+ {
1820
+ /* yy_c_buf_p now points to the character we want to return.
1821
+ * If this occurs *before* the EOB characters, then it's a
1822
+ * valid NUL; if not, then we've hit the end of the buffer.
1823
+ */
1824
+ if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1825
+ /* This was really a NUL. */
1826
+ *(yy_c_buf_p) = '\0';
1827
+
1828
+ else
1829
+ { /* need more input */
1830
+ yy_size_t offset = (yy_c_buf_p) - (yytext_ptr);
1831
+ ++(yy_c_buf_p);
1832
+
1833
+ switch ( yy_get_next_buffer( ) )
1834
+ {
1835
+ case EOB_ACT_LAST_MATCH:
1836
+ /* This happens because yy_g_n_b()
1837
+ * sees that we've accumulated a
1838
+ * token and flags that we need to
1839
+ * try matching the token before
1840
+ * proceeding. But for input(),
1841
+ * there's no matching to consider.
1842
+ * So convert the EOB_ACT_LAST_MATCH
1843
+ * to EOB_ACT_END_OF_FILE.
1844
+ */
1845
+
1846
+ /* Reset buffer status. */
1847
+ yyrestart(yyin );
1848
+
1849
+ /*FALLTHROUGH*/
1850
+
1851
+ case EOB_ACT_END_OF_FILE:
1852
+ {
1853
+ if ( yywrap( ) )
1854
+ return EOF;
1855
+
1856
+ if ( ! (yy_did_buffer_switch_on_eof) )
1857
+ YY_NEW_FILE;
1858
+ #ifdef __cplusplus
1859
+ return yyinput();
1860
+ #else
1861
+ return input();
1862
+ #endif
1863
+ }
1864
+
1865
+ case EOB_ACT_CONTINUE_SCAN:
1866
+ (yy_c_buf_p) = (yytext_ptr) + offset;
1867
+ break;
1868
+ }
1869
+ }
1870
+ }
1871
+
1872
+ c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
1873
+ *(yy_c_buf_p) = '\0'; /* preserve yytext */
1874
+ (yy_hold_char) = *++(yy_c_buf_p);
1875
+
1876
+ if ( c == '\n' )
1877
+
1878
+ yylineno++;
1879
+ ;
1880
+
1881
+ return c;
1882
+ }
1883
+ #endif /* ifndef YY_NO_INPUT */
1884
+
1885
+ /** Immediately switch to a different input stream.
1886
+ * @param input_file A readable stream.
1887
+ *
1888
+ * @note This function does not reset the start condition to @c INITIAL .
1889
+ */
1890
+ void yyrestart (FILE * input_file )
1891
+ {
1892
+
1893
+ if ( ! YY_CURRENT_BUFFER ){
1894
+ yyensure_buffer_stack ();
1895
+ YY_CURRENT_BUFFER_LVALUE =
1896
+ yy_create_buffer(yyin,YY_BUF_SIZE );
1897
+ }
1898
+
1899
+ yy_init_buffer(YY_CURRENT_BUFFER,input_file );
1900
+ yy_load_buffer_state( );
1901
+ }
1902
+
1903
+ /** Switch to a different input buffer.
1904
+ * @param new_buffer The new input buffer.
1905
+ *
1906
+ */
1907
+ void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
1908
+ {
1909
+
1910
+ /* TODO. We should be able to replace this entire function body
1911
+ * with
1912
+ * yypop_buffer_state();
1913
+ * yypush_buffer_state(new_buffer);
1914
+ */
1915
+ yyensure_buffer_stack ();
1916
+ if ( YY_CURRENT_BUFFER == new_buffer )
1917
+ return;
1918
+
1919
+ if ( YY_CURRENT_BUFFER )
1920
+ {
1921
+ /* Flush out information for old buffer. */
1922
+ *(yy_c_buf_p) = (yy_hold_char);
1923
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1924
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1925
+ }
1926
+
1927
+ YY_CURRENT_BUFFER_LVALUE = new_buffer;
1928
+ yy_load_buffer_state( );
1929
+
1930
+ /* We don't actually know whether we did this switch during
1931
+ * EOF (yywrap()) processing, but the only time this flag
1932
+ * is looked at is after yywrap() is called, so it's safe
1933
+ * to go ahead and always set it.
1934
+ */
1935
+ (yy_did_buffer_switch_on_eof) = 1;
1936
+ }
1937
+
1938
+ static void yy_load_buffer_state (void)
1939
+ {
1940
+ (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1941
+ (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
1942
+ yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
1943
+ (yy_hold_char) = *(yy_c_buf_p);
1944
+ }
1945
+
1946
+ /** Allocate and initialize an input buffer state.
1947
+ * @param file A readable stream.
1948
+ * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
1949
+ *
1950
+ * @return the allocated buffer state.
1951
+ */
1952
+ YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
1953
+ {
1954
+ YY_BUFFER_STATE b;
1955
+
1956
+ b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
1957
+ if ( ! b )
1958
+ YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1959
+
1960
+ b->yy_buf_size = size;
1961
+
1962
+ /* yy_ch_buf has to be 2 characters longer than the size given because
1963
+ * we need to put in 2 end-of-buffer characters.
1964
+ */
1965
+ b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 );
1966
+ if ( ! b->yy_ch_buf )
1967
+ YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1968
+
1969
+ b->yy_is_our_buffer = 1;
1970
+
1971
+ yy_init_buffer(b,file );
1972
+
1973
+ return b;
1974
+ }
1975
+
1976
+ /** Destroy the buffer.
1977
+ * @param b a buffer created with yy_create_buffer()
1978
+ *
1979
+ */
1980
+ void yy_delete_buffer (YY_BUFFER_STATE b )
1981
+ {
1982
+
1983
+ if ( ! b )
1984
+ return;
1985
+
1986
+ if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
1987
+ YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
1988
+
1989
+ if ( b->yy_is_our_buffer )
1990
+ yyfree((void *) b->yy_ch_buf );
1991
+
1992
+ yyfree((void *) b );
1993
+ }
1994
+
1995
+ /* Initializes or reinitializes a buffer.
1996
+ * This function is sometimes called more than once on the same buffer,
1997
+ * such as during a yyrestart() or at EOF.
1998
+ */
1999
+ static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
2000
+
2001
+ {
2002
+ int oerrno = errno;
2003
+
2004
+ yy_flush_buffer(b );
2005
+
2006
+ b->yy_input_file = file;
2007
+ b->yy_fill_buffer = 1;
2008
+
2009
+ /* If b is the current buffer, then yy_init_buffer was _probably_
2010
+ * called from yyrestart() or through yy_get_next_buffer.
2011
+ * In that case, we don't want to reset the lineno or column.
2012
+ */
2013
+ if (b != YY_CURRENT_BUFFER){
2014
+ b->yy_bs_lineno = 1;
2015
+ b->yy_bs_column = 0;
2016
+ }
2017
+
2018
+ b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
2019
+
2020
+ errno = oerrno;
2021
+ }
2022
+
2023
+ /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
2024
+ * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
2025
+ *
2026
+ */
2027
+ void yy_flush_buffer (YY_BUFFER_STATE b )
2028
+ {
2029
+ if ( ! b )
2030
+ return;
2031
+
2032
+ b->yy_n_chars = 0;
2033
+
2034
+ /* We always need two end-of-buffer characters. The first causes
2035
+ * a transition to the end-of-buffer state. The second causes
2036
+ * a jam in that state.
2037
+ */
2038
+ b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
2039
+ b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
2040
+
2041
+ b->yy_buf_pos = &b->yy_ch_buf[0];
2042
+
2043
+ b->yy_at_bol = 1;
2044
+ b->yy_buffer_status = YY_BUFFER_NEW;
2045
+
2046
+ if ( b == YY_CURRENT_BUFFER )
2047
+ yy_load_buffer_state( );
2048
+ }
2049
+
2050
+ /** Pushes the new state onto the stack. The new state becomes
2051
+ * the current state. This function will allocate the stack
2052
+ * if necessary.
2053
+ * @param new_buffer The new state.
2054
+ *
2055
+ */
2056
+ void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
2057
+ {
2058
+ if (new_buffer == NULL)
2059
+ return;
2060
+
2061
+ yyensure_buffer_stack();
2062
+
2063
+ /* This block is copied from yy_switch_to_buffer. */
2064
+ if ( YY_CURRENT_BUFFER )
2065
+ {
2066
+ /* Flush out information for old buffer. */
2067
+ *(yy_c_buf_p) = (yy_hold_char);
2068
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2069
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2070
+ }
2071
+
2072
+ /* Only push if top exists. Otherwise, replace top. */
2073
+ if (YY_CURRENT_BUFFER)
2074
+ (yy_buffer_stack_top)++;
2075
+ YY_CURRENT_BUFFER_LVALUE = new_buffer;
2076
+
2077
+ /* copied from yy_switch_to_buffer. */
2078
+ yy_load_buffer_state( );
2079
+ (yy_did_buffer_switch_on_eof) = 1;
2080
+ }
2081
+
2082
+ /** Removes and deletes the top of the stack, if present.
2083
+ * The next element becomes the new top.
2084
+ *
2085
+ */
2086
+ void yypop_buffer_state (void)
2087
+ {
2088
+ if (!YY_CURRENT_BUFFER)
2089
+ return;
2090
+
2091
+ yy_delete_buffer(YY_CURRENT_BUFFER );
2092
+ YY_CURRENT_BUFFER_LVALUE = NULL;
2093
+ if ((yy_buffer_stack_top) > 0)
2094
+ --(yy_buffer_stack_top);
2095
+
2096
+ if (YY_CURRENT_BUFFER) {
2097
+ yy_load_buffer_state( );
2098
+ (yy_did_buffer_switch_on_eof) = 1;
2099
+ }
2100
+ }
2101
+
2102
+ /* Allocates the stack if it does not exist.
2103
+ * Guarantees space for at least one push.
2104
+ */
2105
+ static void yyensure_buffer_stack (void)
2106
+ {
2107
+ yy_size_t num_to_alloc;
2108
+
2109
+ if (!(yy_buffer_stack)) {
2110
+
2111
+ /* First allocation is just for 2 elements, since we don't know if this
2112
+ * scanner will even need a stack. We use 2 instead of 1 to avoid an
2113
+ * immediate realloc on the next call.
2114
+ */
2115
+ num_to_alloc = 1;
2116
+ (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
2117
+ (num_to_alloc * sizeof(struct yy_buffer_state*)
2118
+ );
2119
+ if ( ! (yy_buffer_stack) )
2120
+ YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
2121
+
2122
+ memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
2123
+
2124
+ (yy_buffer_stack_max) = num_to_alloc;
2125
+ (yy_buffer_stack_top) = 0;
2126
+ return;
2127
+ }
2128
+
2129
+ if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
2130
+
2131
+ /* Increase the buffer to prepare for a possible push. */
2132
+ int grow_size = 8 /* arbitrary grow size */;
2133
+
2134
+ num_to_alloc = (yy_buffer_stack_max) + grow_size;
2135
+ (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
2136
+ ((yy_buffer_stack),
2137
+ num_to_alloc * sizeof(struct yy_buffer_state*)
2138
+ );
2139
+ if ( ! (yy_buffer_stack) )
2140
+ YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
2141
+
2142
+ /* zero only the new slots.*/
2143
+ memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
2144
+ (yy_buffer_stack_max) = num_to_alloc;
2145
+ }
2146
+ }
2147
+
2148
+ /** Setup the input buffer state to scan directly from a user-specified character buffer.
2149
+ * @param base the character buffer
2150
+ * @param size the size in bytes of the character buffer
2151
+ *
2152
+ * @return the newly allocated buffer state object.
2153
+ */
2154
+ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
2155
+ {
2156
+ YY_BUFFER_STATE b;
2157
+
2158
+ if ( size < 2 ||
2159
+ base[size-2] != YY_END_OF_BUFFER_CHAR ||
2160
+ base[size-1] != YY_END_OF_BUFFER_CHAR )
2161
+ /* They forgot to leave room for the EOB's. */
2162
+ return 0;
2163
+
2164
+ b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
2165
+ if ( ! b )
2166
+ YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
2167
+
2168
+ b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
2169
+ b->yy_buf_pos = b->yy_ch_buf = base;
2170
+ b->yy_is_our_buffer = 0;
2171
+ b->yy_input_file = 0;
2172
+ b->yy_n_chars = b->yy_buf_size;
2173
+ b->yy_is_interactive = 0;
2174
+ b->yy_at_bol = 1;
2175
+ b->yy_fill_buffer = 0;
2176
+ b->yy_buffer_status = YY_BUFFER_NEW;
2177
+
2178
+ yy_switch_to_buffer(b );
2179
+
2180
+ return b;
2181
+ }
2182
+
2183
+ /** Setup the input buffer state to scan a string. The next call to yylex() will
2184
+ * scan from a @e copy of @a str.
2185
+ * @param yystr a NUL-terminated string to scan
2186
+ *
2187
+ * @return the newly allocated buffer state object.
2188
+ * @note If you want to scan bytes that may contain NUL values, then use
2189
+ * yy_scan_bytes() instead.
2190
+ */
2191
+ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
2192
+ {
2193
+
2194
+ return yy_scan_bytes(yystr,strlen(yystr) );
2195
+ }
2196
+
2197
+ /** Setup the input buffer state to scan the given bytes. The next call to yylex() will
2198
+ * scan from a @e copy of @a bytes.
2199
+ * @param yybytes the byte buffer to scan
2200
+ * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
2201
+ *
2202
+ * @return the newly allocated buffer state object.
2203
+ */
2204
+ YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len )
2205
+ {
2206
+ YY_BUFFER_STATE b;
2207
+ char *buf;
2208
+ yy_size_t n;
2209
+ int i;
2210
+
2211
+ /* Get memory for full buffer, including space for trailing EOB's. */
2212
+ n = _yybytes_len + 2;
2213
+ buf = (char *) yyalloc(n );
2214
+ if ( ! buf )
2215
+ YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
2216
+
2217
+ for ( i = 0; i < _yybytes_len; ++i )
2218
+ buf[i] = yybytes[i];
2219
+
2220
+ buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
2221
+
2222
+ b = yy_scan_buffer(buf,n );
2223
+ if ( ! b )
2224
+ YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
2225
+
2226
+ /* It's okay to grow etc. this buffer, and we should throw it
2227
+ * away when we're done.
2228
+ */
2229
+ b->yy_is_our_buffer = 1;
2230
+
2231
+ return b;
2232
+ }
2233
+
2234
+ #ifndef YY_EXIT_FAILURE
2235
+ #define YY_EXIT_FAILURE 2
2236
+ #endif
2237
+
2238
+ static void yy_fatal_error (yyconst char* msg )
2239
+ {
2240
+ (void) fprintf( stderr, "%s\n", msg );
2241
+ exit( YY_EXIT_FAILURE );
2242
+ }
2243
+
2244
+ /* Redefine yyless() so it works in section 3 code. */
2245
+
2246
+ #undef yyless
2247
+ #define yyless(n) \
2248
+ do \
2249
+ { \
2250
+ /* Undo effects of setting up yytext. */ \
2251
+ int yyless_macro_arg = (n); \
2252
+ YY_LESS_LINENO(yyless_macro_arg);\
2253
+ yytext[yyleng] = (yy_hold_char); \
2254
+ (yy_c_buf_p) = yytext + yyless_macro_arg; \
2255
+ (yy_hold_char) = *(yy_c_buf_p); \
2256
+ *(yy_c_buf_p) = '\0'; \
2257
+ yyleng = yyless_macro_arg; \
2258
+ } \
2259
+ while ( 0 )
2260
+
2261
+ /* Accessor methods (get/set functions) to struct members. */
2262
+
2263
+ /** Get the current line number.
2264
+ *
2265
+ */
2266
+ int yyget_lineno (void)
2267
+ {
2268
+
2269
+ return yylineno;
2270
+ }
2271
+
2272
+ /** Get the input stream.
2273
+ *
2274
+ */
2275
+ FILE *yyget_in (void)
2276
+ {
2277
+ return yyin;
2278
+ }
2279
+
2280
+ /** Get the output stream.
2281
+ *
2282
+ */
2283
+ FILE *yyget_out (void)
2284
+ {
2285
+ return yyout;
2286
+ }
2287
+
2288
+ /** Get the length of the current token.
2289
+ *
2290
+ */
2291
+ yy_size_t yyget_leng (void)
2292
+ {
2293
+ return yyleng;
2294
+ }
2295
+
2296
+ /** Get the current token.
2297
+ *
2298
+ */
2299
+
2300
+ char *yyget_text (void)
2301
+ {
2302
+ return yytext;
2303
+ }
2304
+
2305
+ /** Set the current line number.
2306
+ * @param line_number
2307
+ *
2308
+ */
2309
+ void yyset_lineno (int line_number )
2310
+ {
2311
+
2312
+ yylineno = line_number;
2313
+ }
2314
+
2315
+ /** Set the input stream. This does not discard the current
2316
+ * input buffer.
2317
+ * @param in_str A readable stream.
2318
+ *
2319
+ * @see yy_switch_to_buffer
2320
+ */
2321
+ void yyset_in (FILE * in_str )
2322
+ {
2323
+ yyin = in_str ;
2324
+ }
2325
+
2326
+ void yyset_out (FILE * out_str )
2327
+ {
2328
+ yyout = out_str ;
2329
+ }
2330
+
2331
+ int yyget_debug (void)
2332
+ {
2333
+ return yy_flex_debug;
2334
+ }
2335
+
2336
+ void yyset_debug (int bdebug )
2337
+ {
2338
+ yy_flex_debug = bdebug ;
2339
+ }
2340
+
2341
+ static int yy_init_globals (void)
2342
+ {
2343
+ /* Initialization is the same as for the non-reentrant scanner.
2344
+ * This function is called from yylex_destroy(), so don't allocate here.
2345
+ */
2346
+
2347
+ /* We do not touch yylineno unless the option is enabled. */
2348
+ yylineno = 1;
2349
+
2350
+ (yy_buffer_stack) = 0;
2351
+ (yy_buffer_stack_top) = 0;
2352
+ (yy_buffer_stack_max) = 0;
2353
+ (yy_c_buf_p) = (char *) 0;
2354
+ (yy_init) = 0;
2355
+ (yy_start) = 0;
2356
+
2357
+ /* Defined in main.c */
2358
+ #ifdef YY_STDINIT
2359
+ yyin = stdin;
2360
+ yyout = stdout;
2361
+ #else
2362
+ yyin = (FILE *) 0;
2363
+ yyout = (FILE *) 0;
2364
+ #endif
2365
+
2366
+ /* For future reference: Set errno on error, since we are called by
2367
+ * yylex_init()
2368
+ */
2369
+ return 0;
2370
+ }
2371
+
2372
+ /* yylex_destroy is for both reentrant and non-reentrant scanners. */
2373
+ int yylex_destroy (void)
2374
+ {
2375
+
2376
+ /* Pop the buffer stack, destroying each element. */
2377
+ while(YY_CURRENT_BUFFER){
2378
+ yy_delete_buffer(YY_CURRENT_BUFFER );
2379
+ YY_CURRENT_BUFFER_LVALUE = NULL;
2380
+ yypop_buffer_state();
2381
+ }
2382
+
2383
+ /* Destroy the stack itself. */
2384
+ yyfree((yy_buffer_stack) );
2385
+ (yy_buffer_stack) = NULL;
2386
+
2387
+ /* Reset the globals. This is important in a non-reentrant scanner so the next time
2388
+ * yylex() is called, initialization will occur. */
2389
+ yy_init_globals( );
2390
+
2391
+ return 0;
2392
+ }
2393
+
2394
+ /*
2395
+ * Internal utility routines.
2396
+ */
2397
+
2398
+ #ifndef yytext_ptr
2399
+ static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
2400
+ {
2401
+ register int i;
2402
+ for ( i = 0; i < n; ++i )
2403
+ s1[i] = s2[i];
2404
+ }
2405
+ #endif
2406
+
2407
+ #ifdef YY_NEED_STRLEN
2408
+ static int yy_flex_strlen (yyconst char * s )
2409
+ {
2410
+ register int n;
2411
+ for ( n = 0; s[n]; ++n )
2412
+ ;
2413
+
2414
+ return n;
2415
+ }
2416
+ #endif
2417
+
2418
+ void *yyalloc (yy_size_t size )
2419
+ {
2420
+ return (void *) malloc( size );
2421
+ }
2422
+
2423
+ void *yyrealloc (void * ptr, yy_size_t size )
2424
+ {
2425
+ /* The cast to (char *) in the following accommodates both
2426
+ * implementations that use char* generic pointers, and those
2427
+ * that use void* generic pointers. It works with the latter
2428
+ * because both ANSI C and C++ allow castless assignment from
2429
+ * any pointer type to void*, and deal with argument conversions
2430
+ * as though doing an assignment.
2431
+ */
2432
+ return (void *) realloc( (char *) ptr, size );
2433
+ }
2434
+
2435
+ void yyfree (void * ptr )
2436
+ {
2437
+ free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
2438
+ }
2439
+
2440
+ #define YYTABLES_NAME "yytables"
2441
+
2442
+ #line 201 "/Users/bakkdoor/projects/fancy/fancy/lib/parser/ext/lexer.lex"