rubysl-yaml 2.0.4 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -7
- data/MRI_LICENSE +56 -0
- data/lib/rubysl/yaml.rb +1 -1
- data/lib/rubysl/yaml/version.rb +1 -1
- data/lib/yaml.rb +59 -1
- data/rubysl-yaml.gemspec +0 -1
- metadata +73 -90
- data/ext/rubysl/syck/bytecode.c +0 -1165
- data/ext/rubysl/syck/emitter.c +0 -1247
- data/ext/rubysl/syck/extconf.rb +0 -5
- data/ext/rubysl/syck/gram.c +0 -1894
- data/ext/rubysl/syck/gram.h +0 -79
- data/ext/rubysl/syck/handler.c +0 -173
- data/ext/rubysl/syck/implicit.c +0 -2990
- data/ext/rubysl/syck/node.c +0 -407
- data/ext/rubysl/syck/rubyext.c +0 -2306
- data/ext/rubysl/syck/syck.c +0 -524
- data/ext/rubysl/syck/syck.h +0 -453
- data/ext/rubysl/syck/token.c +0 -2724
- data/ext/rubysl/syck/yaml2byte.c +0 -259
- data/ext/rubysl/syck/yamlbyte.h +0 -171
- data/lib/rubysl/yaml/yaml.rb +0 -122
- data/lib/syck.rb +0 -498
- data/lib/syck/baseemitter.rb +0 -242
- data/lib/syck/basenode.rb +0 -227
- data/lib/syck/constants.rb +0 -45
- data/lib/syck/encoding.rb +0 -35
- data/lib/syck/error.rb +0 -34
- data/lib/syck/loader.rb +0 -14
- data/lib/syck/rubytypes.rb +0 -467
- data/lib/syck/stream.rb +0 -41
- data/lib/syck/tag.rb +0 -95
- data/lib/syck/types.rb +0 -192
- data/lib/syck/yamlnode.rb +0 -54
- data/lib/syck/ypath.rb +0 -54
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
---
|
2
|
-
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
5
|
-
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: d29d7e7f94bd391db6dfd8b6afcd5c351195cfe3
|
4
|
+
data.tar.gz: 22c6bead49f9fa240bbf5f9571e806758d61584e
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: a6ccc1e2fd5581d7fd93abc4a089ca13a0348afda13fb7e1271f5c3bacc83d2f683b9ae86e225aaf138a900a19df14c9e410cf756bc3acec49193a1a2ec19cf5
|
7
|
+
data.tar.gz: c3544dd91d5e6edef447daa25e61904f87544e6277983950cf7493925aadbe7f6c00c827af29d7fb417a3e5002f4b32e77f99d2c228cd8a431f40bf605206478
|
data/MRI_LICENSE
ADDED
@@ -0,0 +1,56 @@
|
|
1
|
+
Ruby is copyrighted free software by Yukihiro Matsumoto <matz@netlab.jp>.
|
2
|
+
You can redistribute it and/or modify it under either the terms of the
|
3
|
+
2-clause BSDL (see the file BSDL), or the conditions below:
|
4
|
+
|
5
|
+
1. You may make and give away verbatim copies of the source form of the
|
6
|
+
software without restriction, provided that you duplicate all of the
|
7
|
+
original copyright notices and associated disclaimers.
|
8
|
+
|
9
|
+
2. You may modify your copy of the software in any way, provided that
|
10
|
+
you do at least ONE of the following:
|
11
|
+
|
12
|
+
a) place your modifications in the Public Domain or otherwise
|
13
|
+
make them Freely Available, such as by posting said
|
14
|
+
modifications to Usenet or an equivalent medium, or by allowing
|
15
|
+
the author to include your modifications in the software.
|
16
|
+
|
17
|
+
b) use the modified software only within your corporation or
|
18
|
+
organization.
|
19
|
+
|
20
|
+
c) give non-standard binaries non-standard names, with
|
21
|
+
instructions on where to get the original software distribution.
|
22
|
+
|
23
|
+
d) make other distribution arrangements with the author.
|
24
|
+
|
25
|
+
3. You may distribute the software in object code or binary form,
|
26
|
+
provided that you do at least ONE of the following:
|
27
|
+
|
28
|
+
a) distribute the binaries and library files of the software,
|
29
|
+
together with instructions (in the manual page or equivalent)
|
30
|
+
on where to get the original distribution.
|
31
|
+
|
32
|
+
b) accompany the distribution with the machine-readable source of
|
33
|
+
the software.
|
34
|
+
|
35
|
+
c) give non-standard binaries non-standard names, with
|
36
|
+
instructions on where to get the original software distribution.
|
37
|
+
|
38
|
+
d) make other distribution arrangements with the author.
|
39
|
+
|
40
|
+
4. You may modify and include the part of the software into any other
|
41
|
+
software (possibly commercial). But some files in the distribution
|
42
|
+
are not written by the author, so that they are not under these terms.
|
43
|
+
|
44
|
+
For the list of those files and their copying conditions, see the
|
45
|
+
file LEGAL.
|
46
|
+
|
47
|
+
5. The scripts and library files supplied as input to or produced as
|
48
|
+
output from the software do not automatically fall under the
|
49
|
+
copyright of the software, but belong to whomever generated them,
|
50
|
+
and may be sold commercially, and may be aggregated with this
|
51
|
+
software.
|
52
|
+
|
53
|
+
6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
|
54
|
+
IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
55
|
+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
56
|
+
PURPOSE.
|
data/lib/rubysl/yaml.rb
CHANGED
data/lib/rubysl/yaml/version.rb
CHANGED
data/lib/yaml.rb
CHANGED
@@ -1 +1,59 @@
|
|
1
|
-
|
1
|
+
##
|
2
|
+
# The YAML module is an alias of Psych, the YAML engine for Ruby.
|
3
|
+
|
4
|
+
begin
|
5
|
+
require 'psych'
|
6
|
+
rescue LoadError
|
7
|
+
warn "#{caller[0]}:"
|
8
|
+
warn "It seems your ruby installation is missing psych (for YAML output)."
|
9
|
+
warn "To eliminate this warning, please install libyaml and reinstall your ruby."
|
10
|
+
raise
|
11
|
+
end
|
12
|
+
|
13
|
+
YAML = Psych # :nodoc:
|
14
|
+
|
15
|
+
# YAML Ain't Markup Language
|
16
|
+
#
|
17
|
+
# This module provides a Ruby interface for data serialization in YAML format.
|
18
|
+
#
|
19
|
+
# The underlying implementation is the libyaml wrapper Psych.
|
20
|
+
#
|
21
|
+
# == Usage
|
22
|
+
#
|
23
|
+
# Working with YAML can be very simple, for example:
|
24
|
+
#
|
25
|
+
# require 'yaml'
|
26
|
+
# # Parse a YAML string
|
27
|
+
# YAML.load("--- foo") #=> "foo"
|
28
|
+
#
|
29
|
+
# # Emit some YAML
|
30
|
+
# YAML.dump("foo") # => "--- foo\n...\n"
|
31
|
+
# { :a => 'b'}.to_yaml # => "---\n:a: b\n"
|
32
|
+
#
|
33
|
+
# == Security
|
34
|
+
#
|
35
|
+
# Do not use YAML to load untrusted data. Doing so is unsafe and could allow
|
36
|
+
# malicious input to execute arbitrary code inside your application. Please see
|
37
|
+
# doc/security.rdoc for more information.
|
38
|
+
#
|
39
|
+
# == History
|
40
|
+
#
|
41
|
+
# Syck was the original for YAML implementation in Ruby's standard library
|
42
|
+
# developed by why the lucky stiff.
|
43
|
+
#
|
44
|
+
# You can still use Syck, if you prefer, for parsing and emitting YAML, but you
|
45
|
+
# must install the 'syck' gem now in order to use it.
|
46
|
+
#
|
47
|
+
# In older Ruby versions, ie. <= 1.9, Syck is still provided, however it was
|
48
|
+
# completely removed with the release of Ruby 2.0.0.
|
49
|
+
#
|
50
|
+
# == More info
|
51
|
+
#
|
52
|
+
# For more advanced details on the implementation see Psych, and also check out
|
53
|
+
# http://yaml.org for spec details and other helpful information.
|
54
|
+
#
|
55
|
+
# Pysch is maintained by Aaron Patterson on github: https://github.com/tenderlove/psych
|
56
|
+
#
|
57
|
+
# Syck can also be found on github: https://github.com/tenderlove/syck
|
58
|
+
module YAML
|
59
|
+
end
|
data/rubysl-yaml.gemspec
CHANGED
@@ -13,7 +13,6 @@ Gem::Specification.new do |spec|
|
|
13
13
|
|
14
14
|
spec.files = `git ls-files`.split($/)
|
15
15
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
16
|
-
spec.extensions = ["ext/rubysl/syck/extconf.rb"]
|
17
16
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
18
17
|
spec.require_paths = ["lib"]
|
19
18
|
|
metadata
CHANGED
@@ -1,102 +1,87 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubysl-yaml
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 2.1.0
|
5
5
|
platform: ruby
|
6
|
-
authors:
|
6
|
+
authors:
|
7
7
|
- Brian Shirai
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
- !ruby/object:Gem::Dependency
|
11
|
+
date: 2015-01-09 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
15
14
|
name: bundler
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
version: "1.3"
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.3'
|
22
20
|
type: :development
|
23
|
-
version_requirements: *id001
|
24
|
-
- !ruby/object:Gem::Dependency
|
25
|
-
name: rake
|
26
21
|
prerelease: false
|
27
|
-
|
28
|
-
requirements:
|
29
|
-
- - ~>
|
30
|
-
- !ruby/object:Gem::Version
|
31
|
-
version:
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.3'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
32
34
|
type: :development
|
33
|
-
version_requirements: *id002
|
34
|
-
- !ruby/object:Gem::Dependency
|
35
|
-
name: mspec
|
36
35
|
prerelease: false
|
37
|
-
|
38
|
-
requirements:
|
39
|
-
- - ~>
|
40
|
-
- !ruby/object:Gem::Version
|
41
|
-
version:
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: mspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '1.5'
|
42
48
|
type: :development
|
43
|
-
version_requirements: *id003
|
44
|
-
- !ruby/object:Gem::Dependency
|
45
|
-
name: rubysl-prettyprint
|
46
49
|
prerelease: false
|
47
|
-
|
48
|
-
requirements:
|
49
|
-
- - ~>
|
50
|
-
-
|
51
|
-
version:
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '1.5'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rubysl-prettyprint
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '2.0'
|
52
62
|
type: :development
|
53
|
-
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '2.0'
|
54
69
|
description: Ruby standard library YAML.
|
55
|
-
email:
|
70
|
+
email:
|
56
71
|
- brixen@gmail.com
|
57
72
|
executables: []
|
58
|
-
|
59
|
-
extensions:
|
60
|
-
- ext/rubysl/syck/extconf.rb
|
73
|
+
extensions: []
|
61
74
|
extra_rdoc_files: []
|
62
|
-
|
63
|
-
|
64
|
-
- .
|
65
|
-
- .travis.yml
|
75
|
+
files:
|
76
|
+
- ".gitignore"
|
77
|
+
- ".travis.yml"
|
66
78
|
- Gemfile
|
67
79
|
- LICENSE
|
80
|
+
- MRI_LICENSE
|
68
81
|
- README.md
|
69
82
|
- Rakefile
|
70
|
-
- ext/rubysl/syck/bytecode.c
|
71
|
-
- ext/rubysl/syck/emitter.c
|
72
|
-
- ext/rubysl/syck/extconf.rb
|
73
|
-
- ext/rubysl/syck/gram.c
|
74
|
-
- ext/rubysl/syck/gram.h
|
75
|
-
- ext/rubysl/syck/handler.c
|
76
|
-
- ext/rubysl/syck/implicit.c
|
77
|
-
- ext/rubysl/syck/node.c
|
78
|
-
- ext/rubysl/syck/rubyext.c
|
79
|
-
- ext/rubysl/syck/syck.c
|
80
|
-
- ext/rubysl/syck/syck.h
|
81
|
-
- ext/rubysl/syck/token.c
|
82
|
-
- ext/rubysl/syck/yaml2byte.c
|
83
|
-
- ext/rubysl/syck/yamlbyte.h
|
84
83
|
- lib/rubysl/yaml.rb
|
85
84
|
- lib/rubysl/yaml/version.rb
|
86
|
-
- lib/rubysl/yaml/yaml.rb
|
87
|
-
- lib/syck.rb
|
88
|
-
- lib/syck/baseemitter.rb
|
89
|
-
- lib/syck/basenode.rb
|
90
|
-
- lib/syck/constants.rb
|
91
|
-
- lib/syck/encoding.rb
|
92
|
-
- lib/syck/error.rb
|
93
|
-
- lib/syck/loader.rb
|
94
|
-
- lib/syck/rubytypes.rb
|
95
|
-
- lib/syck/stream.rb
|
96
|
-
- lib/syck/tag.rb
|
97
|
-
- lib/syck/types.rb
|
98
|
-
- lib/syck/yamlnode.rb
|
99
|
-
- lib/syck/ypath.rb
|
100
85
|
- lib/yaml.rb
|
101
86
|
- lib/yaml/dbm.rb
|
102
87
|
- lib/yaml/store.rb
|
@@ -135,32 +120,30 @@ files:
|
|
135
120
|
- spec/transfer_spec.rb
|
136
121
|
- spec/try_implicit_spec.rb
|
137
122
|
homepage: https://github.com/rubysl/rubysl-yaml
|
138
|
-
licenses:
|
123
|
+
licenses:
|
139
124
|
- BSD
|
140
125
|
metadata: {}
|
141
|
-
|
142
126
|
post_install_message:
|
143
127
|
rdoc_options: []
|
144
|
-
|
145
|
-
require_paths:
|
128
|
+
require_paths:
|
146
129
|
- lib
|
147
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
148
|
-
requirements:
|
149
|
-
- - ~>
|
150
|
-
-
|
151
|
-
|
152
|
-
|
130
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
131
|
+
requirements:
|
132
|
+
- - "~>"
|
133
|
+
- !ruby/object:Gem::Version
|
134
|
+
version: '2.0'
|
135
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
136
|
+
requirements:
|
153
137
|
- - ">="
|
154
|
-
- !ruby/object:Gem::Version
|
155
|
-
version:
|
138
|
+
- !ruby/object:Gem::Version
|
139
|
+
version: '0'
|
156
140
|
requirements: []
|
157
|
-
|
158
141
|
rubyforge_project:
|
159
|
-
rubygems_version: 2.
|
142
|
+
rubygems_version: 2.2.2
|
160
143
|
signing_key:
|
161
144
|
specification_version: 4
|
162
145
|
summary: Ruby standard library YAML.
|
163
|
-
test_files:
|
146
|
+
test_files:
|
164
147
|
- spec/add_builtin_type_spec.rb
|
165
148
|
- spec/add_domain_type_spec.rb
|
166
149
|
- spec/add_private_type_spec.rb
|
data/ext/rubysl/syck/bytecode.c
DELETED
@@ -1,1165 +0,0 @@
|
|
1
|
-
/* Generated by re2c 0.9.10 on Mon Sep 19 23:21:26 2005 */
|
2
|
-
#line 1 "bytecode.re"
|
3
|
-
/*
|
4
|
-
* bytecode.re
|
5
|
-
*
|
6
|
-
* $Author: naruse $
|
7
|
-
*
|
8
|
-
* Copyright (C) 2003 why the lucky stiff
|
9
|
-
*/
|
10
|
-
#include "ruby/ruby.h"
|
11
|
-
#include "syck.h"
|
12
|
-
#include "gram.h"
|
13
|
-
|
14
|
-
#define QUOTELEN 128
|
15
|
-
|
16
|
-
/*
|
17
|
-
* They do my bidding...
|
18
|
-
*/
|
19
|
-
#define YYCTYPE char
|
20
|
-
#define YYCURSOR parser->cursor
|
21
|
-
#define YYMARKER parser->marker
|
22
|
-
#define YYLIMIT parser->limit
|
23
|
-
#define YYTOKEN parser->token
|
24
|
-
#define YYTOKTMP parser->toktmp
|
25
|
-
#define YYLINEPTR parser->lineptr
|
26
|
-
#define YYLINECTPTR parser->linectptr
|
27
|
-
#define YYLINE parser->linect
|
28
|
-
#define YYFILL(n) syck_parser_read(parser)
|
29
|
-
|
30
|
-
extern SyckParser *syck_parser_ptr;
|
31
|
-
|
32
|
-
char *get_inline( SyckParser *parser );
|
33
|
-
|
34
|
-
/*
|
35
|
-
* Repositions the cursor at `n' offset from the token start.
|
36
|
-
* Only works in `Header' and `Document' sections.
|
37
|
-
*/
|
38
|
-
#define YYPOS(n) YYCURSOR = YYTOKEN + n
|
39
|
-
|
40
|
-
/*
|
41
|
-
* Track line numbers
|
42
|
-
*/
|
43
|
-
#define CHK_NL(ptr) if ( *( ptr - 1 ) == '\n' && ptr > YYLINECTPTR ) { YYLINEPTR = ptr; YYLINE++; YYLINECTPTR = YYLINEPTR; }
|
44
|
-
|
45
|
-
/*
|
46
|
-
* I like seeing the level operations as macros...
|
47
|
-
*/
|
48
|
-
#define ADD_LEVEL(len, status) syck_parser_add_level( parser, len, status )
|
49
|
-
#define POP_LEVEL() syck_parser_pop_level( parser )
|
50
|
-
#define CURRENT_LEVEL() syck_parser_current_level( parser )
|
51
|
-
|
52
|
-
/*
|
53
|
-
* Force a token next time around sycklex()
|
54
|
-
*/
|
55
|
-
#define FORCE_NEXT_TOKEN(tok) parser->force_token = tok;
|
56
|
-
|
57
|
-
/*
|
58
|
-
* Adding levels in bytecode requires us to make sure
|
59
|
-
* we've got all our tokens worked out.
|
60
|
-
*/
|
61
|
-
#define ADD_BYTE_LEVEL(lvl, len, s ) \
|
62
|
-
switch ( lvl->status ) \
|
63
|
-
{ \
|
64
|
-
case syck_lvl_seq: \
|
65
|
-
lvl->ncount++; \
|
66
|
-
ADD_LEVEL(len, syck_lvl_open); \
|
67
|
-
YYPOS(0); \
|
68
|
-
return '-'; \
|
69
|
-
\
|
70
|
-
case syck_lvl_map: \
|
71
|
-
lvl->ncount++; \
|
72
|
-
ADD_LEVEL(len, s); \
|
73
|
-
break; \
|
74
|
-
\
|
75
|
-
case syck_lvl_open: \
|
76
|
-
lvl->status = s; \
|
77
|
-
break; \
|
78
|
-
\
|
79
|
-
default: \
|
80
|
-
ADD_LEVEL(len, s); \
|
81
|
-
break; \
|
82
|
-
}
|
83
|
-
|
84
|
-
/*
|
85
|
-
* Nice little macro to ensure we're YAML_IOPENed to the current level.
|
86
|
-
* * Only use this macro in the "Document" section *
|
87
|
-
*/
|
88
|
-
#define ENSURE_YAML_IOPEN(last_lvl, lvl_type, to_len, reset) \
|
89
|
-
if ( last_lvl->spaces < to_len ) \
|
90
|
-
{ \
|
91
|
-
if ( last_lvl->status == syck_lvl_iseq || last_lvl->status == syck_lvl_imap ) \
|
92
|
-
{ \
|
93
|
-
goto Document; \
|
94
|
-
} \
|
95
|
-
else \
|
96
|
-
{ \
|
97
|
-
ADD_LEVEL( to_len, lvl_type ); \
|
98
|
-
if ( reset == 1 ) YYPOS(0); \
|
99
|
-
return YAML_IOPEN; \
|
100
|
-
} \
|
101
|
-
}
|
102
|
-
|
103
|
-
/*
|
104
|
-
* Nice little macro to ensure closure of levels.
|
105
|
-
* * Only use this macro in the "Document" section *
|
106
|
-
*/
|
107
|
-
#define ENSURE_YAML_IEND(last_lvl, to_len) \
|
108
|
-
if ( last_lvl->spaces > to_len ) \
|
109
|
-
{ \
|
110
|
-
syck_parser_pop_level( parser ); \
|
111
|
-
YYPOS(0); \
|
112
|
-
return YAML_IEND; \
|
113
|
-
}
|
114
|
-
|
115
|
-
/*
|
116
|
-
* Concatenates string items and manages allocation
|
117
|
-
* to the string
|
118
|
-
*/
|
119
|
-
#define CAT(s, c, i, l) \
|
120
|
-
{ \
|
121
|
-
if ( i + 1 >= c ) \
|
122
|
-
{ \
|
123
|
-
c += QUOTELEN; \
|
124
|
-
S_REALLOC_N( s, char, c ); \
|
125
|
-
} \
|
126
|
-
s[i++] = l; \
|
127
|
-
s[i] = '\0'; \
|
128
|
-
}
|
129
|
-
|
130
|
-
/*
|
131
|
-
* Parser for standard YAML Bytecode [UTF-8]
|
132
|
-
*/
|
133
|
-
int
|
134
|
-
sycklex_bytecode_utf8( YYSTYPE *sycklval, SyckParser *parser )
|
135
|
-
{
|
136
|
-
SyckLevel *lvl;
|
137
|
-
syck_parser_ptr = parser;
|
138
|
-
if ( YYCURSOR == NULL )
|
139
|
-
{
|
140
|
-
syck_parser_read( parser );
|
141
|
-
}
|
142
|
-
|
143
|
-
if ( parser->force_token != 0 )
|
144
|
-
{
|
145
|
-
int t = parser->force_token;
|
146
|
-
parser->force_token = 0;
|
147
|
-
return t;
|
148
|
-
}
|
149
|
-
|
150
|
-
#line 172 "bytecode.re"
|
151
|
-
|
152
|
-
|
153
|
-
lvl = CURRENT_LEVEL();
|
154
|
-
if ( lvl->status == syck_lvl_doc )
|
155
|
-
{
|
156
|
-
goto Document;
|
157
|
-
}
|
158
|
-
|
159
|
-
/* Header: */
|
160
|
-
|
161
|
-
YYTOKEN = YYCURSOR;
|
162
|
-
|
163
|
-
|
164
|
-
#line 165 "<stdout>"
|
165
|
-
{
|
166
|
-
YYCTYPE yych;
|
167
|
-
unsigned int yyaccept = 0;
|
168
|
-
goto yy0;
|
169
|
-
++YYCURSOR;
|
170
|
-
yy0:
|
171
|
-
if((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
|
172
|
-
yych = *YYCURSOR;
|
173
|
-
switch(yych){
|
174
|
-
case 0x00: goto yy2;
|
175
|
-
case 'D': goto yy3;
|
176
|
-
default: goto yy5;
|
177
|
-
}
|
178
|
-
yy2: YYCURSOR = YYMARKER;
|
179
|
-
switch(yyaccept){
|
180
|
-
case 0: goto yy4;
|
181
|
-
}
|
182
|
-
yy3: yyaccept = 0;
|
183
|
-
yych = *(YYMARKER = ++YYCURSOR);
|
184
|
-
switch(yych){
|
185
|
-
case 0x0A: goto yy6;
|
186
|
-
case 0x0D: goto yy8;
|
187
|
-
default: goto yy4;
|
188
|
-
}
|
189
|
-
yy4:
|
190
|
-
#line 199 "bytecode.re"
|
191
|
-
{ YYPOS(0);
|
192
|
-
goto Document;
|
193
|
-
}
|
194
|
-
#line 195 "<stdout>"
|
195
|
-
yy5: yych = *++YYCURSOR;
|
196
|
-
goto yy4;
|
197
|
-
yy6: ++YYCURSOR;
|
198
|
-
goto yy7;
|
199
|
-
yy7:
|
200
|
-
#line 186 "bytecode.re"
|
201
|
-
{ if ( lvl->status == syck_lvl_header )
|
202
|
-
{
|
203
|
-
CHK_NL(YYCURSOR);
|
204
|
-
goto Directive;
|
205
|
-
}
|
206
|
-
else
|
207
|
-
{
|
208
|
-
ENSURE_YAML_IEND(lvl, -1);
|
209
|
-
YYPOS(0);
|
210
|
-
return 0;
|
211
|
-
}
|
212
|
-
}
|
213
|
-
#line 214 "<stdout>"
|
214
|
-
yy8: ++YYCURSOR;
|
215
|
-
switch((yych = *YYCURSOR)) {
|
216
|
-
case 0x0A: goto yy6;
|
217
|
-
default: goto yy2;
|
218
|
-
}
|
219
|
-
}
|
220
|
-
#line 203 "bytecode.re"
|
221
|
-
|
222
|
-
|
223
|
-
Document:
|
224
|
-
{
|
225
|
-
lvl = CURRENT_LEVEL();
|
226
|
-
if ( lvl->status == syck_lvl_header )
|
227
|
-
{
|
228
|
-
lvl->status = syck_lvl_doc;
|
229
|
-
}
|
230
|
-
|
231
|
-
YYTOKEN = YYCURSOR;
|
232
|
-
|
233
|
-
|
234
|
-
#line 235 "<stdout>"
|
235
|
-
{
|
236
|
-
YYCTYPE yych;
|
237
|
-
goto yy9;
|
238
|
-
++YYCURSOR;
|
239
|
-
yy9:
|
240
|
-
if((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
|
241
|
-
yych = *YYCURSOR;
|
242
|
-
switch(yych){
|
243
|
-
case 0x00: goto yy30;
|
244
|
-
case 0x0A: goto yy27;
|
245
|
-
case 0x0D: goto yy29;
|
246
|
-
case 'A': goto yy19;
|
247
|
-
case 'D': goto yy12;
|
248
|
-
case 'E': goto yy16;
|
249
|
-
case 'M': goto yy14;
|
250
|
-
case 'P': goto yy13;
|
251
|
-
case 'Q': goto yy15;
|
252
|
-
case 'R': goto yy21;
|
253
|
-
case 'S': goto yy17;
|
254
|
-
case 'T': goto yy23;
|
255
|
-
case 'c': goto yy25;
|
256
|
-
default: goto yy11;
|
257
|
-
}
|
258
|
-
yy11:yy12: yych = *++YYCURSOR;
|
259
|
-
switch(yych){
|
260
|
-
case 0x0A: goto yy41;
|
261
|
-
case 0x0D: goto yy44;
|
262
|
-
default: goto yy11;
|
263
|
-
}
|
264
|
-
yy13: yych = *++YYCURSOR;
|
265
|
-
switch(yych){
|
266
|
-
case 0x0A: goto yy41;
|
267
|
-
case 0x0D: goto yy43;
|
268
|
-
default: goto yy11;
|
269
|
-
}
|
270
|
-
yy14: yych = *++YYCURSOR;
|
271
|
-
switch(yych){
|
272
|
-
case 0x0A: goto yy38;
|
273
|
-
case 0x0D: goto yy40;
|
274
|
-
default: goto yy11;
|
275
|
-
}
|
276
|
-
yy15: yych = *++YYCURSOR;
|
277
|
-
switch(yych){
|
278
|
-
case 0x0A: goto yy35;
|
279
|
-
case 0x0D: goto yy37;
|
280
|
-
default: goto yy11;
|
281
|
-
}
|
282
|
-
yy16: yych = *++YYCURSOR;
|
283
|
-
switch(yych){
|
284
|
-
case 0x0A: goto yy32;
|
285
|
-
case 0x0D: goto yy34;
|
286
|
-
default: goto yy11;
|
287
|
-
}
|
288
|
-
yy17: ++YYCURSOR;
|
289
|
-
goto yy18;
|
290
|
-
yy18:
|
291
|
-
#line 288 "bytecode.re"
|
292
|
-
{ ADD_BYTE_LEVEL(lvl, lvl->spaces + 1, syck_lvl_str);
|
293
|
-
goto Scalar;
|
294
|
-
}
|
295
|
-
#line 296 "<stdout>"
|
296
|
-
yy19: ++YYCURSOR;
|
297
|
-
goto yy20;
|
298
|
-
yy20:
|
299
|
-
#line 292 "bytecode.re"
|
300
|
-
{ ADD_BYTE_LEVEL(lvl, lvl->spaces + 1, syck_lvl_open);
|
301
|
-
sycklval->name = get_inline( parser );
|
302
|
-
syck_hdlr_remove_anchor( parser, sycklval->name );
|
303
|
-
CHK_NL(YYCURSOR);
|
304
|
-
return YAML_ANCHOR;
|
305
|
-
}
|
306
|
-
#line 307 "<stdout>"
|
307
|
-
yy21: ++YYCURSOR;
|
308
|
-
goto yy22;
|
309
|
-
yy22:
|
310
|
-
#line 299 "bytecode.re"
|
311
|
-
{ ADD_BYTE_LEVEL(lvl, lvl->spaces + 1, syck_lvl_str);
|
312
|
-
sycklval->name = get_inline( parser );
|
313
|
-
POP_LEVEL();
|
314
|
-
if ( *( YYCURSOR - 1 ) == '\n' ) YYCURSOR--;
|
315
|
-
return YAML_ALIAS;
|
316
|
-
}
|
317
|
-
#line 318 "<stdout>"
|
318
|
-
yy23: ++YYCURSOR;
|
319
|
-
goto yy24;
|
320
|
-
yy24:
|
321
|
-
#line 306 "bytecode.re"
|
322
|
-
{ char *qstr;
|
323
|
-
ADD_BYTE_LEVEL(lvl, lvl->spaces + 1, syck_lvl_open);
|
324
|
-
qstr = get_inline( parser );
|
325
|
-
CHK_NL(YYCURSOR);
|
326
|
-
if ( qstr[0] == '!' )
|
327
|
-
{
|
328
|
-
size_t qidx = strlen( qstr );
|
329
|
-
if ( qstr[1] == '\0' )
|
330
|
-
{
|
331
|
-
free( qstr );
|
332
|
-
return YAML_ITRANSFER;
|
333
|
-
}
|
334
|
-
|
335
|
-
lvl = CURRENT_LEVEL();
|
336
|
-
|
337
|
-
/*
|
338
|
-
* URL Prefixing
|
339
|
-
*/
|
340
|
-
if ( qstr[1] == '^' )
|
341
|
-
{
|
342
|
-
sycklval->name = S_ALLOC_N( char, qidx + strlen( lvl->domain ) );
|
343
|
-
sycklval->name[0] = '\0';
|
344
|
-
strcat( sycklval->name, lvl->domain );
|
345
|
-
strncat( sycklval->name, qstr + 2, qidx - 2 );
|
346
|
-
free( qstr );
|
347
|
-
}
|
348
|
-
else
|
349
|
-
{
|
350
|
-
char *carat = qstr + 1;
|
351
|
-
char *qend = qstr + qidx;
|
352
|
-
while ( (++carat) < qend )
|
353
|
-
{
|
354
|
-
if ( *carat == '^' )
|
355
|
-
break;
|
356
|
-
}
|
357
|
-
|
358
|
-
if ( carat < qend )
|
359
|
-
{
|
360
|
-
free( lvl->domain );
|
361
|
-
lvl->domain = syck_strndup( qstr + 1, carat - ( qstr + 1 ) );
|
362
|
-
sycklval->name = S_ALLOC_N( char, ( qend - carat ) + strlen( lvl->domain ) );
|
363
|
-
sycklval->name[0] = '\0';
|
364
|
-
strcat( sycklval->name, lvl->domain );
|
365
|
-
strncat( sycklval->name, carat + 1, ( qend - carat ) - 1 );
|
366
|
-
free( qstr );
|
367
|
-
}
|
368
|
-
else
|
369
|
-
{
|
370
|
-
sycklval->name = S_ALLOC_N( char, strlen( qstr ) );
|
371
|
-
sycklval->name[0] = '\0';
|
372
|
-
S_MEMCPY( sycklval->name, qstr + 1, char, strlen( qstr ) );
|
373
|
-
free( qstr );
|
374
|
-
}
|
375
|
-
}
|
376
|
-
return YAML_TRANSFER;
|
377
|
-
}
|
378
|
-
sycklval->name = qstr;
|
379
|
-
return YAML_TAGURI;
|
380
|
-
}
|
381
|
-
#line 382 "<stdout>"
|
382
|
-
yy25: ++YYCURSOR;
|
383
|
-
goto yy26;
|
384
|
-
yy26:
|
385
|
-
#line 366 "bytecode.re"
|
386
|
-
{ goto Comment; }
|
387
|
-
#line 388 "<stdout>"
|
388
|
-
yy27: ++YYCURSOR;
|
389
|
-
goto yy28;
|
390
|
-
yy28:
|
391
|
-
#line 368 "bytecode.re"
|
392
|
-
{ CHK_NL(YYCURSOR);
|
393
|
-
if ( lvl->status == syck_lvl_seq )
|
394
|
-
{
|
395
|
-
return YAML_INDENT;
|
396
|
-
}
|
397
|
-
else if ( lvl->status == syck_lvl_map )
|
398
|
-
{
|
399
|
-
if ( lvl->ncount % 2 == 1 ) return ':';
|
400
|
-
else return YAML_INDENT;
|
401
|
-
}
|
402
|
-
goto Document;
|
403
|
-
}
|
404
|
-
#line 405 "<stdout>"
|
405
|
-
yy29: yych = *++YYCURSOR;
|
406
|
-
switch(yych){
|
407
|
-
case 0x0A: goto yy27;
|
408
|
-
default: goto yy11;
|
409
|
-
}
|
410
|
-
yy30: ++YYCURSOR;
|
411
|
-
goto yy31;
|
412
|
-
yy31:
|
413
|
-
#line 381 "bytecode.re"
|
414
|
-
{ ENSURE_YAML_IEND(lvl, -1);
|
415
|
-
YYPOS(0);
|
416
|
-
return 0;
|
417
|
-
}
|
418
|
-
#line 419 "<stdout>"
|
419
|
-
yy32: ++YYCURSOR;
|
420
|
-
goto yy33;
|
421
|
-
yy33:
|
422
|
-
#line 252 "bytecode.re"
|
423
|
-
{ if ( lvl->status == syck_lvl_seq && lvl->ncount == 0 )
|
424
|
-
{
|
425
|
-
lvl->ncount++;
|
426
|
-
YYPOS(0);
|
427
|
-
FORCE_NEXT_TOKEN( ']' );
|
428
|
-
return '[';
|
429
|
-
}
|
430
|
-
else if ( lvl->status == syck_lvl_map && lvl->ncount == 0 )
|
431
|
-
{
|
432
|
-
lvl->ncount++;
|
433
|
-
YYPOS(0);
|
434
|
-
FORCE_NEXT_TOKEN( '}' );
|
435
|
-
return '{';
|
436
|
-
}
|
437
|
-
|
438
|
-
POP_LEVEL();
|
439
|
-
lvl = CURRENT_LEVEL();
|
440
|
-
if ( lvl->status == syck_lvl_seq )
|
441
|
-
{
|
442
|
-
FORCE_NEXT_TOKEN(YAML_INDENT);
|
443
|
-
}
|
444
|
-
else if ( lvl->status == syck_lvl_map )
|
445
|
-
{
|
446
|
-
if ( lvl->ncount % 2 == 1 )
|
447
|
-
{
|
448
|
-
FORCE_NEXT_TOKEN(':');
|
449
|
-
}
|
450
|
-
else
|
451
|
-
{
|
452
|
-
FORCE_NEXT_TOKEN(YAML_INDENT);
|
453
|
-
}
|
454
|
-
}
|
455
|
-
CHK_NL(YYCURSOR);
|
456
|
-
return YAML_IEND;
|
457
|
-
}
|
458
|
-
#line 459 "<stdout>"
|
459
|
-
yy34: yych = *++YYCURSOR;
|
460
|
-
switch(yych){
|
461
|
-
case 0x0A: goto yy32;
|
462
|
-
default: goto yy11;
|
463
|
-
}
|
464
|
-
yy35: ++YYCURSOR;
|
465
|
-
goto yy36;
|
466
|
-
yy36:
|
467
|
-
#line 237 "bytecode.re"
|
468
|
-
{ int complex = 0;
|
469
|
-
if ( lvl->ncount % 2 == 0 && ( lvl->status == syck_lvl_map || lvl->status == syck_lvl_seq ) )
|
470
|
-
{
|
471
|
-
complex = 1;
|
472
|
-
}
|
473
|
-
ADD_BYTE_LEVEL(lvl, lvl->spaces + 1, syck_lvl_seq);
|
474
|
-
CHK_NL(YYCURSOR);
|
475
|
-
if ( complex )
|
476
|
-
{
|
477
|
-
FORCE_NEXT_TOKEN( YAML_IOPEN );
|
478
|
-
return '?';
|
479
|
-
}
|
480
|
-
return YAML_IOPEN;
|
481
|
-
}
|
482
|
-
#line 483 "<stdout>"
|
483
|
-
yy37: yych = *++YYCURSOR;
|
484
|
-
switch(yych){
|
485
|
-
case 0x0A: goto yy35;
|
486
|
-
default: goto yy11;
|
487
|
-
}
|
488
|
-
yy38: ++YYCURSOR;
|
489
|
-
goto yy39;
|
490
|
-
yy39:
|
491
|
-
#line 222 "bytecode.re"
|
492
|
-
{ int complex = 0;
|
493
|
-
if ( lvl->ncount % 2 == 0 && ( lvl->status == syck_lvl_map || lvl->status == syck_lvl_seq ) )
|
494
|
-
{
|
495
|
-
complex = 1;
|
496
|
-
}
|
497
|
-
ADD_BYTE_LEVEL(lvl, lvl->spaces + 1, syck_lvl_map);
|
498
|
-
CHK_NL(YYCURSOR);
|
499
|
-
if ( complex )
|
500
|
-
{
|
501
|
-
FORCE_NEXT_TOKEN( YAML_IOPEN );
|
502
|
-
return '?';
|
503
|
-
}
|
504
|
-
return YAML_IOPEN;
|
505
|
-
}
|
506
|
-
#line 507 "<stdout>"
|
507
|
-
yy40: yych = *++YYCURSOR;
|
508
|
-
switch(yych){
|
509
|
-
case 0x0A: goto yy38;
|
510
|
-
default: goto yy11;
|
511
|
-
}
|
512
|
-
yy41: ++YYCURSOR;
|
513
|
-
goto yy42;
|
514
|
-
yy42:
|
515
|
-
#line 217 "bytecode.re"
|
516
|
-
{ ENSURE_YAML_IEND(lvl, -1);
|
517
|
-
YYPOS(0);
|
518
|
-
return 0;
|
519
|
-
}
|
520
|
-
#line 521 "<stdout>"
|
521
|
-
yy43: yych = *++YYCURSOR;
|
522
|
-
switch(yych){
|
523
|
-
case 0x0A: goto yy41;
|
524
|
-
default: goto yy11;
|
525
|
-
}
|
526
|
-
yy44: ++YYCURSOR;
|
527
|
-
switch((yych = *YYCURSOR)) {
|
528
|
-
case 0x0A: goto yy41;
|
529
|
-
default: goto yy11;
|
530
|
-
}
|
531
|
-
}
|
532
|
-
#line 386 "bytecode.re"
|
533
|
-
|
534
|
-
|
535
|
-
}
|
536
|
-
|
537
|
-
Directive:
|
538
|
-
{
|
539
|
-
YYTOKEN = YYCURSOR;
|
540
|
-
|
541
|
-
|
542
|
-
#line 543 "<stdout>"
|
543
|
-
{
|
544
|
-
YYCTYPE yych;
|
545
|
-
unsigned int yyaccept = 0;
|
546
|
-
goto yy45;
|
547
|
-
++YYCURSOR;
|
548
|
-
yy45:
|
549
|
-
if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
|
550
|
-
yych = *YYCURSOR;
|
551
|
-
switch(yych){
|
552
|
-
case 0x00: goto yy47;
|
553
|
-
case 'V': goto yy48;
|
554
|
-
default: goto yy50;
|
555
|
-
}
|
556
|
-
yy47: YYCURSOR = YYMARKER;
|
557
|
-
switch(yyaccept){
|
558
|
-
case 0: goto yy49;
|
559
|
-
}
|
560
|
-
yy48: yyaccept = 0;
|
561
|
-
yych = *(YYMARKER = ++YYCURSOR);
|
562
|
-
switch(yych){
|
563
|
-
case '.':
|
564
|
-
case '/':
|
565
|
-
case '0':
|
566
|
-
case '1':
|
567
|
-
case '2':
|
568
|
-
case '3':
|
569
|
-
case '4':
|
570
|
-
case '5':
|
571
|
-
case '6':
|
572
|
-
case '7':
|
573
|
-
case '8':
|
574
|
-
case '9':
|
575
|
-
case ':':
|
576
|
-
case ';':
|
577
|
-
case '<':
|
578
|
-
case '=':
|
579
|
-
case '>':
|
580
|
-
case '?':
|
581
|
-
case '@':
|
582
|
-
case 'A':
|
583
|
-
case 'B':
|
584
|
-
case 'C':
|
585
|
-
case 'D':
|
586
|
-
case 'E':
|
587
|
-
case 'F':
|
588
|
-
case 'G':
|
589
|
-
case 'H':
|
590
|
-
case 'I':
|
591
|
-
case 'J':
|
592
|
-
case 'K':
|
593
|
-
case 'L':
|
594
|
-
case 'M':
|
595
|
-
case 'N':
|
596
|
-
case 'O':
|
597
|
-
case 'P':
|
598
|
-
case 'Q':
|
599
|
-
case 'R':
|
600
|
-
case 'S':
|
601
|
-
case 'T':
|
602
|
-
case 'U':
|
603
|
-
case 'V':
|
604
|
-
case 'W':
|
605
|
-
case 'X':
|
606
|
-
case 'Y':
|
607
|
-
case 'Z':
|
608
|
-
case '[':
|
609
|
-
case '\\':
|
610
|
-
case ']':
|
611
|
-
case '^':
|
612
|
-
case '_': case 'a':
|
613
|
-
case 'b':
|
614
|
-
case 'c':
|
615
|
-
case 'd':
|
616
|
-
case 'e':
|
617
|
-
case 'f':
|
618
|
-
case 'g':
|
619
|
-
case 'h':
|
620
|
-
case 'i':
|
621
|
-
case 'j':
|
622
|
-
case 'k':
|
623
|
-
case 'l':
|
624
|
-
case 'm':
|
625
|
-
case 'n':
|
626
|
-
case 'o':
|
627
|
-
case 'p':
|
628
|
-
case 'q':
|
629
|
-
case 'r':
|
630
|
-
case 's':
|
631
|
-
case 't':
|
632
|
-
case 'u':
|
633
|
-
case 'v':
|
634
|
-
case 'w':
|
635
|
-
case 'x':
|
636
|
-
case 'y':
|
637
|
-
case 'z': goto yy51;
|
638
|
-
default: goto yy49;
|
639
|
-
}
|
640
|
-
yy49:
|
641
|
-
#line 399 "bytecode.re"
|
642
|
-
{ YYCURSOR = YYTOKEN;
|
643
|
-
return YAML_DOCSEP;
|
644
|
-
}
|
645
|
-
#line 646 "<stdout>"
|
646
|
-
yy50: yych = *++YYCURSOR;
|
647
|
-
goto yy49;
|
648
|
-
yy51: ++YYCURSOR;
|
649
|
-
if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
|
650
|
-
yych = *YYCURSOR;
|
651
|
-
goto yy52;
|
652
|
-
yy52: switch(yych){
|
653
|
-
case '.':
|
654
|
-
case '/':
|
655
|
-
case '0':
|
656
|
-
case '1':
|
657
|
-
case '2':
|
658
|
-
case '3':
|
659
|
-
case '4':
|
660
|
-
case '5':
|
661
|
-
case '6':
|
662
|
-
case '7':
|
663
|
-
case '8':
|
664
|
-
case '9': case ';':
|
665
|
-
case '<':
|
666
|
-
case '=':
|
667
|
-
case '>':
|
668
|
-
case '?':
|
669
|
-
case '@':
|
670
|
-
case 'A':
|
671
|
-
case 'B':
|
672
|
-
case 'C':
|
673
|
-
case 'D':
|
674
|
-
case 'E':
|
675
|
-
case 'F':
|
676
|
-
case 'G':
|
677
|
-
case 'H':
|
678
|
-
case 'I':
|
679
|
-
case 'J':
|
680
|
-
case 'K':
|
681
|
-
case 'L':
|
682
|
-
case 'M':
|
683
|
-
case 'N':
|
684
|
-
case 'O':
|
685
|
-
case 'P':
|
686
|
-
case 'Q':
|
687
|
-
case 'R':
|
688
|
-
case 'S':
|
689
|
-
case 'T':
|
690
|
-
case 'U':
|
691
|
-
case 'V':
|
692
|
-
case 'W':
|
693
|
-
case 'X':
|
694
|
-
case 'Y':
|
695
|
-
case 'Z':
|
696
|
-
case '[':
|
697
|
-
case '\\':
|
698
|
-
case ']':
|
699
|
-
case '^':
|
700
|
-
case '_': case 'a':
|
701
|
-
case 'b':
|
702
|
-
case 'c':
|
703
|
-
case 'd':
|
704
|
-
case 'e':
|
705
|
-
case 'f':
|
706
|
-
case 'g':
|
707
|
-
case 'h':
|
708
|
-
case 'i':
|
709
|
-
case 'j':
|
710
|
-
case 'k':
|
711
|
-
case 'l':
|
712
|
-
case 'm':
|
713
|
-
case 'n':
|
714
|
-
case 'o':
|
715
|
-
case 'p':
|
716
|
-
case 'q':
|
717
|
-
case 'r':
|
718
|
-
case 's':
|
719
|
-
case 't':
|
720
|
-
case 'u':
|
721
|
-
case 'v':
|
722
|
-
case 'w':
|
723
|
-
case 'x':
|
724
|
-
case 'y':
|
725
|
-
case 'z': goto yy51;
|
726
|
-
case ':': goto yy53;
|
727
|
-
default: goto yy47;
|
728
|
-
}
|
729
|
-
yy53: yych = *++YYCURSOR;
|
730
|
-
switch(yych){
|
731
|
-
case '.':
|
732
|
-
case '/':
|
733
|
-
case '0':
|
734
|
-
case '1':
|
735
|
-
case '2':
|
736
|
-
case '3':
|
737
|
-
case '4':
|
738
|
-
case '5':
|
739
|
-
case '6':
|
740
|
-
case '7':
|
741
|
-
case '8':
|
742
|
-
case '9':
|
743
|
-
case ':':
|
744
|
-
case ';':
|
745
|
-
case '<':
|
746
|
-
case '=':
|
747
|
-
case '>':
|
748
|
-
case '?':
|
749
|
-
case '@':
|
750
|
-
case 'A':
|
751
|
-
case 'B':
|
752
|
-
case 'C':
|
753
|
-
case 'D':
|
754
|
-
case 'E':
|
755
|
-
case 'F':
|
756
|
-
case 'G':
|
757
|
-
case 'H':
|
758
|
-
case 'I':
|
759
|
-
case 'J':
|
760
|
-
case 'K':
|
761
|
-
case 'L':
|
762
|
-
case 'M':
|
763
|
-
case 'N':
|
764
|
-
case 'O':
|
765
|
-
case 'P':
|
766
|
-
case 'Q':
|
767
|
-
case 'R':
|
768
|
-
case 'S':
|
769
|
-
case 'T':
|
770
|
-
case 'U':
|
771
|
-
case 'V':
|
772
|
-
case 'W':
|
773
|
-
case 'X':
|
774
|
-
case 'Y':
|
775
|
-
case 'Z':
|
776
|
-
case '[':
|
777
|
-
case '\\':
|
778
|
-
case ']':
|
779
|
-
case '^':
|
780
|
-
case '_': case 'a':
|
781
|
-
case 'b':
|
782
|
-
case 'c':
|
783
|
-
case 'd':
|
784
|
-
case 'e':
|
785
|
-
case 'f':
|
786
|
-
case 'g':
|
787
|
-
case 'h':
|
788
|
-
case 'i':
|
789
|
-
case 'j':
|
790
|
-
case 'k':
|
791
|
-
case 'l':
|
792
|
-
case 'm':
|
793
|
-
case 'n':
|
794
|
-
case 'o':
|
795
|
-
case 'p':
|
796
|
-
case 'q':
|
797
|
-
case 'r':
|
798
|
-
case 's':
|
799
|
-
case 't':
|
800
|
-
case 'u':
|
801
|
-
case 'v':
|
802
|
-
case 'w':
|
803
|
-
case 'x':
|
804
|
-
case 'y':
|
805
|
-
case 'z': goto yy54;
|
806
|
-
default: goto yy47;
|
807
|
-
}
|
808
|
-
yy54: ++YYCURSOR;
|
809
|
-
if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
|
810
|
-
yych = *YYCURSOR;
|
811
|
-
goto yy55;
|
812
|
-
yy55: switch(yych){
|
813
|
-
case 0x0A: goto yy56;
|
814
|
-
case 0x0D: goto yy58;
|
815
|
-
case '.':
|
816
|
-
case '/':
|
817
|
-
case '0':
|
818
|
-
case '1':
|
819
|
-
case '2':
|
820
|
-
case '3':
|
821
|
-
case '4':
|
822
|
-
case '5':
|
823
|
-
case '6':
|
824
|
-
case '7':
|
825
|
-
case '8':
|
826
|
-
case '9':
|
827
|
-
case ':':
|
828
|
-
case ';':
|
829
|
-
case '<':
|
830
|
-
case '=':
|
831
|
-
case '>':
|
832
|
-
case '?':
|
833
|
-
case '@':
|
834
|
-
case 'A':
|
835
|
-
case 'B':
|
836
|
-
case 'C':
|
837
|
-
case 'D':
|
838
|
-
case 'E':
|
839
|
-
case 'F':
|
840
|
-
case 'G':
|
841
|
-
case 'H':
|
842
|
-
case 'I':
|
843
|
-
case 'J':
|
844
|
-
case 'K':
|
845
|
-
case 'L':
|
846
|
-
case 'M':
|
847
|
-
case 'N':
|
848
|
-
case 'O':
|
849
|
-
case 'P':
|
850
|
-
case 'Q':
|
851
|
-
case 'R':
|
852
|
-
case 'S':
|
853
|
-
case 'T':
|
854
|
-
case 'U':
|
855
|
-
case 'V':
|
856
|
-
case 'W':
|
857
|
-
case 'X':
|
858
|
-
case 'Y':
|
859
|
-
case 'Z':
|
860
|
-
case '[':
|
861
|
-
case '\\':
|
862
|
-
case ']':
|
863
|
-
case '^':
|
864
|
-
case '_': case 'a':
|
865
|
-
case 'b':
|
866
|
-
case 'c':
|
867
|
-
case 'd':
|
868
|
-
case 'e':
|
869
|
-
case 'f':
|
870
|
-
case 'g':
|
871
|
-
case 'h':
|
872
|
-
case 'i':
|
873
|
-
case 'j':
|
874
|
-
case 'k':
|
875
|
-
case 'l':
|
876
|
-
case 'm':
|
877
|
-
case 'n':
|
878
|
-
case 'o':
|
879
|
-
case 'p':
|
880
|
-
case 'q':
|
881
|
-
case 'r':
|
882
|
-
case 's':
|
883
|
-
case 't':
|
884
|
-
case 'u':
|
885
|
-
case 'v':
|
886
|
-
case 'w':
|
887
|
-
case 'x':
|
888
|
-
case 'y':
|
889
|
-
case 'z': goto yy54;
|
890
|
-
default: goto yy47;
|
891
|
-
}
|
892
|
-
yy56: ++YYCURSOR;
|
893
|
-
goto yy57;
|
894
|
-
yy57:
|
895
|
-
#line 396 "bytecode.re"
|
896
|
-
{ CHK_NL(YYCURSOR);
|
897
|
-
goto Directive; }
|
898
|
-
#line 899 "<stdout>"
|
899
|
-
yy58: ++YYCURSOR;
|
900
|
-
switch((yych = *YYCURSOR)) {
|
901
|
-
case 0x0A: goto yy56;
|
902
|
-
default: goto yy47;
|
903
|
-
}
|
904
|
-
}
|
905
|
-
#line 402 "bytecode.re"
|
906
|
-
|
907
|
-
|
908
|
-
}
|
909
|
-
|
910
|
-
Comment:
|
911
|
-
{
|
912
|
-
YYTOKEN = YYCURSOR;
|
913
|
-
|
914
|
-
|
915
|
-
#line 916 "<stdout>"
|
916
|
-
{
|
917
|
-
YYCTYPE yych;
|
918
|
-
goto yy59;
|
919
|
-
++YYCURSOR;
|
920
|
-
yy59:
|
921
|
-
if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
|
922
|
-
yych = *YYCURSOR;
|
923
|
-
switch(yych){
|
924
|
-
case 0x00: goto yy61;
|
925
|
-
case 0x0A: goto yy62;
|
926
|
-
case 0x0D: goto yy64;
|
927
|
-
default: goto yy66;
|
928
|
-
}
|
929
|
-
yy61:yy62: ++YYCURSOR;
|
930
|
-
goto yy63;
|
931
|
-
yy63:
|
932
|
-
#line 412 "bytecode.re"
|
933
|
-
{ CHK_NL(YYCURSOR);
|
934
|
-
goto Document; }
|
935
|
-
#line 936 "<stdout>"
|
936
|
-
yy64: ++YYCURSOR;
|
937
|
-
switch((yych = *YYCURSOR)) {
|
938
|
-
case 0x0A: goto yy67;
|
939
|
-
default: goto yy65;
|
940
|
-
}
|
941
|
-
yy65:
|
942
|
-
#line 415 "bytecode.re"
|
943
|
-
{ goto Comment; }
|
944
|
-
#line 945 "<stdout>"
|
945
|
-
yy66: yych = *++YYCURSOR;
|
946
|
-
goto yy65;
|
947
|
-
yy67: ++YYCURSOR;
|
948
|
-
yych = *YYCURSOR;
|
949
|
-
goto yy63;
|
950
|
-
}
|
951
|
-
#line 417 "bytecode.re"
|
952
|
-
|
953
|
-
|
954
|
-
}
|
955
|
-
|
956
|
-
Scalar:
|
957
|
-
{
|
958
|
-
int idx = 0;
|
959
|
-
int cap = 100;
|
960
|
-
char *str = S_ALLOC_N( char, cap );
|
961
|
-
char *tok;
|
962
|
-
|
963
|
-
str[0] = '\0';
|
964
|
-
|
965
|
-
Scalar2:
|
966
|
-
tok = YYCURSOR;
|
967
|
-
|
968
|
-
|
969
|
-
#line 970 "<stdout>"
|
970
|
-
{
|
971
|
-
YYCTYPE yych;
|
972
|
-
goto yy68;
|
973
|
-
++YYCURSOR;
|
974
|
-
yy68:
|
975
|
-
if((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
|
976
|
-
yych = *YYCURSOR;
|
977
|
-
switch(yych){
|
978
|
-
case 0x00: goto yy74;
|
979
|
-
case 0x0A: goto yy70;
|
980
|
-
case 0x0D: goto yy72;
|
981
|
-
default: goto yy76;
|
982
|
-
}
|
983
|
-
yy70: ++YYCURSOR;
|
984
|
-
switch((yych = *YYCURSOR)) {
|
985
|
-
case 'C': goto yy78;
|
986
|
-
case 'N': goto yy80;
|
987
|
-
case 'Z': goto yy83;
|
988
|
-
default: goto yy71;
|
989
|
-
}
|
990
|
-
yy71:
|
991
|
-
#line 461 "bytecode.re"
|
992
|
-
{ YYCURSOR = tok;
|
993
|
-
goto ScalarEnd;
|
994
|
-
}
|
995
|
-
#line 996 "<stdout>"
|
996
|
-
yy72: ++YYCURSOR;
|
997
|
-
switch((yych = *YYCURSOR)) {
|
998
|
-
case 0x0A: goto yy77;
|
999
|
-
default: goto yy73;
|
1000
|
-
}
|
1001
|
-
yy73:
|
1002
|
-
#line 469 "bytecode.re"
|
1003
|
-
{ CAT(str, cap, idx, tok[0]);
|
1004
|
-
goto Scalar2;
|
1005
|
-
}
|
1006
|
-
#line 1007 "<stdout>"
|
1007
|
-
yy74: ++YYCURSOR;
|
1008
|
-
goto yy75;
|
1009
|
-
yy75:
|
1010
|
-
#line 465 "bytecode.re"
|
1011
|
-
{ YYCURSOR = tok;
|
1012
|
-
goto ScalarEnd;
|
1013
|
-
}
|
1014
|
-
#line 1015 "<stdout>"
|
1015
|
-
yy76: yych = *++YYCURSOR;
|
1016
|
-
goto yy73;
|
1017
|
-
yy77: yych = *++YYCURSOR;
|
1018
|
-
switch(yych){
|
1019
|
-
case 'C': goto yy78;
|
1020
|
-
case 'N': goto yy80;
|
1021
|
-
case 'Z': goto yy83;
|
1022
|
-
default: goto yy71;
|
1023
|
-
}
|
1024
|
-
yy78: ++YYCURSOR;
|
1025
|
-
goto yy79;
|
1026
|
-
yy79:
|
1027
|
-
#line 435 "bytecode.re"
|
1028
|
-
{ CHK_NL(tok+1);
|
1029
|
-
goto Scalar2; }
|
1030
|
-
#line 1031 "<stdout>"
|
1031
|
-
yy80: ++YYCURSOR;
|
1032
|
-
if(YYLIMIT == YYCURSOR) YYFILL(1);
|
1033
|
-
yych = *YYCURSOR;
|
1034
|
-
goto yy81;
|
1035
|
-
yy81: switch(yych){
|
1036
|
-
case '0':
|
1037
|
-
case '1':
|
1038
|
-
case '2':
|
1039
|
-
case '3':
|
1040
|
-
case '4':
|
1041
|
-
case '5':
|
1042
|
-
case '6':
|
1043
|
-
case '7':
|
1044
|
-
case '8':
|
1045
|
-
case '9': goto yy80;
|
1046
|
-
default: goto yy82;
|
1047
|
-
}
|
1048
|
-
yy82:
|
1049
|
-
#line 438 "bytecode.re"
|
1050
|
-
{ CHK_NL(tok+1);
|
1051
|
-
if ( tok + 2 < YYCURSOR )
|
1052
|
-
{
|
1053
|
-
char *count = tok + 2;
|
1054
|
-
int total = strtod( count, NULL );
|
1055
|
-
int i;
|
1056
|
-
for ( i = 0; i < total; i++ )
|
1057
|
-
{
|
1058
|
-
CAT(str, cap, idx, '\n');
|
1059
|
-
}
|
1060
|
-
}
|
1061
|
-
else
|
1062
|
-
{
|
1063
|
-
CAT(str, cap, idx, '\n');
|
1064
|
-
}
|
1065
|
-
goto Scalar2;
|
1066
|
-
}
|
1067
|
-
#line 1068 "<stdout>"
|
1068
|
-
yy83: ++YYCURSOR;
|
1069
|
-
goto yy84;
|
1070
|
-
yy84:
|
1071
|
-
#line 456 "bytecode.re"
|
1072
|
-
{ CHK_NL(tok+1);
|
1073
|
-
CAT(str, cap, idx, '\0');
|
1074
|
-
goto Scalar2;
|
1075
|
-
}
|
1076
|
-
#line 1077 "<stdout>"
|
1077
|
-
}
|
1078
|
-
#line 473 "bytecode.re"
|
1079
|
-
|
1080
|
-
|
1081
|
-
ScalarEnd:
|
1082
|
-
{
|
1083
|
-
SyckNode *n = syck_alloc_str();
|
1084
|
-
n->data.str->ptr = str;
|
1085
|
-
n->data.str->len = idx;
|
1086
|
-
sycklval->nodeData = n;
|
1087
|
-
POP_LEVEL();
|
1088
|
-
if ( parser->implicit_typing == 1 )
|
1089
|
-
{
|
1090
|
-
try_tag_implicit( sycklval->nodeData, parser->taguri_expansion );
|
1091
|
-
}
|
1092
|
-
return YAML_PLAIN;
|
1093
|
-
}
|
1094
|
-
}
|
1095
|
-
|
1096
|
-
}
|
1097
|
-
|
1098
|
-
char *
|
1099
|
-
get_inline( SyckParser *parser )
|
1100
|
-
{
|
1101
|
-
int idx = 0;
|
1102
|
-
int cap = 100;
|
1103
|
-
char *str = S_ALLOC_N( char, cap );
|
1104
|
-
char *tok;
|
1105
|
-
|
1106
|
-
str[0] = '\0';
|
1107
|
-
|
1108
|
-
Inline:
|
1109
|
-
{
|
1110
|
-
tok = YYCURSOR;
|
1111
|
-
|
1112
|
-
|
1113
|
-
#line 1114 "<stdout>"
|
1114
|
-
{
|
1115
|
-
YYCTYPE yych;
|
1116
|
-
goto yy85;
|
1117
|
-
++YYCURSOR;
|
1118
|
-
yy85:
|
1119
|
-
if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
|
1120
|
-
yych = *YYCURSOR;
|
1121
|
-
switch(yych){
|
1122
|
-
case 0x00: goto yy91;
|
1123
|
-
case 0x0A: goto yy87;
|
1124
|
-
case 0x0D: goto yy89;
|
1125
|
-
default: goto yy93;
|
1126
|
-
}
|
1127
|
-
yy87: ++YYCURSOR;
|
1128
|
-
goto yy88;
|
1129
|
-
yy88:
|
1130
|
-
#line 508 "bytecode.re"
|
1131
|
-
{ CHK_NL(YYCURSOR);
|
1132
|
-
return str; }
|
1133
|
-
#line 1134 "<stdout>"
|
1134
|
-
yy89: ++YYCURSOR;
|
1135
|
-
switch((yych = *YYCURSOR)) {
|
1136
|
-
case 0x0A: goto yy94;
|
1137
|
-
default: goto yy90;
|
1138
|
-
}
|
1139
|
-
yy90:
|
1140
|
-
#line 515 "bytecode.re"
|
1141
|
-
{ CAT(str, cap, idx, tok[0]);
|
1142
|
-
goto Inline;
|
1143
|
-
}
|
1144
|
-
#line 1145 "<stdout>"
|
1145
|
-
yy91: ++YYCURSOR;
|
1146
|
-
goto yy92;
|
1147
|
-
yy92:
|
1148
|
-
#line 511 "bytecode.re"
|
1149
|
-
{ YYCURSOR = tok;
|
1150
|
-
return str;
|
1151
|
-
}
|
1152
|
-
#line 1153 "<stdout>"
|
1153
|
-
yy93: yych = *++YYCURSOR;
|
1154
|
-
goto yy90;
|
1155
|
-
yy94: ++YYCURSOR;
|
1156
|
-
yych = *YYCURSOR;
|
1157
|
-
goto yy88;
|
1158
|
-
}
|
1159
|
-
#line 519 "bytecode.re"
|
1160
|
-
|
1161
|
-
|
1162
|
-
}
|
1163
|
-
|
1164
|
-
}
|
1165
|
-
|