fancy 0.5.0 → 0.6.0

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