1 |
commit: 1fcf88bab1fc5efe907660e30cb88a02cd13be5e |
2 |
Author: Samuel Bernardo <samuelbernardo.mail <AT> gmail <DOT> com> |
3 |
AuthorDate: Mon Feb 8 10:19:05 2021 +0000 |
4 |
Commit: Samuel Bernardo <samuelbernardo.mail <AT> gmail <DOT> com> |
5 |
CommitDate: Mon Feb 8 10:19:05 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/user/ssnb.git/commit/?id=1fcf88ba |
7 |
|
8 |
Temporary removing opennebula until I have the time to review it for new versions |
9 |
|
10 |
Signed-off-by: Samuel Bernardo <samuelbernardo.mail <AT> gmail.com> |
11 |
|
12 |
app-emulation/opennebula/Manifest | 74 - |
13 |
.../opennebula/files/logrotate/opennebula | 13 - |
14 |
.../opennebula/files/logrotate/opennebula-econe | 13 - |
15 |
.../opennebula/files/logrotate/opennebula-flow | 13 - |
16 |
.../opennebula/files/logrotate/opennebula-gate | 13 - |
17 |
.../opennebula/files/logrotate/opennebula-hem | 13 - |
18 |
.../opennebula/files/logrotate/opennebula-novnc | 13 - |
19 |
.../files/logrotate/opennebula-scheduler | 13 - |
20 |
.../opennebula/files/logrotate/opennebula-sunstone | 13 - |
21 |
app-emulation/opennebula/files/one_auth | 1 - |
22 |
.../files/opennebula-5.10.1/parsers/SConstruct | 74 - |
23 |
.../files/opennebula-5.10.1/parsers/expr_arith.cc | 1732 -------------- |
24 |
.../files/opennebula-5.10.1/parsers/expr_arith.h | 117 - |
25 |
.../files/opennebula-5.10.1/parsers/expr_arith.y | 141 -- |
26 |
.../files/opennebula-5.10.1/parsers/expr_bool.cc | 1902 ---------------- |
27 |
.../files/opennebula-5.10.1/parsers/expr_bool.h | 118 - |
28 |
.../files/opennebula-5.10.1/parsers/expr_bool.y | 271 --- |
29 |
.../files/opennebula-5.10.1/parsers/expr_parser.cc | 2260 ------------------- |
30 |
.../files/opennebula-5.10.1/parsers/expr_parser.h | 717 ------ |
31 |
.../files/opennebula-5.10.1/parsers/expr_parser.l | 77 - |
32 |
.../opennebula-5.10.1/parsers/mem_collector.cc | 90 - |
33 |
.../opennebula-5.10.1/parsers/template_parser.cc | 2363 -------------------- |
34 |
.../opennebula-5.10.1/parsers/template_parser.h | 718 ------ |
35 |
.../opennebula-5.10.1/parsers/template_parser.l | 107 - |
36 |
.../opennebula-5.10.1/parsers/template_syntax.cc | 1779 --------------- |
37 |
.../opennebula-5.10.1/parsers/template_syntax.h | 119 - |
38 |
.../opennebula-5.10.1/parsers/template_syntax.y | 215 -- |
39 |
.../parsers/vm_file_var_syntax.cc | 1843 --------------- |
40 |
.../opennebula-5.10.1/parsers/vm_file_var_syntax.h | 125 -- |
41 |
.../opennebula-5.10.1/parsers/vm_file_var_syntax.y | 301 --- |
42 |
.../opennebula-5.10.1/parsers/vm_var_parser.cc | 2319 ------------------- |
43 |
.../opennebula-5.10.1/parsers/vm_var_parser.h | 719 ------ |
44 |
.../opennebula-5.10.1/parsers/vm_var_parser.l | 100 - |
45 |
.../opennebula-5.10.1/parsers/vm_var_syntax.cc | 2089 ----------------- |
46 |
.../opennebula-5.10.1/parsers/vm_var_syntax.h | 124 - |
47 |
.../opennebula-5.10.1/parsers/vm_var_syntax.y | 538 ----- |
48 |
app-emulation/opennebula/files/openrc/99one | 1 - |
49 |
.../opennebula/files/openrc/oneflow-server.confd | 10 - |
50 |
.../opennebula/files/openrc/oneflow-server.initd | 34 - |
51 |
.../opennebula/files/openrc/opennebula.confd | 12 - |
52 |
.../opennebula/files/openrc/opennebula.initd | 40 - |
53 |
.../opennebula/files/openrc/sunstone-server.confd | 10 - |
54 |
.../opennebula/files/openrc/sunstone-server.initd | 34 - |
55 |
.../files/patches/fix_kvm_emulator.5.12.0.1.patch | 11 - |
56 |
.../files/patches/fix_kvm_emulator.patch | 12 - |
57 |
.../files/patches/install.sh.5.12.0.1.patch | 14 - |
58 |
.../opennebula/files/patches/install.sh.patch | 25 - |
59 |
.../files/patches/node-sass.5.12.0.1.patch | 20 - |
60 |
.../files/patches/package.js.5.12.0.1.patch | 20 - |
61 |
app-emulation/opennebula/files/sudoers/opennebula | 14 - |
62 |
.../opennebula/files/sudoers/opennebula-node | 1 - |
63 |
.../opennebula/files/sudoers/opennebula-node-lxd | 1 - |
64 |
.../opennebula/files/sudoers/opennebula-server | 1 - |
65 |
.../files/systemd/opennebula-econe.service | 19 - |
66 |
.../files/systemd/opennebula-flow.service | 19 - |
67 |
.../files/systemd/opennebula-gate.service | 19 - |
68 |
.../files/systemd/opennebula-hem.service | 18 - |
69 |
.../files/systemd/opennebula-novnc.service | 18 - |
70 |
.../files/systemd/opennebula-scheduler.service | 19 - |
71 |
.../files/systemd/opennebula-sunstone.service | 20 - |
72 |
.../opennebula/files/systemd/opennebula.service | 21 - |
73 |
.../files/tmpfiles.d/opennebula-flow.conf | 2 - |
74 |
.../files/tmpfiles.d/opennebula-gate.conf | 2 - |
75 |
.../files/tmpfiles.d/opennebula-node.conf | 1 - |
76 |
.../files/tmpfiles.d/opennebula-sunstone.conf | 2 - |
77 |
.../opennebula/files/tmpfiles.d/opennebula.conf | 2 - |
78 |
app-emulation/opennebula/metadata.xml | 33 - |
79 |
app-emulation/opennebula/opennebula-5.10.1.ebuild | 292 --- |
80 |
app-emulation/opennebula/opennebula-5.10.4.ebuild | 306 --- |
81 |
app-emulation/opennebula/opennebula-5.10.5.ebuild | 314 --- |
82 |
.../opennebula/opennebula-5.12.0.1.ebuild | 315 --- |
83 |
71 files changed, 22819 deletions(-) |
84 |
|
85 |
diff --git a/app-emulation/opennebula/Manifest b/app-emulation/opennebula/Manifest |
86 |
deleted file mode 100644 |
87 |
index 0ee60ac..0000000 |
88 |
--- a/app-emulation/opennebula/Manifest |
89 |
+++ /dev/null |
90 |
@@ -1,74 +0,0 @@ |
91 |
-AUX logrotate/opennebula 172 BLAKE2B 18c2f029cf9b5579ad77e2ccb87de842b49566e4b3086a39c1332d17238ff4e21aae4cf2b9c774c8d48f5a86ae492b187253a1485d4a9e20fb6d8e743c56c18d SHA512 f85c652667edb120e3fbdea7a23a7e61ec7bc1cf19f27d1b7d58417f61081af715c0ed70803cc42904ae4281296be7cafdd131ec305bea242bd99298fd7f4c79 |
92 |
-AUX logrotate/opennebula-econe 149 BLAKE2B a736cc6174f215ef44cb42dabc077818a453724d662b310b2599dd2e95eccd844df0cf014a6d97910d9b06299fcb051ab5a07f1f546c9381418d6528a6ac6686 SHA512 222b29dae4ea16b127f3526083cadcec3b7de7bd97636ff2565e7e9802bb313262955ec23dbf3ef3ec066a793fd4cacedd0bcac3af6afa20222faa183fefbd34 |
93 |
-AUX logrotate/opennebula-flow 144 BLAKE2B 93bac175f8bffc75728936b30e198e57009226c357e6bf639869d5fb4a4eaa4933682a3db0badc319e6710130a5461c27aa1bad0364b926d519db9bdcb5b7bd6 SHA512 cc8123c0153d57ba1209f8c130cbf7e85452bfaf58e848cf0f0dd2c27ebf057f774ce1f33ce238ba0c34fce0eef2b7e32b72cd103a09a6d12f9e79019d9159a2 |
94 |
-AUX logrotate/opennebula-gate 144 BLAKE2B e7bd2782b32a58ad87a54953f36b5c4e6eae9d624ae399010ac20e3fc323d4e6fafd531a3015bd81abf590a05fbd62b6bf5ee09febf0834396cf79f27b4ade00 SHA512 46a9169260e2e5f8ca5f6e2b37537f09a1cffd5aa2bcf0f92e316a5e2442bc519e1d653a27bb1b4cef957e1090568646ecb5c6dbc0c89e7445317b7598b29eab |
95 |
-AUX logrotate/opennebula-hem 143 BLAKE2B 0c8813f5559ab784c97c6dbdb5d6972b1287c1258202f2603b279f684431dac1be0d8cce43a60b60e7886b664af24c6996c2c464eab2fefcabc5da305f1f135b SHA512 e8d654e6e49f22cfc0324c942b8e62d22606747f0fa54541e0e0d5f33f851d36e806026857537fdf54517e5b775c4fe96e62e4892aa0c7bf76742736d4c6dd23 |
96 |
-AUX logrotate/opennebula-novnc 142 BLAKE2B 77000cb2ad091d7699b34c21a1978c8a1b815c8b817cdd3040a4efa6d33ea4f59ffe9277675a55611474b3777b79f6241473e7237edb4e12f28e8423af3e2015 SHA512 b3bde016333c76a85e282ea98a72c1bef09ea1fa0aa92e588ea22a8aa2ccd8575f530142fdda2d897e0f98e5db2c617bfefbc730d7a8a4278097e67dab3e240f |
97 |
-AUX logrotate/opennebula-scheduler 142 BLAKE2B bd15c5c89ba2d3ccdcbb36b0d4502daf4e7e151bbb81dc8ec031519a532adfba38aa77ee08ed8133aee77936b3c9a64354dce78e78dc821aeae05bfd1addaf10 SHA512 ae6c14585cb94f0f7151ef9f5162208eff41fe2293fef197afa5bd9ecd7cd5fe1958551bfb08055273b06293fc6bffbed29a6f67d3a23e3aa2899c7108a9aa7d |
98 |
-AUX logrotate/opennebula-sunstone 145 BLAKE2B 78ac4a223870b83f1f85338c405e1a5f8adde850ba941a7ead70bc4f8759ba26171a689835ab524c83ba52c78046140b7725c64ba0a41af8550033cea0b873c5 SHA512 9c99d33754a4ac67d698b9e5c0db01531b86516645256273c83205805b60c7b3dda75f9400ee620745ac0cb440fba34e25a77acecec561074e20758f55a989ce |
99 |
-AUX one_auth 18 BLAKE2B d716be15da2ec04170be79dfd807b383aad1e98b01063aeb94a91ee8f22d3d6063fd7e9a98ff43d6eaf8ed8fb7aac5ee96ecb84b173b20dec55c0ef5d852d726 SHA512 c4cc94b521013fffbaba6c0949e753e3239b5e5555734b783dc9f5929d212a8530215fddd311424cee51228ebfdb61d622bbdfaa768dc08603341ac70b010c14 |
100 |
-AUX opennebula-5.10.1/parsers/SConstruct 2142 BLAKE2B ab92b55806a898b200a73042554a6d880583fdba710f30a44641bbd27d09cf56d4a5927c57d744305817be88e7369bd29ab6f10683af8c8763296901b2ea27f1 SHA512 4f603471183d186fb493a6fd487e4bd99fb7453701bdec1af7498001cb9b54cb46fba9a046531c0a4966a875b3110a1257da4e323040bd5e0db6ff431dced9ad |
101 |
-AUX opennebula-5.10.1/parsers/expr_arith.cc 53125 BLAKE2B ba4bde2e70d356e72ec58d15c8de4016d311890c261ef8dc4f468f5309dbaabcc85c1abb5fc45426d36a40af0d8695e523e7088b458c9f55867d92087ca133a9 SHA512 811c7a22ccbb50f8fe2a753c01b1a53c0dd60f101f37db5c6b9125af575602410a82dcc65c858289373e138a23021675cce3dac0b805b34c6691f6b715998bbf |
102 |
-AUX opennebula-5.10.1/parsers/expr_arith.h 3185 BLAKE2B 0e811efaacf1f5c4ec85e38a148045783de510409d52c9676e74f64e69dd8dfa0714f87f7294d49e164ea10c09f535251e5065a5207aef2a5f7521841906e44c SHA512 d37180cd76043b4957ed8bcff512d710703715f7e4820b91af27cd207b23fa04937988e5cd292dc631ee5a75ead512110e85c8c7402305b77a699ca040c7ef0c |
103 |
-AUX opennebula-5.10.1/parsers/expr_arith.y 3912 BLAKE2B f1a7d35743f5fccdea396f8c20d4786635ea6f70b2093f1e48c34d8c4ed93e271fbec460537cd496e9b630efb4c940f77734cbe464846f1eeb861ac435cc431a SHA512 a77cde752f0a83c6cac764f61353664efd76a6fe2989ec7004209e98054e4f51cefd67a3240a6ad1f50ebf4ba471101770d19d2bd856085fea69a394908fdde6 |
104 |
-AUX opennebula-5.10.1/parsers/expr_bool.cc 57312 BLAKE2B 67bc02b1ca1649f699173b7c23e759d20ec61c71fbdaac049b0ea4130311b6d9818c5aa7f1b56371b9589b0a990b5a3ec3b6c023c61cf140e63a01a2035c2fef SHA512 9992a2430d55de7689611914dbc682411ac6aa8c1c37eda7167f1b598ca0473bf46e507be89669af579d4a53a2f78a0953d8b1f9482b76e9f39dabdf7c7c7572 |
105 |
-AUX opennebula-5.10.1/parsers/expr_bool.h 3175 BLAKE2B 1764e64cfe7d495c334c4e5afc5423d978cea9a2988e99e96808280ca53847ab83bfe286c41b56d4f2aa97b388584c60c6d2b6232f550555f682698bbd05ef0f SHA512 b84c2f0037c9f94a30bcd167b06cc5bfa838ff02183392756fd8b0f360be5635e7f440786bd23fc27d7c9d5e68ad60d69e12deaad55becbbfd933e606d6fe4df |
106 |
-AUX opennebula-5.10.1/parsers/expr_bool.y 6574 BLAKE2B 36a9ed206fa6b29c560298ae46574f11cc478083124368313f4c594f39eb1cbd5ede9b847d7b336f585fab2b9ba0cd7b76565a088e00a7af8f5977ebf82d7fe5 SHA512 6095ca4b0b7b10e95da272d5ba650501b77a2ac75f671cdc2f3b0e671651aa47cabc82ad77d07a3b1fa4aaf7b42ea1b0efbeaaa7173b1863b99a90ad50bb07ee |
107 |
-AUX opennebula-5.10.1/parsers/expr_parser.cc 61455 BLAKE2B fbd4170dbe8b2ab14daed1071741d2608b9a5741c1b0c780fb0e205d864a1f86ff0feb8592790804d9d993a09cbab60a71f1c3259a9a46adb33db5e8a0428b11 SHA512 4fabe7c15faf6d7fca5056a6fff51d9bd9fef4c4bf1db11264095cbdfebcddd83ab40534957a5bfd7b4e4e30272220c2540f4f74f2d453540fe1fc39163f7844 |
108 |
-AUX opennebula-5.10.1/parsers/expr_parser.h 15948 BLAKE2B 7e14defd80847b3c6a180ef1849853e1a93471a5283a3b60c6a42a2b785aba2a3f698269c595cf8ec8c6a999f3c725bf19f693366c6805c69cbcf45692f060c8 SHA512 e80640f32c7362c9f11d0d144e85a5fe237ab5e8f9fa2f7e88e2930b6182e3b3fbdfc860072a64bd9322e3a7803ae608a4ed9ed92529d85cd841a3da0721114b |
109 |
-AUX opennebula-5.10.1/parsers/expr_parser.l 2610 BLAKE2B 3a9c97b2d05524ad83d7d5c2ccf0b2611a5ea9715a9c82c86e26bc6353da3eaf3d89a66aa67ffc358d9c3c4c2988c2edf18effee0da936f10082b4ca22702b44 SHA512 1dd0f923a32edb437556c026dc133b87fb53e6151d19691dc568cc8161b1c2c56cbcfb667572c79611fba9d04432391ff2693787418c6a6db6de9dbb15d5936a |
110 |
-AUX opennebula-5.10.1/parsers/mem_collector.cc 3097 BLAKE2B 942b9faa03a9c3f6f4d7d5a7bdb21b5f3cfa3a66dcc91676bae0ad641b6ac62ecd3767e223707e52c27e11811c1798f38c3228d3f304ce01ddf216bb8b26e985 SHA512 f6031ab2c568c7b39b067e5d121681261756a4cb966a75a0d1fc16017f92a67b825d52549c53990f9da6b7046826fba531acec04a7c152791ea8d5b3948ef414 |
111 |
-AUX opennebula-5.10.1/parsers/template_parser.cc 66893 BLAKE2B e7718e151856399b67461c86445bbeda43fe6a5f1a6ec1a76b151d3fd5acc2e70b8ea94ff01b0288e3208ab3819daff0f6a2cef8503fbf2f7f8c5b786e1c7575 SHA512 4e4a9f54067a32ed29b91860b508b0bfd0f496d0d098ba18cf0ba40850cd6a5eb41ab8fe4393efd96471d108d95b4dac029f4d1abdcbd0c7f0d704980df1f9a2 |
112 |
-AUX opennebula-5.10.1/parsers/template_parser.h 16489 BLAKE2B a31a0a2f60ce8ac7b098da5f5365597e78d4cd2effd0fb731e4d30745b86825c467086637e874c4678070b624dce76550a82196f73c331dc746499a597225ff2 SHA512 61300b2f6ec15c476f10cd9969fa8f2bfe469ff7b673930a21e85a5ded992d3d7ab2051b7c992d838b9bba308444b3b602f4fbb1c17765c876134d91ce04a418 |
113 |
-AUX opennebula-5.10.1/parsers/template_parser.l 4151 BLAKE2B 9e58a4a32de774cb82212747d386fd51759cabe578e61af4c40b02328ceaa5954342ce59dda3c16a4402edb2d03928d886c8a324867ef8025ea8b91baa57774b SHA512 0d31062deec5a192dbced842623835ee4a72b556d6bf7c758e8659aa14306b9e70bf728ea7a19ccd3d146b482657170a85fe6e2f8a554549769372c0b315c0c8 |
114 |
-AUX opennebula-5.10.1/parsers/template_syntax.cc 54201 BLAKE2B 6b8117b47a52fb9ab422ec542f8ae6c59c266ffacf2fd7e7915ace4a9f88d24fdd298c4e45624ff89d4ce8af3d875a727a03760e972924771d5a79b905bdd2ea SHA512 af0e23335aa75648576edc1ec094dc52ef40464ce27f747850d9b20e13ffa6c2c0ba7a57b82d7db6d68edc273e84a8f1a964a59ce9c203ed537fa6d59803c466 |
115 |
-AUX opennebula-5.10.1/parsers/template_syntax.h 3213 BLAKE2B fd734fab48df0053385f61e21a4c274a8293b2c8879075c18a472a3215b7bfda20b5c1fa3dc0e5cf015605c69adde6ddac995fdd6a04dbb9da408a295c9b0d47 SHA512 90677e4ca6ee2914cb67b64b5cd22144dd9dbc85cb690e27d8d347cbfaea8d9b2abbff24f46faad9784e770155d9534e6932409833c9a945a1622704db8cfd0a |
116 |
-AUX opennebula-5.10.1/parsers/template_syntax.y 5600 BLAKE2B 0f1416693d1dfb81d08e3a3463361dd46fff3e338ac611ce0883a00e2aa9b402a3701d65fe231f5d59faf00dcf88653b7df05fd901068917554623674a15313e SHA512 a1a4e85163cd40a67e77c74772fc67f300bb7a7da76605e9fd56ad30668daea409acfd601d6c73bcd79de8d0c7726eed29e8c10e686272554b5ca7d7fa4d9796 |
117 |
-AUX opennebula-5.10.1/parsers/vm_file_var_syntax.cc 55759 BLAKE2B 7fc094c838e2a66ef2a3c2ed70c5514ae50697126c2dd63da2c62e18036d4a4881d42a76ac3037669f609bc44e82bb1bce0e78f8c2f946f4d1884d8df8d89d44 SHA512 f487d61cade883faf722b76b362668e0f9812cd6c213ac21b4fd3763fc8d7748fbaca23010f7f8579b7b44be8b500f237ec732b5d9899a85370e2573e4accfad |
118 |
-AUX opennebula-5.10.1/parsers/vm_file_var_syntax.h 3417 BLAKE2B 837994320d0f6531dc7eb9eded9655b7832d7f793223df82b5a076c97f27cb0a0cd35837180a0a70d3040c40e0d52c9bc575c0bee66aa7061f97c881cdb80df7 SHA512 74fcc37b0ee532e20187a3e7e3aa7b81d5c9b797c1f2a57e7e7df9a97de9f50f70bbaeeb93541997952a00aec3788eb3b261e1aae410192086bb40a9e7d25deb |
119 |
-AUX opennebula-5.10.1/parsers/vm_file_var_syntax.y 7467 BLAKE2B be35f732d76e15fcfb304845397988b0cfd704000af137240e4166deeda3c1c53d150d683afa394eb5b93befad4ee93fe1f711133183af2ce99178bad18227bd SHA512 8dd4bb7d9e7474e377a46fdf4c06e1a17bb6672b2c20c04185b360ff8f1002a6baf44e79bf1d03512746a9f9f8fb080dd1f5c67998d672dae9ef06d77432dc3b |
120 |
-AUX opennebula-5.10.1/parsers/vm_var_parser.cc 64310 BLAKE2B b6eec8077eaf2ccab8cf5766b18e8515a9490a8c2e2c78dce69c78bbfb2a9dca1a3f4461a3818001ba8cdbcd781998346516206e66cd8e664f1ff70d49c91042 SHA512 68082a1698d673fba5c18f3f1aaaafb8e3b8cf644d2cc3547193c6b4f07ffe08b53f44d41641f30433fe660ef13b6ad0028ed1ada26ef68dcca5020d536389f9 |
121 |
-AUX opennebula-5.10.1/parsers/vm_var_parser.h 16240 BLAKE2B e8a0c217ffa07bbc174b6aad9d283077167222fffff54b6af37a24d13138663fa8e9f207f4689dc9a143646bd80f0b1aa63253d576cf25a7807cca8f023c5044 SHA512 bc041ac5eb68b23714a5a711e528def4b74ebafaa4ec8d3b3429e517cc4b8d5615b56032ce59b1944024aeefedec59605ed4e3152391fef1b8e6d6385d28c2a0 |
122 |
-AUX opennebula-5.10.1/parsers/vm_var_parser.l 4280 BLAKE2B f2c7fa858c8e7ab7778561aeb84f9d00090336c307249a648e73951a7208df17ec369d85cf53303ed17f64e42ec17a2e779e1135155923931c9547ee5f23006b SHA512 02cb7b4c08b8498a28113e3a5824270b48d9c625fba68b7cf0afc4054b7662481b309a57c4d89ef3869aa1435d647034d1c458797ba46d01942649dcd73fbbaf |
123 |
-AUX opennebula-5.10.1/parsers/vm_var_syntax.cc 61095 BLAKE2B aefa4b7352037775b4d91b0a6893418664668ed9aca901a8ef269eee843bfe6a47b3823fd05beb622870e9fb4148badad0ef5e3fdfc42f92cae597f93430e424 SHA512 425585a510b8c4e2ed17ffe6e32da201b10ab35632ef4889a2ef049452f310f2e39c86929e06fc765bea96547c5592e66ee6e75b02ce842565b3e7dd39176beb |
124 |
-AUX opennebula-5.10.1/parsers/vm_var_syntax.h 3336 BLAKE2B 4d35978e90e844f8a98cc8a54306164f79100650389ad0ec44ab84467effab9ffe9543e1f812f0ef1ef30cb1728beeac1c4aa53e5795eedb0bcc1c235e187464 SHA512 56541802079b91316a2c3c1f45e642311f4a09ebf18820efe3a452a15cefeda0086d274320d0fd2d2abd7304d9dc83c7b648af338a83e7ead877b5c74f69b287 |
125 |
-AUX opennebula-5.10.1/parsers/vm_var_syntax.y 12623 BLAKE2B 111e013eabb9107532431de767a5237d19ba8f27a83504d571022e90e864b30b2152290e5c16e968ac6281dadec57269106ce495793257541c8105969b53f55c SHA512 ca7bc208c697720827df1fba5b459e8683086e7d45be07050f5d8604ad2aba9b103f26e071d203d7e7faf953aed5045cf9c2b9c5a1a23dee5a5f9f6391ad4b79 |
126 |
-AUX openrc/99one 29 BLAKE2B faf301bd63b3dd997552e5dc48b139201b86384adf96d75e91315d7325e9a593ecc5701898f388a47213d074c3c8c9c9615590fe33dfe85e8338a4337249abbc SHA512 6a8287ff68a6489a65ead46a9e456c4f985874ed3a307fae0c623d070383c663f3748124c48d3fb05df6511e0388278d8afe00fb7427e6674903d079ee611f2d |
127 |
-AUX openrc/oneflow-server.confd 162 BLAKE2B cc2a106d94608a0d90ca8c0135ab09303b962f8599c2c839afbe0637f048b0af26fc13607d3f64fd10fc785e553d29bece784f396003470ad05934a627d9a5e3 SHA512 0b9ac8968731b1da1e66725b18491014949d7225e38ca8ad7c0cfedf44d055dd9c170298b5ead6b10dcc13a2d60c30013288d9b818f09ff05f3c8905924e9532 |
128 |
-AUX openrc/oneflow-server.initd 780 BLAKE2B 74b75d674c26d0e03adc129add97cac49c0883b0ad7dc9dc4a0db929a0b7ad42863e1594ba743ef4d016813da251de110bd767e8bfdff0c95066f87e137877e0 SHA512 4fa3c5339c8baadaeb48e6bf1beab1a25c2bd3af3c389414e4456fafa6582e80abcdafd46e6f497ac950316b8859a673cf2f2012e840c5ac2edcf95cc3fb7eb1 |
129 |
-AUX openrc/opennebula.confd 189 BLAKE2B 1c2899def707c77fc5abff2538fc3d106a20d8ccb7d4f5240814dbe7f00cf046934350c825187b0194b2215b5dfde4e3812dd43b6ab8258cbcb554fee4a40cf3 SHA512 78378b3046cb2d267502349250155f1f805f86465219cf8644064cf3227323b270777f73637fe5e2136691e8564c99b47a61aae47dda9d6c1177bf50b551d746 |
130 |
-AUX openrc/opennebula.initd 913 BLAKE2B 3ab4d3c1d1d8644e909422b89526f23e168c8b0f4d08495b0844df366438292bc6bccfc4030b51bbcd93d0b60df10b48faaa142ee2ded285b9772a285cc805a2 SHA512 74fb19970136d6d1b4a7b9d6279249c47ca7cbb6e4e9f90555a6ffd93963957fbc9ccb1b97c9355211057d715fb947aea968db40f7d89d61fff34c3b1331879e |
131 |
-AUX openrc/sunstone-server.confd 166 BLAKE2B 88409cce348709fa0dc1794dadefef623245ca838ce4e4cffea3f99deebf93f969b12761ec3761e12c5677a937e4cb3ccf112ad5b1811c1f986fff4d87b11ec4 SHA512 fe70685cd1aad949c8f46c85764ff62f67b55477879b5d125f2f5ed176d13171762e9ef953b6d5cd6e27d4fb9f503b9fe7ac4ef0fa1f9790f86f9698d3b82079 |
132 |
-AUX openrc/sunstone-server.initd 788 BLAKE2B e49f736213f0575d9a040058eff5accd36b00070ed767bb0de39fb0e8e9ae05ed5b34ddf2ae224530b04fd506e7b1f2a4c73ec69ac608b4a5d231bc07653ae6b SHA512 fa2d6ee6e86e2497adc7792e67140810761c7403ffec3a9def57e7568180c99f17561381462648c8cbe43b12e4b36a146e48973de979b321002c1a566beb727e |
133 |
-AUX patches/fix_kvm_emulator.5.12.0.1.patch 417 BLAKE2B f3c800b37095ff95a2887bdb260d2de40c731cf09011b61086c66f6a43e379a0f6be437a35246787f0889d80aeb08054293c5a00caec0ed9148453a160cae129 SHA512 cf85539fd6ee57b6d6ec843c1d3b717052d9e22973f4bbac7d210a1b5a30408bc7274d56fb818cbde2cc35caf9ac1bf9982cc97d7e4cb926e04785f7fc9f651f |
134 |
-AUX patches/fix_kvm_emulator.patch 362 BLAKE2B 704aa77b28d337922c2b0dbfa1865127dc1c2b3e2e4c6995bcf4cfaaffa3a7c4f4c2becc7c982954fb24c1849044828ddc43881d045a344ff788b8126e546c24 SHA512 18b1964cb4e3fc2eaa93a7ef79e4b9b185584d33ad4f7fa33cd33a74516334136d9cf0ee25921c189250420b751c753cb0142227e8de39e14f8d110e97cd8e30 |
135 |
-AUX patches/install.sh.5.12.0.1.patch 560 BLAKE2B aa9ed2bc271f029f9e8f2a53c79ff07176f34df43d807c21fd49d4d82f39c54a057aac338bd7ab0c91495bf678481cc7f1f3621c1c47801bdfcc10520fcda3b1 SHA512 6d178d5f904cccf4c7dd324e7dbda367c9d7aeaa04c5e901f9c4ebeb2c68d2d68b49618a21043c4c0640f659806a5b7c74a7e0dd4ea402636f10dd6a9a37297e |
136 |
-AUX patches/install.sh.patch 987 BLAKE2B ed9682609aa7867087ecad73f117738f494eefa740053b73a25cb703a58b24630afd7dac5b463b0e938fa212ceb2555c90b10c05d2cf6adeb572ea2361bbfd3c SHA512 ea2aac1d9df1ae976f96be119813b366e3b7eae2d14ba75352ed975fb337f1ecfb7a0fc22628b16fc6b0498e46ff8d1c1415ccc569559c3cbb45b414dd9be540 |
137 |
-AUX patches/node-sass.5.12.0.1.patch 669 BLAKE2B 02518ca6cf66d249e0ab24afeab6294423a64ba183fae292709c06a921bbcf49cddbef5b6f05686d2b3785b1fbdc73109814d0425e9d77c870bf5e4d17ffcd23 SHA512 83b297d1c5394ed7e1074f00cb7ed2447427fd4dc3410a7324ecab5ef06f37a656d1027d3c672e37d1c224566f4b0009420fda3c61a54a71bdcc0fe02ef7b0fe |
138 |
-AUX patches/package.js.5.12.0.1.patch 681 BLAKE2B 6efa8e29b3ac1ca16092abaff01e6d0c7f7e10b41cbf333cbd13710ca7bbf12189b2313071bc6038af097179175a1630c7a48860e9e62a37691d5868ffd49573 SHA512 54de87611112ba4e3841867488b0de160c7fee321a3a0f95003750c2a31858c0bfb5a2546eef11f571fe2c303c62630877d17d2315245e25e306a7a7241c95e8 |
139 |
-AUX sudoers/opennebula 1456 BLAKE2B f25ac0f3c1b9f44644e3edddbe578d611204bdc683990a359ff51eb8d540870fda53eb5d0816bac22327369e59d7acf783adbc3a19c127e76985c7578733c8e1 SHA512 5eabdc11b16be8b34c12094ba108012916a6d2a4b06ecc421a5a0d6b7e720bcbdc698ace8b003726acc3b9d637a558540d0630bfc59335104ffed3006e13e0fa |
140 |
-AUX sudoers/opennebula-node 69 BLAKE2B 7292f9aeb4b2599190cda6148700fbedc4c1d00e7295df6f2033baa4189b5b1abd74f76a5ac7ca6dc7c587176e10b2b7f58f7d81019d7b73a74b64cf265210e6 SHA512 f3e7a39d1c5533e8ac4338326a48b49fd2ab73f0a20bbe23280f64d05f1312663c616ce2ad6e5fed2c09bdbef0243f5a8a9f4ec361aac6aa57d1bdf008508846 |
141 |
-AUX sudoers/opennebula-node-lxd 41 BLAKE2B b0533db80686c1075a89df5b38b7b199a7d3dd022ad675405d021c5dadd76ca784c3ae1962cc273ebea2686f060a2ac9e8f9e088846cbdbea6e325a16b3d96c8 SHA512 86043f606d9fcbfb0288ac286fe0f31db11aba3b39164ec92cdaf23e4ece3d0a9909f8d8b26533cd7801eb79b342dc5f55487a2bd06ac058d46d66c410b37ff1 |
142 |
-AUX sudoers/opennebula-server 58 BLAKE2B 4d0ab8d64ce6feaaf7fba94db4fba2df1c4400c6f4ef4eb827d953405a1ef719eecd572a935435a5d7bb6199d60f0e0c0f8aad8b0b0d93d2a4759e55f0861729 SHA512 c9789eed479933fb9f772ace9f9a76cfaad36188be61920f86c5aec072f6df1f04a233e605c2828fb4ac7664930b27fbed79614d2bba28fc81dfff431fa51c74 |
143 |
-AUX systemd/opennebula-econe.service 487 BLAKE2B f5754051cf87791b2a1a3b9fa7fdfe0793e15a6d86187b186a6f3a96d36d49e9bc0fcd59a65034ee999ad7e7f2f5678280aff0ccb5a6603a789a87b21c655481 SHA512 7bc53b4510c03587c64ec9b95064bd812678bca0a8ea1e9cf38aea96284a25ca5bcd5dd71d0e30d8eab2fc15dc280aeacb74dc974ab3c9c45d01843f47bdbd23 |
144 |
-AUX systemd/opennebula-flow.service 483 BLAKE2B 983df1a7ee139b462c79f81f6eeda5c5617e7f5f44c1325e020f7b35ac5698283f2f6652e02f3eefc0209d6eee5d9499e2188cd5312aee93c644af1a05dc2ad1 SHA512 978233139935def2795138b78aa2233cc7f621ede63d4c58e1d95b82ed224c72b4a7d247fcc3ae8451dd7ab7ef4d4d4901def97c7ae6980a397fce8925b216df |
145 |
-AUX systemd/opennebula-gate.service 483 BLAKE2B 387d749c5d1aa8a2c4f245b27c98d09b11ef7593f2cbb6fa317fc67892967df48e4d55208c2436dbf313a5f69be03864f6ab12aa0e05cf775bd1df28a2ad2228 SHA512 18855bc6a0e6092635753da95104fb395ad1210cbf98ff6e846f80a58f602762f109ca82cb9b791e52f24ce2d265bf9ffe68a79b3d03f967049061d70ccf5a53 |
146 |
-AUX systemd/opennebula-hem.service 440 BLAKE2B 4f9ed62dd4b686c9ee4ce52d02c7224eb18273a156af0892d35ec089df5c8081fdfd40870308ae5685f990743cc7b93dda870617331d448a49cbc53d26b229ea SHA512 6b38ffbab96fe7826cde90130f67ba5ba09bc1c4e0a8f35cfc634187ee770491dbd4a3cdc9ca6056189823ae42ee3a28406c838e1d6308ca6b44bb3f890a195a |
147 |
-AUX systemd/opennebula-novnc.service 417 BLAKE2B eeebdc36940f8c6c3fa1f880b57dad33465da573f47289e316edb724ba36c208fdd246d8acf706148a7025d2ec4b7f335bae8c1f1d7377b77824328bef111985 SHA512 5c833c35f0fefba1e1bc10b60a575c86b2eff2d39bb1a43f52c073364d6fea8c06859506cce3466e755b0617a15f693e4102af2bcd4e4fe38f2b30b1c4c1ba70 |
148 |
-AUX systemd/opennebula-scheduler.service 474 BLAKE2B 2804efb94bc8bda7b407792008a64437f34643f06ddf10d371388228f62057196158e6f74cc51bc2b227a7dc41c35809264cac39381fc077e7dfed7005f0c18c SHA512 af75c0a59540aecbb7879cc15ae6d1d4e2230ea2be444a5749f9b840aef17f4cba679fab9a34b974bbe336b2011e74c32551391e1d2fbb29b73274e7b1ffca62 |
149 |
-AUX systemd/opennebula-sunstone.service 522 BLAKE2B b07146bd735496d8a866afdd5cd8dc91bf0bfd420e3df9ba8510f8ddd8173ec11c75a1809087de61742b66cb5d788ab7ac69f67f5f933ef3ae258152a225bd64 SHA512 50f759bd801e753866163595faace9895064cebb7fb79a3d12d14a4e982dfe2c3dccc1a0e5b8591f48f7f4b149534a8df109e7eb1ff6c36ac04a0d4472ea1c1a |
150 |
-AUX systemd/opennebula.service 559 BLAKE2B b189c255a0a32fe470b15f8bc6a526efb43c33161a0ca44d9139a69ec2c2433c58bc708ee683c4f422d17fb1a67f683c5c16b2b32250b41f89bbb623a808e0ca SHA512 60acfec60a51d9e9d3a77b111cb8727df36a71ca26a61916606ee59ba1c3c77acd6c2f14b55adf899a7cec677949a5e7ae168a97bb2d3ea6d829be746acc8279 |
151 |
-AUX tmpfiles.d/opennebula-flow.conf 77 BLAKE2B 9988562b0e36bf74fc67af5a1777eca18b24e0a1bcfc78735f360f1aceca4602e32f7b6cfbe3b731a13725a9cd14a4dc49b71c12bb7576a29aa00112b37cd2be SHA512 c13210255ebb0f34d464e2799858d6ac2a79afac287ead639821ef5e939b7666a960ebb1ee96bc7098a111ddd6765e72d8a5e53e0647b9a866d0826e02cbd2a1 |
152 |
-AUX tmpfiles.d/opennebula-gate.conf 77 BLAKE2B 9988562b0e36bf74fc67af5a1777eca18b24e0a1bcfc78735f360f1aceca4602e32f7b6cfbe3b731a13725a9cd14a4dc49b71c12bb7576a29aa00112b37cd2be SHA512 c13210255ebb0f34d464e2799858d6ac2a79afac287ead639821ef5e939b7666a960ebb1ee96bc7098a111ddd6765e72d8a5e53e0647b9a866d0826e02cbd2a1 |
153 |
-AUX tmpfiles.d/opennebula-node.conf 17 BLAKE2B cfd907f606a7b9b24d897960720f97ed3d67723c19fe244f9b69bb22c40a4e4baedfcb5899bcefa364758000a488a3ba501148ce53d3595d7e1f8428186475a6 SHA512 bfc1fca8d933626d16d58b0077e4feab2d37a1bd6a67b62d7c45d264e874e45437b4328b5eff5b8e3236113db13b3e323beac8055ad8026021c0940e88aa505e |
154 |
-AUX tmpfiles.d/opennebula-sunstone.conf 77 BLAKE2B 9988562b0e36bf74fc67af5a1777eca18b24e0a1bcfc78735f360f1aceca4602e32f7b6cfbe3b731a13725a9cd14a4dc49b71c12bb7576a29aa00112b37cd2be SHA512 c13210255ebb0f34d464e2799858d6ac2a79afac287ead639821ef5e939b7666a960ebb1ee96bc7098a111ddd6765e72d8a5e53e0647b9a866d0826e02cbd2a1 |
155 |
-AUX tmpfiles.d/opennebula.conf 77 BLAKE2B 9988562b0e36bf74fc67af5a1777eca18b24e0a1bcfc78735f360f1aceca4602e32f7b6cfbe3b731a13725a9cd14a4dc49b71c12bb7576a29aa00112b37cd2be SHA512 c13210255ebb0f34d464e2799858d6ac2a79afac287ead639821ef5e939b7666a960ebb1ee96bc7098a111ddd6765e72d8a5e53e0647b9a866d0826e02cbd2a1 |
156 |
-DIST opennebula-5.10.1.tar.gz 43207580 BLAKE2B de87e839cd772bec769af4a689fed02e81fbdc6fbb35def9ad6344383dc935ebd431137cb194dd3b840965004f4e145ac63443d7034d56a9a6bb19af9030642d SHA512 861293298997c825e94228ea28f0f352db3f56dd28b654be24ca2226edd422fc54cf94665f5ae5cc17dc51d3d52081c936f249b77fc4f8198de6a1ec0006edaf |
157 |
-DIST opennebula-5.10.4.tar.gz 5697792 BLAKE2B fde611cbe5b44ee403b57e915253c9ffba267230bf3a54cd466260615918e871aebeae6f17c246a84ef1686df176134acff272c49e6a9b69c8841bc8fab1f1b5 SHA512 c509ec4a56b7865d118ab79e08227f0a78d1d899361ea2ae2ea3c6ac6ad3ab4a2a38211a4f5b7abf35ef512674d13ffb19f97286fed63515289e4f9a602f3145 |
158 |
-DIST opennebula-5.10.5.tar.gz 5699952 BLAKE2B 35dce44e085342e8d2628bc060ed0644309a6e5aa8ec1898663b537eb698d66f980353cc60ab3b6496bf78b496dcd1097db2d327b54f80d87bf273ab67aeef55 SHA512 e35b9f8c8bc4f1e4424e3a8083c2c31edbe5b799df44a222bd310fdca87c4a3c6d2a3f27da75b12364bdf29883e6f641c2ad5c484e5cc07dce3ebf054681fc58 |
159 |
-DIST opennebula-5.12.0.1.tar.gz 5559467 BLAKE2B 397ffcbf185b38ea0ec811997751ed8a4f0b57e66fe5e924604e2b1cd3f012981c601fcb183e18a1f836ecd06568d5534943a410191228dbfcf192c8c759cd91 SHA512 fdc9621df006c41a91c61184217e35e7511c9342621dd2da43211d9f24be262a066ff9321a0f423224ef7ce1bd8438e91639d625c98b3c18622d17ae6c65fab9 |
160 |
-EBUILD opennebula-5.10.1.ebuild 9405 BLAKE2B fd6dfefc76da0aaadc993b7ed1593b8826fb642a92797220c9ce6226b846539900f6e7914730decfe57f79514654506e9a1aed76ebd28c1fc797d71ee5a6b2ba SHA512 360d3323e46a1253f6489c696e020ea38e260923d6b0fcb50154b0cb412b4bd3db994365a072915f5a8411032cea12dd8b87fe2f730e418d6742dd7218722a66 |
161 |
-EBUILD opennebula-5.10.4.ebuild 9735 BLAKE2B dd7f5bf32aea6bd30f4ca75d7db123fb9ce03f1357d789fefa76a46b7a4f1a669df0d68d5239e85a40da591d7bbf993f759a02704ba468b6c04f6445401343f4 SHA512 3c54819ee10cb07fe7ea41dd0b65b8de9075ac96e34524c512cd58457071b00f7be85f3bd062a57aa4459703b29d98c2b577a97c6b03093699b99021b59cfdf5 |
162 |
-EBUILD opennebula-5.10.5.ebuild 9891 BLAKE2B 253d6ef23eaf8980373ee19c2035aadf3b9363702954dd87be48c7ab87961683834fe857d22d2ae5d112269e940f0f053b070113576b5bde421e69d9484074fd SHA512 04a4e30d1b59ce11d7d135e76bde6c3581318274da81eb27b2055a7fc48060f388888ce62e6c32a7f68dade5221982f80e4773ef36f54acf23638d1b89e90242 |
163 |
-EBUILD opennebula-5.12.0.1.ebuild 9933 BLAKE2B 6ce863cb39dfc90ef06faa3a8a933dceb3d535d98f22e0333ab4d241e71b09f4563a6fc668a38fbbfe03ad0179d2ee866d5de24791aa13576323a477731850b3 SHA512 6c0edfc676f204c0076cf62f63a96a347bcee3ca82fc371089c855410cb9c9a7dcf5a2d83226bc77e84aa18b987ede256bca9ba21673eee516a5825af5c35144 |
164 |
-MISC metadata.xml 931 BLAKE2B abb0ecf04eb6fc45f64c5d2d6636591c9d706fbf1902943a80f7e058443787824581219fb8457a83192e4e2b672521609449d4eef78ab677f8c093fe939034b6 SHA512 c3770f399572b16601e7eeaf4a1eb4b5eea950ad18239be8719124f60f3edd02da4c7b28b177329d70b0810ee7d8597e522dd62a1bd4c8ea1194acf0d92dfeb2 |
165 |
|
166 |
diff --git a/app-emulation/opennebula/files/logrotate/opennebula b/app-emulation/opennebula/files/logrotate/opennebula |
167 |
deleted file mode 100644 |
168 |
index d37ed39..0000000 |
169 |
--- a/app-emulation/opennebula/files/logrotate/opennebula |
170 |
+++ /dev/null |
171 |
@@ -1,13 +0,0 @@ |
172 |
-delaycompress |
173 |
-dateext |
174 |
-dateformat -%Y%m%d-%s |
175 |
- |
176 |
-compress |
177 |
-weekly |
178 |
-rotate 52 |
179 |
- |
180 |
-/var/log/one/one_xmlrpc.log /var/log/one/oned.log { |
181 |
- missingok |
182 |
- notifempty |
183 |
- copytruncate |
184 |
-} |
185 |
|
186 |
diff --git a/app-emulation/opennebula/files/logrotate/opennebula-econe b/app-emulation/opennebula/files/logrotate/opennebula-econe |
187 |
deleted file mode 100644 |
188 |
index 6b1668e..0000000 |
189 |
--- a/app-emulation/opennebula/files/logrotate/opennebula-econe |
190 |
+++ /dev/null |
191 |
@@ -1,13 +0,0 @@ |
192 |
-delaycompress |
193 |
-dateext |
194 |
-dateformat -%Y%m%d-%s |
195 |
- |
196 |
-compress |
197 |
-weekly |
198 |
-rotate 52 |
199 |
- |
200 |
-/var/log/one/econe-server.log { |
201 |
- missingok |
202 |
- notifempty |
203 |
- copytruncate |
204 |
-} |
205 |
|
206 |
diff --git a/app-emulation/opennebula/files/logrotate/opennebula-flow b/app-emulation/opennebula/files/logrotate/opennebula-flow |
207 |
deleted file mode 100644 |
208 |
index 9d1fd2a..0000000 |
209 |
--- a/app-emulation/opennebula/files/logrotate/opennebula-flow |
210 |
+++ /dev/null |
211 |
@@ -1,13 +0,0 @@ |
212 |
-delaycompress |
213 |
-dateext |
214 |
-dateformat -%Y%m%d-%s |
215 |
- |
216 |
-compress |
217 |
-weekly |
218 |
-rotate 52 |
219 |
- |
220 |
-/var/log/one/oneflow.log { |
221 |
- missingok |
222 |
- notifempty |
223 |
- copytruncate |
224 |
-} |
225 |
|
226 |
diff --git a/app-emulation/opennebula/files/logrotate/opennebula-gate b/app-emulation/opennebula/files/logrotate/opennebula-gate |
227 |
deleted file mode 100644 |
228 |
index a586d4d..0000000 |
229 |
--- a/app-emulation/opennebula/files/logrotate/opennebula-gate |
230 |
+++ /dev/null |
231 |
@@ -1,13 +0,0 @@ |
232 |
-delaycompress |
233 |
-dateext |
234 |
-dateformat -%Y%m%d-%s |
235 |
- |
236 |
-compress |
237 |
-weekly |
238 |
-rotate 52 |
239 |
- |
240 |
-/var/log/one/onegate.log { |
241 |
- missingok |
242 |
- notifempty |
243 |
- copytruncate |
244 |
-} |
245 |
|
246 |
diff --git a/app-emulation/opennebula/files/logrotate/opennebula-hem b/app-emulation/opennebula/files/logrotate/opennebula-hem |
247 |
deleted file mode 100644 |
248 |
index a4e9781..0000000 |
249 |
--- a/app-emulation/opennebula/files/logrotate/opennebula-hem |
250 |
+++ /dev/null |
251 |
@@ -1,13 +0,0 @@ |
252 |
-delaycompress |
253 |
-dateext |
254 |
-dateformat -%Y%m%d-%s |
255 |
- |
256 |
-compress |
257 |
-weekly |
258 |
-rotate 52 |
259 |
- |
260 |
-/var/log/one/onehem.log { |
261 |
- missingok |
262 |
- notifempty |
263 |
- copytruncate |
264 |
-} |
265 |
|
266 |
diff --git a/app-emulation/opennebula/files/logrotate/opennebula-novnc b/app-emulation/opennebula/files/logrotate/opennebula-novnc |
267 |
deleted file mode 100644 |
268 |
index 07f6916..0000000 |
269 |
--- a/app-emulation/opennebula/files/logrotate/opennebula-novnc |
270 |
+++ /dev/null |
271 |
@@ -1,13 +0,0 @@ |
272 |
-delaycompress |
273 |
-dateext |
274 |
-dateformat -%Y%m%d-%s |
275 |
- |
276 |
-compress |
277 |
-weekly |
278 |
-rotate 52 |
279 |
- |
280 |
-/var/log/one/novnc.log { |
281 |
- missingok |
282 |
- notifempty |
283 |
- copytruncate |
284 |
-} |
285 |
|
286 |
diff --git a/app-emulation/opennebula/files/logrotate/opennebula-scheduler b/app-emulation/opennebula/files/logrotate/opennebula-scheduler |
287 |
deleted file mode 100644 |
288 |
index 07752e3..0000000 |
289 |
--- a/app-emulation/opennebula/files/logrotate/opennebula-scheduler |
290 |
+++ /dev/null |
291 |
@@ -1,13 +0,0 @@ |
292 |
-delaycompress |
293 |
-dateext |
294 |
-dateformat -%Y%m%d-%s |
295 |
- |
296 |
-compress |
297 |
-weekly |
298 |
-rotate 52 |
299 |
- |
300 |
-/var/log/one/sched.log { |
301 |
- missingok |
302 |
- notifempty |
303 |
- copytruncate |
304 |
-} |
305 |
|
306 |
diff --git a/app-emulation/opennebula/files/logrotate/opennebula-sunstone b/app-emulation/opennebula/files/logrotate/opennebula-sunstone |
307 |
deleted file mode 100644 |
308 |
index 945885b..0000000 |
309 |
--- a/app-emulation/opennebula/files/logrotate/opennebula-sunstone |
310 |
+++ /dev/null |
311 |
@@ -1,13 +0,0 @@ |
312 |
-delaycompress |
313 |
-dateext |
314 |
-dateformat -%Y%m%d-%s |
315 |
- |
316 |
-compress |
317 |
-weekly |
318 |
-rotate 52 |
319 |
- |
320 |
-/var/log/one/sunstone.log { |
321 |
- missingok |
322 |
- notifempty |
323 |
- copytruncate |
324 |
-} |
325 |
|
326 |
diff --git a/app-emulation/opennebula/files/one_auth b/app-emulation/opennebula/files/one_auth |
327 |
deleted file mode 100644 |
328 |
index b80189c..0000000 |
329 |
--- a/app-emulation/opennebula/files/one_auth |
330 |
+++ /dev/null |
331 |
@@ -1 +0,0 @@ |
332 |
-oneadmin:oneadmin |
333 |
|
334 |
diff --git a/app-emulation/opennebula/files/opennebula-5.10.1/parsers/SConstruct b/app-emulation/opennebula/files/opennebula-5.10.1/parsers/SConstruct |
335 |
deleted file mode 100644 |
336 |
index 8b5dfc3..0000000 |
337 |
--- a/app-emulation/opennebula/files/opennebula-5.10.1/parsers/SConstruct |
338 |
+++ /dev/null |
339 |
@@ -1,74 +0,0 @@ |
340 |
-# SConstruct for src/template |
341 |
- |
342 |
-# -------------------------------------------------------------------------- # |
343 |
-# Copyright 2002-2019, OpenNebula Project, OpenNebula Systems # |
344 |
-# # |
345 |
-# Licensed under the Apache License, Version 2.0 (the "License"); you may # |
346 |
-# not use this file except in compliance with the License. You may obtain # |
347 |
-# a copy of the License at # |
348 |
-# # |
349 |
-# http://www.apache.org/licenses/LICENSE-2.0 # |
350 |
-# # |
351 |
-# Unless required by applicable law or agreed to in writing, software # |
352 |
-# distributed under the License is distributed on an "AS IS" BASIS, # |
353 |
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # |
354 |
-# See the License for the specific language governing permissions and # |
355 |
-# limitations under the License. # |
356 |
-#--------------------------------------------------------------------------- # |
357 |
- |
358 |
-Import('env') |
359 |
- |
360 |
-lib_name='nebula_parsers' |
361 |
- |
362 |
-if env['parsers']=='yes': |
363 |
- # LEX |
364 |
- parser=env.Lex( |
365 |
- source='template_parser.l' |
366 |
- ) |
367 |
- |
368 |
- parser=env.Lex( |
369 |
- source='vm_var_parser.l' |
370 |
- ) |
371 |
- |
372 |
- parser=env.Lex( |
373 |
- source='expr_parser.l' |
374 |
- ) |
375 |
- env.NoClean(parser) |
376 |
- |
377 |
- # BISON |
378 |
- parser=env.Bison( |
379 |
- source='template_syntax.y' |
380 |
- ) |
381 |
- |
382 |
- parser=env.Bison( |
383 |
- source='vm_var_syntax.y' |
384 |
- ) |
385 |
- |
386 |
- parser=env.Bison( |
387 |
- source='vm_file_var_syntax.y' |
388 |
- ) |
389 |
- |
390 |
- parser=env.Bison( |
391 |
- source='expr_arith.y' |
392 |
- ) |
393 |
- |
394 |
- parser=env.Bison( |
395 |
- source='expr_bool.y' |
396 |
- ) |
397 |
- env.NoClean(parser) |
398 |
- |
399 |
-# Sources to generate the library |
400 |
-source_files=[ |
401 |
- 'template_parser.cc', |
402 |
- 'template_syntax.cc', |
403 |
- 'vm_var_parser.cc', |
404 |
- 'vm_var_syntax.cc', |
405 |
- 'vm_file_var_syntax.cc', |
406 |
- 'expr_parser.cc', |
407 |
- 'expr_bool.cc', |
408 |
- 'expr_arith.cc', |
409 |
- 'mem_collector.cc' |
410 |
-] |
411 |
- |
412 |
-# Build library |
413 |
-env.StaticLibrary(lib_name, source_files) |
414 |
|
415 |
diff --git a/app-emulation/opennebula/files/opennebula-5.10.1/parsers/expr_arith.cc b/app-emulation/opennebula/files/opennebula-5.10.1/parsers/expr_arith.cc |
416 |
deleted file mode 100644 |
417 |
index db2f5b8..0000000 |
418 |
--- a/app-emulation/opennebula/files/opennebula-5.10.1/parsers/expr_arith.cc |
419 |
+++ /dev/null |
420 |
@@ -1,1732 +0,0 @@ |
421 |
-/* A Bison parser, made by GNU Bison 3.4.1. */ |
422 |
- |
423 |
-/* Bison implementation for Yacc-like parsers in C |
424 |
- |
425 |
- Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2019 Free Software Foundation, |
426 |
- Inc. |
427 |
- |
428 |
- This program is free software: you can redistribute it and/or modify |
429 |
- it under the terms of the GNU General Public License as published by |
430 |
- the Free Software Foundation, either version 3 of the License, or |
431 |
- (at your option) any later version. |
432 |
- |
433 |
- This program is distributed in the hope that it will be useful, |
434 |
- but WITHOUT ANY WARRANTY; without even the implied warranty of |
435 |
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
436 |
- GNU General Public License for more details. |
437 |
- |
438 |
- You should have received a copy of the GNU General Public License |
439 |
- along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
440 |
- |
441 |
-/* As a special exception, you may create a larger work that contains |
442 |
- part or all of the Bison parser skeleton and distribute that work |
443 |
- under terms of your choice, so long as that work isn't itself a |
444 |
- parser generator using the skeleton or a modified version thereof |
445 |
- as a parser skeleton. Alternatively, if you modify or redistribute |
446 |
- the parser skeleton itself, you may (at your option) remove this |
447 |
- special exception, which will cause the skeleton and the resulting |
448 |
- Bison output files to be licensed under the GNU General Public |
449 |
- License without this special exception. |
450 |
- |
451 |
- This special exception was added by the Free Software Foundation in |
452 |
- version 2.2 of Bison. */ |
453 |
- |
454 |
-/* C LALR(1) parser skeleton written by Richard Stallman, by |
455 |
- simplifying the original so-called "semantic" parser. */ |
456 |
- |
457 |
-/* All symbols defined below should begin with yy or YY, to avoid |
458 |
- infringing on user name space. This should be done even for local |
459 |
- variables, as they might otherwise be expanded by user macros. |
460 |
- There are some unavoidable exceptions within include files to |
461 |
- define necessary library symbols; they are noted "INFRINGES ON |
462 |
- USER NAME SPACE" below. */ |
463 |
- |
464 |
-/* Undocumented macros, especially those whose name start with YY_, |
465 |
- are private implementation details. Do not rely on them. */ |
466 |
- |
467 |
-/* Identify Bison output. */ |
468 |
-#define YYBISON 1 |
469 |
- |
470 |
-/* Bison version. */ |
471 |
-#define YYBISON_VERSION "3.4.1" |
472 |
- |
473 |
-/* Skeleton name. */ |
474 |
-#define YYSKELETON_NAME "yacc.c" |
475 |
- |
476 |
-/* Pure parsers. */ |
477 |
-#define YYPURE 1 |
478 |
- |
479 |
-/* Push parsers. */ |
480 |
-#define YYPUSH 0 |
481 |
- |
482 |
-/* Pull parsers. */ |
483 |
-#define YYPULL 1 |
484 |
- |
485 |
- |
486 |
-/* Substitute the variable and function names. */ |
487 |
-#define yyparse expr_arith_parse |
488 |
-#define yylex expr_arith_lex |
489 |
-#define yyerror expr_arith_error |
490 |
-#define yydebug expr_arith_debug |
491 |
-#define yynerrs expr_arith_nerrs |
492 |
- |
493 |
- |
494 |
-/* First part of user prologue. */ |
495 |
-#line 17 "expr_arith.y" |
496 |
- |
497 |
-#include "expr_arith.h" |
498 |
-#include "expr_parser.h" |
499 |
- |
500 |
-#define YYERROR_VERBOSE |
501 |
-#define expr_arith_lex expr_lex |
502 |
- |
503 |
- |
504 |
-void expr_arith_error(YYLTYPE * llocp, mem_collector * mc, ObjectXML * oxml, |
505 |
- int& result, char ** error_msg, yyscan_t scanner, const char * str); |
506 |
- |
507 |
-int expr_arith_lex(YYSTYPE *lvalp, YYLTYPE *llocp, mem_collector * mc, |
508 |
- yyscan_t scanner); |
509 |
- |
510 |
-int expr_arith_parse(ObjectXML *oxml, int& result, char ** errmsg, |
511 |
- yyscan_t scanner) |
512 |
-{ |
513 |
- mem_collector mc; |
514 |
- int rc; |
515 |
- |
516 |
- mem_collector_init(&mc); |
517 |
- |
518 |
- rc = expr_arith_parse(&mc, oxml, result, errmsg, scanner); |
519 |
- |
520 |
- mem_collector_cleanup(&mc); |
521 |
- |
522 |
- return rc; |
523 |
-} |
524 |
- |
525 |
-#line 106 "expr_arith.cc" |
526 |
- |
527 |
-# ifndef YY_NULLPTR |
528 |
-# if defined __cplusplus |
529 |
-# if 201103L <= __cplusplus |
530 |
-# define YY_NULLPTR nullptr |
531 |
-# else |
532 |
-# define YY_NULLPTR 0 |
533 |
-# endif |
534 |
-# else |
535 |
-# define YY_NULLPTR ((void*)0) |
536 |
-# endif |
537 |
-# endif |
538 |
- |
539 |
-/* Enabling verbose error messages. */ |
540 |
-#ifdef YYERROR_VERBOSE |
541 |
-# undef YYERROR_VERBOSE |
542 |
-# define YYERROR_VERBOSE 1 |
543 |
-#else |
544 |
-# define YYERROR_VERBOSE 0 |
545 |
-#endif |
546 |
- |
547 |
-/* Use api.header.include to #include this header |
548 |
- instead of duplicating it here. */ |
549 |
-#ifndef YY_EXPR_ARITH_EXPR_ARITH_HH_INCLUDED |
550 |
-# define YY_EXPR_ARITH_EXPR_ARITH_HH_INCLUDED |
551 |
-/* Debug traces. */ |
552 |
-#ifndef YYDEBUG |
553 |
-# define YYDEBUG 0 |
554 |
-#endif |
555 |
-#if YYDEBUG |
556 |
-extern int expr_arith_debug; |
557 |
-#endif |
558 |
-/* "%code requires" blocks. */ |
559 |
-#line 47 "expr_arith.y" |
560 |
- |
561 |
-#include <iostream> |
562 |
-#include <sstream> |
563 |
-#include <string> |
564 |
-#include <vector> |
565 |
-#include <algorithm> |
566 |
-#include <set> |
567 |
- |
568 |
-#include <ctype.h> |
569 |
-#include <string.h> |
570 |
-#include <fnmatch.h> |
571 |
- |
572 |
-#include "mem_collector.h" |
573 |
-#include "ObjectXML.h" |
574 |
- |
575 |
-typedef void * yyscan_t; |
576 |
- |
577 |
-int expr_arith_parse(ObjectXML *oxml, int& result, char ** errmsg, |
578 |
- yyscan_t scanner); |
579 |
- |
580 |
-#line 161 "expr_arith.cc" |
581 |
- |
582 |
-/* Token type. */ |
583 |
-#ifndef YYTOKENTYPE |
584 |
-# define YYTOKENTYPE |
585 |
- enum yytokentype |
586 |
- { |
587 |
- INTEGER = 258, |
588 |
- STRING = 259, |
589 |
- FLOAT = 260 |
590 |
- }; |
591 |
-#endif |
592 |
- |
593 |
-/* Value type. */ |
594 |
-#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED |
595 |
-union YYSTYPE |
596 |
-{ |
597 |
-#line 77 "expr_arith.y" |
598 |
- |
599 |
- char * val_str; |
600 |
- int val_int; |
601 |
- float val_float; |
602 |
- |
603 |
-#line 184 "expr_arith.cc" |
604 |
- |
605 |
-}; |
606 |
-typedef union YYSTYPE YYSTYPE; |
607 |
-# define YYSTYPE_IS_TRIVIAL 1 |
608 |
-# define YYSTYPE_IS_DECLARED 1 |
609 |
-#endif |
610 |
- |
611 |
-/* Location type. */ |
612 |
-#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED |
613 |
-typedef struct YYLTYPE YYLTYPE; |
614 |
-struct YYLTYPE |
615 |
-{ |
616 |
- int first_line; |
617 |
- int first_column; |
618 |
- int last_line; |
619 |
- int last_column; |
620 |
-}; |
621 |
-# define YYLTYPE_IS_DECLARED 1 |
622 |
-# define YYLTYPE_IS_TRIVIAL 1 |
623 |
-#endif |
624 |
- |
625 |
- |
626 |
- |
627 |
-int expr_arith_parse (mem_collector * mc, ObjectXML * oxml, int& result, char ** error_msg, yyscan_t scanner); |
628 |
- |
629 |
-#endif /* !YY_EXPR_ARITH_EXPR_ARITH_HH_INCLUDED */ |
630 |
- |
631 |
- |
632 |
- |
633 |
-#ifdef short |
634 |
-# undef short |
635 |
-#endif |
636 |
- |
637 |
-#ifdef YYTYPE_UINT8 |
638 |
-typedef YYTYPE_UINT8 yytype_uint8; |
639 |
-#else |
640 |
-typedef unsigned char yytype_uint8; |
641 |
-#endif |
642 |
- |
643 |
-#ifdef YYTYPE_INT8 |
644 |
-typedef YYTYPE_INT8 yytype_int8; |
645 |
-#else |
646 |
-typedef signed char yytype_int8; |
647 |
-#endif |
648 |
- |
649 |
-#ifdef YYTYPE_UINT16 |
650 |
-typedef YYTYPE_UINT16 yytype_uint16; |
651 |
-#else |
652 |
-typedef unsigned short yytype_uint16; |
653 |
-#endif |
654 |
- |
655 |
-#ifdef YYTYPE_INT16 |
656 |
-typedef YYTYPE_INT16 yytype_int16; |
657 |
-#else |
658 |
-typedef short yytype_int16; |
659 |
-#endif |
660 |
- |
661 |
-#ifndef YYSIZE_T |
662 |
-# ifdef __SIZE_TYPE__ |
663 |
-# define YYSIZE_T __SIZE_TYPE__ |
664 |
-# elif defined size_t |
665 |
-# define YYSIZE_T size_t |
666 |
-# elif ! defined YYSIZE_T |
667 |
-# include <stddef.h> /* INFRINGES ON USER NAME SPACE */ |
668 |
-# define YYSIZE_T size_t |
669 |
-# else |
670 |
-# define YYSIZE_T unsigned |
671 |
-# endif |
672 |
-#endif |
673 |
- |
674 |
-#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) |
675 |
- |
676 |
-#ifndef YY_ |
677 |
-# if defined YYENABLE_NLS && YYENABLE_NLS |
678 |
-# if ENABLE_NLS |
679 |
-# include <libintl.h> /* INFRINGES ON USER NAME SPACE */ |
680 |
-# define YY_(Msgid) dgettext ("bison-runtime", Msgid) |
681 |
-# endif |
682 |
-# endif |
683 |
-# ifndef YY_ |
684 |
-# define YY_(Msgid) Msgid |
685 |
-# endif |
686 |
-#endif |
687 |
- |
688 |
-#ifndef YY_ATTRIBUTE |
689 |
-# if (defined __GNUC__ \ |
690 |
- && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \ |
691 |
- || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C |
692 |
-# define YY_ATTRIBUTE(Spec) __attribute__(Spec) |
693 |
-# else |
694 |
-# define YY_ATTRIBUTE(Spec) /* empty */ |
695 |
-# endif |
696 |
-#endif |
697 |
- |
698 |
-#ifndef YY_ATTRIBUTE_PURE |
699 |
-# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__)) |
700 |
-#endif |
701 |
- |
702 |
-#ifndef YY_ATTRIBUTE_UNUSED |
703 |
-# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) |
704 |
-#endif |
705 |
- |
706 |
-/* Suppress unused-variable warnings by "using" E. */ |
707 |
-#if ! defined lint || defined __GNUC__ |
708 |
-# define YYUSE(E) ((void) (E)) |
709 |
-#else |
710 |
-# define YYUSE(E) /* empty */ |
711 |
-#endif |
712 |
- |
713 |
-#if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ |
714 |
-/* Suppress an incorrect diagnostic about yylval being uninitialized. */ |
715 |
-# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ |
716 |
- _Pragma ("GCC diagnostic push") \ |
717 |
- _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ |
718 |
- _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") |
719 |
-# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ |
720 |
- _Pragma ("GCC diagnostic pop") |
721 |
-#else |
722 |
-# define YY_INITIAL_VALUE(Value) Value |
723 |
-#endif |
724 |
-#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
725 |
-# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
726 |
-# define YY_IGNORE_MAYBE_UNINITIALIZED_END |
727 |
-#endif |
728 |
-#ifndef YY_INITIAL_VALUE |
729 |
-# define YY_INITIAL_VALUE(Value) /* Nothing. */ |
730 |
-#endif |
731 |
- |
732 |
- |
733 |
-#define YY_ASSERT(E) ((void) (0 && (E))) |
734 |
- |
735 |
-#if ! defined yyoverflow || YYERROR_VERBOSE |
736 |
- |
737 |
-/* The parser invokes alloca or malloc; define the necessary symbols. */ |
738 |
- |
739 |
-# ifdef YYSTACK_USE_ALLOCA |
740 |
-# if YYSTACK_USE_ALLOCA |
741 |
-# ifdef __GNUC__ |
742 |
-# define YYSTACK_ALLOC __builtin_alloca |
743 |
-# elif defined __BUILTIN_VA_ARG_INCR |
744 |
-# include <alloca.h> /* INFRINGES ON USER NAME SPACE */ |
745 |
-# elif defined _AIX |
746 |
-# define YYSTACK_ALLOC __alloca |
747 |
-# elif defined _MSC_VER |
748 |
-# include <malloc.h> /* INFRINGES ON USER NAME SPACE */ |
749 |
-# define alloca _alloca |
750 |
-# else |
751 |
-# define YYSTACK_ALLOC alloca |
752 |
-# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS |
753 |
-# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ |
754 |
- /* Use EXIT_SUCCESS as a witness for stdlib.h. */ |
755 |
-# ifndef EXIT_SUCCESS |
756 |
-# define EXIT_SUCCESS 0 |
757 |
-# endif |
758 |
-# endif |
759 |
-# endif |
760 |
-# endif |
761 |
-# endif |
762 |
- |
763 |
-# ifdef YYSTACK_ALLOC |
764 |
- /* Pacify GCC's 'empty if-body' warning. */ |
765 |
-# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) |
766 |
-# ifndef YYSTACK_ALLOC_MAXIMUM |
767 |
- /* The OS might guarantee only one guard page at the bottom of the stack, |
768 |
- and a page size can be as small as 4096 bytes. So we cannot safely |
769 |
- invoke alloca (N) if N exceeds 4096. Use a slightly smaller number |
770 |
- to allow for a few compiler-allocated temporary stack slots. */ |
771 |
-# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ |
772 |
-# endif |
773 |
-# else |
774 |
-# define YYSTACK_ALLOC YYMALLOC |
775 |
-# define YYSTACK_FREE YYFREE |
776 |
-# ifndef YYSTACK_ALLOC_MAXIMUM |
777 |
-# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM |
778 |
-# endif |
779 |
-# if (defined __cplusplus && ! defined EXIT_SUCCESS \ |
780 |
- && ! ((defined YYMALLOC || defined malloc) \ |
781 |
- && (defined YYFREE || defined free))) |
782 |
-# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ |
783 |
-# ifndef EXIT_SUCCESS |
784 |
-# define EXIT_SUCCESS 0 |
785 |
-# endif |
786 |
-# endif |
787 |
-# ifndef YYMALLOC |
788 |
-# define YYMALLOC malloc |
789 |
-# if ! defined malloc && ! defined EXIT_SUCCESS |
790 |
-void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ |
791 |
-# endif |
792 |
-# endif |
793 |
-# ifndef YYFREE |
794 |
-# define YYFREE free |
795 |
-# if ! defined free && ! defined EXIT_SUCCESS |
796 |
-void free (void *); /* INFRINGES ON USER NAME SPACE */ |
797 |
-# endif |
798 |
-# endif |
799 |
-# endif |
800 |
-#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ |
801 |
- |
802 |
- |
803 |
-#if (! defined yyoverflow \ |
804 |
- && (! defined __cplusplus \ |
805 |
- || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \ |
806 |
- && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) |
807 |
- |
808 |
-/* A type that is properly aligned for any stack member. */ |
809 |
-union yyalloc |
810 |
-{ |
811 |
- yytype_int16 yyss_alloc; |
812 |
- YYSTYPE yyvs_alloc; |
813 |
- YYLTYPE yyls_alloc; |
814 |
-}; |
815 |
- |
816 |
-/* The size of the maximum gap between one aligned stack and the next. */ |
817 |
-# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) |
818 |
- |
819 |
-/* The size of an array large to enough to hold all stacks, each with |
820 |
- N elements. */ |
821 |
-# define YYSTACK_BYTES(N) \ |
822 |
- ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \ |
823 |
- + 2 * YYSTACK_GAP_MAXIMUM) |
824 |
- |
825 |
-# define YYCOPY_NEEDED 1 |
826 |
- |
827 |
-/* Relocate STACK from its old location to the new one. The |
828 |
- local variables YYSIZE and YYSTACKSIZE give the old and new number of |
829 |
- elements in the stack, and YYPTR gives the new location of the |
830 |
- stack. Advance YYPTR to a properly aligned location for the next |
831 |
- stack. */ |
832 |
-# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ |
833 |
- do \ |
834 |
- { \ |
835 |
- YYSIZE_T yynewbytes; \ |
836 |
- YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ |
837 |
- Stack = &yyptr->Stack_alloc; \ |
838 |
- yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ |
839 |
- yyptr += yynewbytes / sizeof (*yyptr); \ |
840 |
- } \ |
841 |
- while (0) |
842 |
- |
843 |
-#endif |
844 |
- |
845 |
-#if defined YYCOPY_NEEDED && YYCOPY_NEEDED |
846 |
-/* Copy COUNT objects from SRC to DST. The source and destination do |
847 |
- not overlap. */ |
848 |
-# ifndef YYCOPY |
849 |
-# if defined __GNUC__ && 1 < __GNUC__ |
850 |
-# define YYCOPY(Dst, Src, Count) \ |
851 |
- __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) |
852 |
-# else |
853 |
-# define YYCOPY(Dst, Src, Count) \ |
854 |
- do \ |
855 |
- { \ |
856 |
- YYSIZE_T yyi; \ |
857 |
- for (yyi = 0; yyi < (Count); yyi++) \ |
858 |
- (Dst)[yyi] = (Src)[yyi]; \ |
859 |
- } \ |
860 |
- while (0) |
861 |
-# endif |
862 |
-# endif |
863 |
-#endif /* !YYCOPY_NEEDED */ |
864 |
- |
865 |
-/* YYFINAL -- State number of the termination state. */ |
866 |
-#define YYFINAL 10 |
867 |
-/* YYLAST -- Last index in YYTABLE. */ |
868 |
-#define YYLAST 25 |
869 |
- |
870 |
-/* YYNTOKENS -- Number of terminals. */ |
871 |
-#define YYNTOKENS 12 |
872 |
-/* YYNNTS -- Number of nonterminals. */ |
873 |
-#define YYNNTS 3 |
874 |
-/* YYNRULES -- Number of rules. */ |
875 |
-#define YYNRULES 12 |
876 |
-/* YYNSTATES -- Number of states. */ |
877 |
-#define YYNSTATES 20 |
878 |
- |
879 |
-#define YYUNDEFTOK 2 |
880 |
-#define YYMAXUTOK 260 |
881 |
- |
882 |
-/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM |
883 |
- as returned by yylex, with out-of-bounds checking. */ |
884 |
-#define YYTRANSLATE(YYX) \ |
885 |
- ((unsigned) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) |
886 |
- |
887 |
-/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM |
888 |
- as returned by yylex. */ |
889 |
-static const yytype_uint8 yytranslate[] = |
890 |
-{ |
891 |
- 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
892 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
893 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
894 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
895 |
- 10, 11, 5, 3, 2, 4, 2, 6, 2, 2, |
896 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
897 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
898 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
899 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
900 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
901 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
902 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
903 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
904 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
905 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
906 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
907 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
908 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
909 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
910 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
911 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
912 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
913 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
914 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
915 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
916 |
- 2, 2, 2, 2, 2, 2, 1, 2, 7, 8, |
917 |
- 9 |
918 |
-}; |
919 |
- |
920 |
-#if YYDEBUG |
921 |
- /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ |
922 |
-static const yytype_uint8 yyrline[] = |
923 |
-{ |
924 |
- 0, 99, 99, 100, 103, 104, 105, 106, 107, 108, |
925 |
- 109, 110, 111 |
926 |
-}; |
927 |
-#endif |
928 |
- |
929 |
-#if YYDEBUG || YYERROR_VERBOSE || 0 |
930 |
-/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. |
931 |
- First, the terminals, then, starting at YYNTOKENS, nonterminals. */ |
932 |
-static const char *const yytname[] = |
933 |
-{ |
934 |
- "$end", "error", "$undefined", "'+'", "'-'", "'*'", "'/'", "INTEGER", |
935 |
- "STRING", "FLOAT", "'('", "')'", "$accept", "stmt", "expr", YY_NULLPTR |
936 |
-}; |
937 |
-#endif |
938 |
- |
939 |
-# ifdef YYPRINT |
940 |
-/* YYTOKNUM[NUM] -- (External) token number corresponding to the |
941 |
- (internal) symbol number NUM (which must be that of a token). */ |
942 |
-static const yytype_uint16 yytoknum[] = |
943 |
-{ |
944 |
- 0, 256, 257, 43, 45, 42, 47, 258, 259, 260, |
945 |
- 40, 41 |
946 |
-}; |
947 |
-# endif |
948 |
- |
949 |
-#define YYPACT_NINF -5 |
950 |
- |
951 |
-#define yypact_value_is_default(Yystate) \ |
952 |
- (!!((Yystate) == (-5))) |
953 |
- |
954 |
-#define YYTABLE_NINF -1 |
955 |
- |
956 |
-#define yytable_value_is_error(Yytable_value) \ |
957 |
- 0 |
958 |
- |
959 |
- /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing |
960 |
- STATE-NUM. */ |
961 |
-static const yytype_int8 yypact[] = |
962 |
-{ |
963 |
- 11, 11, -5, -5, -5, 11, 5, 19, -4, 3, |
964 |
- -5, 11, 11, 11, 11, -5, -4, -4, -5, -5 |
965 |
-}; |
966 |
- |
967 |
- /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. |
968 |
- Performed when YYTABLE does not specify something else to do. Zero |
969 |
- means the default is an error. */ |
970 |
-static const yytype_uint8 yydefact[] = |
971 |
-{ |
972 |
- 3, 0, 6, 4, 5, 0, 0, 2, 11, 0, |
973 |
- 1, 0, 0, 0, 0, 12, 7, 8, 9, 10 |
974 |
-}; |
975 |
- |
976 |
- /* YYPGOTO[NTERM-NUM]. */ |
977 |
-static const yytype_int8 yypgoto[] = |
978 |
-{ |
979 |
- -5, -5, -1 |
980 |
-}; |
981 |
- |
982 |
- /* YYDEFGOTO[NTERM-NUM]. */ |
983 |
-static const yytype_int8 yydefgoto[] = |
984 |
-{ |
985 |
- -1, 6, 7 |
986 |
-}; |
987 |
- |
988 |
- /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If |
989 |
- positive, shift that token. If negative, reduce the rule whose |
990 |
- number is the opposite. If YYTABLE_NINF, syntax error. */ |
991 |
-static const yytype_uint8 yytable[] = |
992 |
-{ |
993 |
- 8, 13, 14, 0, 9, 10, 11, 12, 13, 14, |
994 |
- 16, 17, 18, 19, 15, 1, 0, 0, 2, 3, |
995 |
- 4, 5, 11, 12, 13, 14 |
996 |
-}; |
997 |
- |
998 |
-static const yytype_int8 yycheck[] = |
999 |
-{ |
1000 |
- 1, 5, 6, -1, 5, 0, 3, 4, 5, 6, |
1001 |
- 11, 12, 13, 14, 11, 4, -1, -1, 7, 8, |
1002 |
- 9, 10, 3, 4, 5, 6 |
1003 |
-}; |
1004 |
- |
1005 |
- /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing |
1006 |
- symbol of state STATE-NUM. */ |
1007 |
-static const yytype_uint8 yystos[] = |
1008 |
-{ |
1009 |
- 0, 4, 7, 8, 9, 10, 13, 14, 14, 14, |
1010 |
- 0, 3, 4, 5, 6, 11, 14, 14, 14, 14 |
1011 |
-}; |
1012 |
- |
1013 |
- /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ |
1014 |
-static const yytype_uint8 yyr1[] = |
1015 |
-{ |
1016 |
- 0, 12, 13, 13, 14, 14, 14, 14, 14, 14, |
1017 |
- 14, 14, 14 |
1018 |
-}; |
1019 |
- |
1020 |
- /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ |
1021 |
-static const yytype_uint8 yyr2[] = |
1022 |
-{ |
1023 |
- 0, 2, 1, 0, 1, 1, 1, 3, 3, 3, |
1024 |
- 3, 2, 3 |
1025 |
-}; |
1026 |
- |
1027 |
- |
1028 |
-#define yyerrok (yyerrstatus = 0) |
1029 |
-#define yyclearin (yychar = YYEMPTY) |
1030 |
-#define YYEMPTY (-2) |
1031 |
-#define YYEOF 0 |
1032 |
- |
1033 |
-#define YYACCEPT goto yyacceptlab |
1034 |
-#define YYABORT goto yyabortlab |
1035 |
-#define YYERROR goto yyerrorlab |
1036 |
- |
1037 |
- |
1038 |
-#define YYRECOVERING() (!!yyerrstatus) |
1039 |
- |
1040 |
-#define YYBACKUP(Token, Value) \ |
1041 |
- do \ |
1042 |
- if (yychar == YYEMPTY) \ |
1043 |
- { \ |
1044 |
- yychar = (Token); \ |
1045 |
- yylval = (Value); \ |
1046 |
- YYPOPSTACK (yylen); \ |
1047 |
- yystate = *yyssp; \ |
1048 |
- goto yybackup; \ |
1049 |
- } \ |
1050 |
- else \ |
1051 |
- { \ |
1052 |
- yyerror (&yylloc, mc, oxml, result, error_msg, scanner, YY_("syntax error: cannot back up")); \ |
1053 |
- YYERROR; \ |
1054 |
- } \ |
1055 |
- while (0) |
1056 |
- |
1057 |
-/* Error token number */ |
1058 |
-#define YYTERROR 1 |
1059 |
-#define YYERRCODE 256 |
1060 |
- |
1061 |
- |
1062 |
-/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. |
1063 |
- If N is 0, then set CURRENT to the empty location which ends |
1064 |
- the previous symbol: RHS[0] (always defined). */ |
1065 |
- |
1066 |
-#ifndef YYLLOC_DEFAULT |
1067 |
-# define YYLLOC_DEFAULT(Current, Rhs, N) \ |
1068 |
- do \ |
1069 |
- if (N) \ |
1070 |
- { \ |
1071 |
- (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ |
1072 |
- (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ |
1073 |
- (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ |
1074 |
- (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ |
1075 |
- } \ |
1076 |
- else \ |
1077 |
- { \ |
1078 |
- (Current).first_line = (Current).last_line = \ |
1079 |
- YYRHSLOC (Rhs, 0).last_line; \ |
1080 |
- (Current).first_column = (Current).last_column = \ |
1081 |
- YYRHSLOC (Rhs, 0).last_column; \ |
1082 |
- } \ |
1083 |
- while (0) |
1084 |
-#endif |
1085 |
- |
1086 |
-#define YYRHSLOC(Rhs, K) ((Rhs)[K]) |
1087 |
- |
1088 |
- |
1089 |
-/* Enable debugging if requested. */ |
1090 |
-#if YYDEBUG |
1091 |
- |
1092 |
-# ifndef YYFPRINTF |
1093 |
-# include <stdio.h> /* INFRINGES ON USER NAME SPACE */ |
1094 |
-# define YYFPRINTF fprintf |
1095 |
-# endif |
1096 |
- |
1097 |
-# define YYDPRINTF(Args) \ |
1098 |
-do { \ |
1099 |
- if (yydebug) \ |
1100 |
- YYFPRINTF Args; \ |
1101 |
-} while (0) |
1102 |
- |
1103 |
- |
1104 |
-/* YY_LOCATION_PRINT -- Print the location on the stream. |
1105 |
- This macro was not mandated originally: define only if we know |
1106 |
- we won't break user code: when these are the locations we know. */ |
1107 |
- |
1108 |
-#ifndef YY_LOCATION_PRINT |
1109 |
-# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL |
1110 |
- |
1111 |
-/* Print *YYLOCP on YYO. Private, do not rely on its existence. */ |
1112 |
- |
1113 |
-YY_ATTRIBUTE_UNUSED |
1114 |
-static int |
1115 |
-yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp) |
1116 |
-{ |
1117 |
- int res = 0; |
1118 |
- int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0; |
1119 |
- if (0 <= yylocp->first_line) |
1120 |
- { |
1121 |
- res += YYFPRINTF (yyo, "%d", yylocp->first_line); |
1122 |
- if (0 <= yylocp->first_column) |
1123 |
- res += YYFPRINTF (yyo, ".%d", yylocp->first_column); |
1124 |
- } |
1125 |
- if (0 <= yylocp->last_line) |
1126 |
- { |
1127 |
- if (yylocp->first_line < yylocp->last_line) |
1128 |
- { |
1129 |
- res += YYFPRINTF (yyo, "-%d", yylocp->last_line); |
1130 |
- if (0 <= end_col) |
1131 |
- res += YYFPRINTF (yyo, ".%d", end_col); |
1132 |
- } |
1133 |
- else if (0 <= end_col && yylocp->first_column < end_col) |
1134 |
- res += YYFPRINTF (yyo, "-%d", end_col); |
1135 |
- } |
1136 |
- return res; |
1137 |
- } |
1138 |
- |
1139 |
-# define YY_LOCATION_PRINT(File, Loc) \ |
1140 |
- yy_location_print_ (File, &(Loc)) |
1141 |
- |
1142 |
-# else |
1143 |
-# define YY_LOCATION_PRINT(File, Loc) ((void) 0) |
1144 |
-# endif |
1145 |
-#endif |
1146 |
- |
1147 |
- |
1148 |
-# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ |
1149 |
-do { \ |
1150 |
- if (yydebug) \ |
1151 |
- { \ |
1152 |
- YYFPRINTF (stderr, "%s ", Title); \ |
1153 |
- yy_symbol_print (stderr, \ |
1154 |
- Type, Value, Location, mc, oxml, result, error_msg, scanner); \ |
1155 |
- YYFPRINTF (stderr, "\n"); \ |
1156 |
- } \ |
1157 |
-} while (0) |
1158 |
- |
1159 |
- |
1160 |
-/*-----------------------------------. |
1161 |
-| Print this symbol's value on YYO. | |
1162 |
-`-----------------------------------*/ |
1163 |
- |
1164 |
-static void |
1165 |
-yy_symbol_value_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, mem_collector * mc, ObjectXML * oxml, int& result, char ** error_msg, yyscan_t scanner) |
1166 |
-{ |
1167 |
- FILE *yyoutput = yyo; |
1168 |
- YYUSE (yyoutput); |
1169 |
- YYUSE (yylocationp); |
1170 |
- YYUSE (mc); |
1171 |
- YYUSE (oxml); |
1172 |
- YYUSE (result); |
1173 |
- YYUSE (error_msg); |
1174 |
- YYUSE (scanner); |
1175 |
- if (!yyvaluep) |
1176 |
- return; |
1177 |
-# ifdef YYPRINT |
1178 |
- if (yytype < YYNTOKENS) |
1179 |
- YYPRINT (yyo, yytoknum[yytype], *yyvaluep); |
1180 |
-# endif |
1181 |
- YYUSE (yytype); |
1182 |
-} |
1183 |
- |
1184 |
- |
1185 |
-/*---------------------------. |
1186 |
-| Print this symbol on YYO. | |
1187 |
-`---------------------------*/ |
1188 |
- |
1189 |
-static void |
1190 |
-yy_symbol_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, mem_collector * mc, ObjectXML * oxml, int& result, char ** error_msg, yyscan_t scanner) |
1191 |
-{ |
1192 |
- YYFPRINTF (yyo, "%s %s (", |
1193 |
- yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); |
1194 |
- |
1195 |
- YY_LOCATION_PRINT (yyo, *yylocationp); |
1196 |
- YYFPRINTF (yyo, ": "); |
1197 |
- yy_symbol_value_print (yyo, yytype, yyvaluep, yylocationp, mc, oxml, result, error_msg, scanner); |
1198 |
- YYFPRINTF (yyo, ")"); |
1199 |
-} |
1200 |
- |
1201 |
-/*------------------------------------------------------------------. |
1202 |
-| yy_stack_print -- Print the state stack from its BOTTOM up to its | |
1203 |
-| TOP (included). | |
1204 |
-`------------------------------------------------------------------*/ |
1205 |
- |
1206 |
-static void |
1207 |
-yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) |
1208 |
-{ |
1209 |
- YYFPRINTF (stderr, "Stack now"); |
1210 |
- for (; yybottom <= yytop; yybottom++) |
1211 |
- { |
1212 |
- int yybot = *yybottom; |
1213 |
- YYFPRINTF (stderr, " %d", yybot); |
1214 |
- } |
1215 |
- YYFPRINTF (stderr, "\n"); |
1216 |
-} |
1217 |
- |
1218 |
-# define YY_STACK_PRINT(Bottom, Top) \ |
1219 |
-do { \ |
1220 |
- if (yydebug) \ |
1221 |
- yy_stack_print ((Bottom), (Top)); \ |
1222 |
-} while (0) |
1223 |
- |
1224 |
- |
1225 |
-/*------------------------------------------------. |
1226 |
-| Report that the YYRULE is going to be reduced. | |
1227 |
-`------------------------------------------------*/ |
1228 |
- |
1229 |
-static void |
1230 |
-yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, mem_collector * mc, ObjectXML * oxml, int& result, char ** error_msg, yyscan_t scanner) |
1231 |
-{ |
1232 |
- unsigned long yylno = yyrline[yyrule]; |
1233 |
- int yynrhs = yyr2[yyrule]; |
1234 |
- int yyi; |
1235 |
- YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", |
1236 |
- yyrule - 1, yylno); |
1237 |
- /* The symbols being reduced. */ |
1238 |
- for (yyi = 0; yyi < yynrhs; yyi++) |
1239 |
- { |
1240 |
- YYFPRINTF (stderr, " $%d = ", yyi + 1); |
1241 |
- yy_symbol_print (stderr, |
1242 |
- yystos[yyssp[yyi + 1 - yynrhs]], |
1243 |
- &yyvsp[(yyi + 1) - (yynrhs)] |
1244 |
- , &(yylsp[(yyi + 1) - (yynrhs)]) , mc, oxml, result, error_msg, scanner); |
1245 |
- YYFPRINTF (stderr, "\n"); |
1246 |
- } |
1247 |
-} |
1248 |
- |
1249 |
-# define YY_REDUCE_PRINT(Rule) \ |
1250 |
-do { \ |
1251 |
- if (yydebug) \ |
1252 |
- yy_reduce_print (yyssp, yyvsp, yylsp, Rule, mc, oxml, result, error_msg, scanner); \ |
1253 |
-} while (0) |
1254 |
- |
1255 |
-/* Nonzero means print parse trace. It is left uninitialized so that |
1256 |
- multiple parsers can coexist. */ |
1257 |
-int yydebug; |
1258 |
-#else /* !YYDEBUG */ |
1259 |
-# define YYDPRINTF(Args) |
1260 |
-# define YY_SYMBOL_PRINT(Title, Type, Value, Location) |
1261 |
-# define YY_STACK_PRINT(Bottom, Top) |
1262 |
-# define YY_REDUCE_PRINT(Rule) |
1263 |
-#endif /* !YYDEBUG */ |
1264 |
- |
1265 |
- |
1266 |
-/* YYINITDEPTH -- initial size of the parser's stacks. */ |
1267 |
-#ifndef YYINITDEPTH |
1268 |
-# define YYINITDEPTH 200 |
1269 |
-#endif |
1270 |
- |
1271 |
-/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only |
1272 |
- if the built-in stack extension method is used). |
1273 |
- |
1274 |
- Do not make this value too large; the results are undefined if |
1275 |
- YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) |
1276 |
- evaluated with infinite-precision integer arithmetic. */ |
1277 |
- |
1278 |
-#ifndef YYMAXDEPTH |
1279 |
-# define YYMAXDEPTH 10000 |
1280 |
-#endif |
1281 |
- |
1282 |
- |
1283 |
-#if YYERROR_VERBOSE |
1284 |
- |
1285 |
-# ifndef yystrlen |
1286 |
-# if defined __GLIBC__ && defined _STRING_H |
1287 |
-# define yystrlen strlen |
1288 |
-# else |
1289 |
-/* Return the length of YYSTR. */ |
1290 |
-static YYSIZE_T |
1291 |
-yystrlen (const char *yystr) |
1292 |
-{ |
1293 |
- YYSIZE_T yylen; |
1294 |
- for (yylen = 0; yystr[yylen]; yylen++) |
1295 |
- continue; |
1296 |
- return yylen; |
1297 |
-} |
1298 |
-# endif |
1299 |
-# endif |
1300 |
- |
1301 |
-# ifndef yystpcpy |
1302 |
-# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE |
1303 |
-# define yystpcpy stpcpy |
1304 |
-# else |
1305 |
-/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in |
1306 |
- YYDEST. */ |
1307 |
-static char * |
1308 |
-yystpcpy (char *yydest, const char *yysrc) |
1309 |
-{ |
1310 |
- char *yyd = yydest; |
1311 |
- const char *yys = yysrc; |
1312 |
- |
1313 |
- while ((*yyd++ = *yys++) != '\0') |
1314 |
- continue; |
1315 |
- |
1316 |
- return yyd - 1; |
1317 |
-} |
1318 |
-# endif |
1319 |
-# endif |
1320 |
- |
1321 |
-# ifndef yytnamerr |
1322 |
-/* Copy to YYRES the contents of YYSTR after stripping away unnecessary |
1323 |
- quotes and backslashes, so that it's suitable for yyerror. The |
1324 |
- heuristic is that double-quoting is unnecessary unless the string |
1325 |
- contains an apostrophe, a comma, or backslash (other than |
1326 |
- backslash-backslash). YYSTR is taken from yytname. If YYRES is |
1327 |
- null, do not copy; instead, return the length of what the result |
1328 |
- would have been. */ |
1329 |
-static YYSIZE_T |
1330 |
-yytnamerr (char *yyres, const char *yystr) |
1331 |
-{ |
1332 |
- if (*yystr == '"') |
1333 |
- { |
1334 |
- YYSIZE_T yyn = 0; |
1335 |
- char const *yyp = yystr; |
1336 |
- |
1337 |
- for (;;) |
1338 |
- switch (*++yyp) |
1339 |
- { |
1340 |
- case '\'': |
1341 |
- case ',': |
1342 |
- goto do_not_strip_quotes; |
1343 |
- |
1344 |
- case '\\': |
1345 |
- if (*++yyp != '\\') |
1346 |
- goto do_not_strip_quotes; |
1347 |
- else |
1348 |
- goto append; |
1349 |
- |
1350 |
- append: |
1351 |
- default: |
1352 |
- if (yyres) |
1353 |
- yyres[yyn] = *yyp; |
1354 |
- yyn++; |
1355 |
- break; |
1356 |
- |
1357 |
- case '"': |
1358 |
- if (yyres) |
1359 |
- yyres[yyn] = '\0'; |
1360 |
- return yyn; |
1361 |
- } |
1362 |
- do_not_strip_quotes: ; |
1363 |
- } |
1364 |
- |
1365 |
- if (! yyres) |
1366 |
- return yystrlen (yystr); |
1367 |
- |
1368 |
- return (YYSIZE_T) (yystpcpy (yyres, yystr) - yyres); |
1369 |
-} |
1370 |
-# endif |
1371 |
- |
1372 |
-/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message |
1373 |
- about the unexpected token YYTOKEN for the state stack whose top is |
1374 |
- YYSSP. |
1375 |
- |
1376 |
- Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is |
1377 |
- not large enough to hold the message. In that case, also set |
1378 |
- *YYMSG_ALLOC to the required number of bytes. Return 2 if the |
1379 |
- required number of bytes is too large to store. */ |
1380 |
-static int |
1381 |
-yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, |
1382 |
- yytype_int16 *yyssp, int yytoken) |
1383 |
-{ |
1384 |
- YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]); |
1385 |
- YYSIZE_T yysize = yysize0; |
1386 |
- enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; |
1387 |
- /* Internationalized format string. */ |
1388 |
- const char *yyformat = YY_NULLPTR; |
1389 |
- /* Arguments of yyformat. */ |
1390 |
- char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; |
1391 |
- /* Number of reported tokens (one for the "unexpected", one per |
1392 |
- "expected"). */ |
1393 |
- int yycount = 0; |
1394 |
- |
1395 |
- /* There are many possibilities here to consider: |
1396 |
- - If this state is a consistent state with a default action, then |
1397 |
- the only way this function was invoked is if the default action |
1398 |
- is an error action. In that case, don't check for expected |
1399 |
- tokens because there are none. |
1400 |
- - The only way there can be no lookahead present (in yychar) is if |
1401 |
- this state is a consistent state with a default action. Thus, |
1402 |
- detecting the absence of a lookahead is sufficient to determine |
1403 |
- that there is no unexpected or expected token to report. In that |
1404 |
- case, just report a simple "syntax error". |
1405 |
- - Don't assume there isn't a lookahead just because this state is a |
1406 |
- consistent state with a default action. There might have been a |
1407 |
- previous inconsistent state, consistent state with a non-default |
1408 |
- action, or user semantic action that manipulated yychar. |
1409 |
- - Of course, the expected token list depends on states to have |
1410 |
- correct lookahead information, and it depends on the parser not |
1411 |
- to perform extra reductions after fetching a lookahead from the |
1412 |
- scanner and before detecting a syntax error. Thus, state merging |
1413 |
- (from LALR or IELR) and default reductions corrupt the expected |
1414 |
- token list. However, the list is correct for canonical LR with |
1415 |
- one exception: it will still contain any token that will not be |
1416 |
- accepted due to an error action in a later state. |
1417 |
- */ |
1418 |
- if (yytoken != YYEMPTY) |
1419 |
- { |
1420 |
- int yyn = yypact[*yyssp]; |
1421 |
- yyarg[yycount++] = yytname[yytoken]; |
1422 |
- if (!yypact_value_is_default (yyn)) |
1423 |
- { |
1424 |
- /* Start YYX at -YYN if negative to avoid negative indexes in |
1425 |
- YYCHECK. In other words, skip the first -YYN actions for |
1426 |
- this state because they are default actions. */ |
1427 |
- int yyxbegin = yyn < 0 ? -yyn : 0; |
1428 |
- /* Stay within bounds of both yycheck and yytname. */ |
1429 |
- int yychecklim = YYLAST - yyn + 1; |
1430 |
- int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; |
1431 |
- int yyx; |
1432 |
- |
1433 |
- for (yyx = yyxbegin; yyx < yyxend; ++yyx) |
1434 |
- if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR |
1435 |
- && !yytable_value_is_error (yytable[yyx + yyn])) |
1436 |
- { |
1437 |
- if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) |
1438 |
- { |
1439 |
- yycount = 1; |
1440 |
- yysize = yysize0; |
1441 |
- break; |
1442 |
- } |
1443 |
- yyarg[yycount++] = yytname[yyx]; |
1444 |
- { |
1445 |
- YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]); |
1446 |
- if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) |
1447 |
- yysize = yysize1; |
1448 |
- else |
1449 |
- return 2; |
1450 |
- } |
1451 |
- } |
1452 |
- } |
1453 |
- } |
1454 |
- |
1455 |
- switch (yycount) |
1456 |
- { |
1457 |
-# define YYCASE_(N, S) \ |
1458 |
- case N: \ |
1459 |
- yyformat = S; \ |
1460 |
- break |
1461 |
- default: /* Avoid compiler warnings. */ |
1462 |
- YYCASE_(0, YY_("syntax error")); |
1463 |
- YYCASE_(1, YY_("syntax error, unexpected %s")); |
1464 |
- YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); |
1465 |
- YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); |
1466 |
- YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); |
1467 |
- YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); |
1468 |
-# undef YYCASE_ |
1469 |
- } |
1470 |
- |
1471 |
- { |
1472 |
- YYSIZE_T yysize1 = yysize + yystrlen (yyformat); |
1473 |
- if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) |
1474 |
- yysize = yysize1; |
1475 |
- else |
1476 |
- return 2; |
1477 |
- } |
1478 |
- |
1479 |
- if (*yymsg_alloc < yysize) |
1480 |
- { |
1481 |
- *yymsg_alloc = 2 * yysize; |
1482 |
- if (! (yysize <= *yymsg_alloc |
1483 |
- && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) |
1484 |
- *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; |
1485 |
- return 1; |
1486 |
- } |
1487 |
- |
1488 |
- /* Avoid sprintf, as that infringes on the user's name space. |
1489 |
- Don't have undefined behavior even if the translation |
1490 |
- produced a string with the wrong number of "%s"s. */ |
1491 |
- { |
1492 |
- char *yyp = *yymsg; |
1493 |
- int yyi = 0; |
1494 |
- while ((*yyp = *yyformat) != '\0') |
1495 |
- if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) |
1496 |
- { |
1497 |
- yyp += yytnamerr (yyp, yyarg[yyi++]); |
1498 |
- yyformat += 2; |
1499 |
- } |
1500 |
- else |
1501 |
- { |
1502 |
- yyp++; |
1503 |
- yyformat++; |
1504 |
- } |
1505 |
- } |
1506 |
- return 0; |
1507 |
-} |
1508 |
-#endif /* YYERROR_VERBOSE */ |
1509 |
- |
1510 |
-/*-----------------------------------------------. |
1511 |
-| Release the memory associated to this symbol. | |
1512 |
-`-----------------------------------------------*/ |
1513 |
- |
1514 |
-static void |
1515 |
-yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, mem_collector * mc, ObjectXML * oxml, int& result, char ** error_msg, yyscan_t scanner) |
1516 |
-{ |
1517 |
- YYUSE (yyvaluep); |
1518 |
- YYUSE (yylocationp); |
1519 |
- YYUSE (mc); |
1520 |
- YYUSE (oxml); |
1521 |
- YYUSE (result); |
1522 |
- YYUSE (error_msg); |
1523 |
- YYUSE (scanner); |
1524 |
- if (!yymsg) |
1525 |
- yymsg = "Deleting"; |
1526 |
- YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); |
1527 |
- |
1528 |
- YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
1529 |
- YYUSE (yytype); |
1530 |
- YY_IGNORE_MAYBE_UNINITIALIZED_END |
1531 |
-} |
1532 |
- |
1533 |
- |
1534 |
- |
1535 |
- |
1536 |
-/*----------. |
1537 |
-| yyparse. | |
1538 |
-`----------*/ |
1539 |
- |
1540 |
-int |
1541 |
-yyparse (mem_collector * mc, ObjectXML * oxml, int& result, char ** error_msg, yyscan_t scanner) |
1542 |
-{ |
1543 |
-/* The lookahead symbol. */ |
1544 |
-int yychar; |
1545 |
- |
1546 |
- |
1547 |
-/* The semantic value of the lookahead symbol. */ |
1548 |
-/* Default value used for initialization, for pacifying older GCCs |
1549 |
- or non-GCC compilers. */ |
1550 |
-YY_INITIAL_VALUE (static YYSTYPE yyval_default;) |
1551 |
-YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); |
1552 |
- |
1553 |
-/* Location data for the lookahead symbol. */ |
1554 |
-static YYLTYPE yyloc_default |
1555 |
-# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL |
1556 |
- = { 1, 1, 1, 1 } |
1557 |
-# endif |
1558 |
-; |
1559 |
-YYLTYPE yylloc = yyloc_default; |
1560 |
- |
1561 |
- /* Number of syntax errors so far. */ |
1562 |
- int yynerrs; |
1563 |
- |
1564 |
- int yystate; |
1565 |
- /* Number of tokens to shift before error messages enabled. */ |
1566 |
- int yyerrstatus; |
1567 |
- |
1568 |
- /* The stacks and their tools: |
1569 |
- 'yyss': related to states. |
1570 |
- 'yyvs': related to semantic values. |
1571 |
- 'yyls': related to locations. |
1572 |
- |
1573 |
- Refer to the stacks through separate pointers, to allow yyoverflow |
1574 |
- to reallocate them elsewhere. */ |
1575 |
- |
1576 |
- /* The state stack. */ |
1577 |
- yytype_int16 yyssa[YYINITDEPTH]; |
1578 |
- yytype_int16 *yyss; |
1579 |
- yytype_int16 *yyssp; |
1580 |
- |
1581 |
- /* The semantic value stack. */ |
1582 |
- YYSTYPE yyvsa[YYINITDEPTH]; |
1583 |
- YYSTYPE *yyvs; |
1584 |
- YYSTYPE *yyvsp; |
1585 |
- |
1586 |
- /* The location stack. */ |
1587 |
- YYLTYPE yylsa[YYINITDEPTH]; |
1588 |
- YYLTYPE *yyls; |
1589 |
- YYLTYPE *yylsp; |
1590 |
- |
1591 |
- /* The locations where the error started and ended. */ |
1592 |
- YYLTYPE yyerror_range[3]; |
1593 |
- |
1594 |
- YYSIZE_T yystacksize; |
1595 |
- |
1596 |
- int yyn; |
1597 |
- int yyresult; |
1598 |
- /* Lookahead token as an internal (translated) token number. */ |
1599 |
- int yytoken = 0; |
1600 |
- /* The variables used to return semantic value and location from the |
1601 |
- action routines. */ |
1602 |
- YYSTYPE yyval; |
1603 |
- YYLTYPE yyloc; |
1604 |
- |
1605 |
-#if YYERROR_VERBOSE |
1606 |
- /* Buffer for error messages, and its allocated size. */ |
1607 |
- char yymsgbuf[128]; |
1608 |
- char *yymsg = yymsgbuf; |
1609 |
- YYSIZE_T yymsg_alloc = sizeof yymsgbuf; |
1610 |
-#endif |
1611 |
- |
1612 |
-#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) |
1613 |
- |
1614 |
- /* The number of symbols on the RHS of the reduced rule. |
1615 |
- Keep to zero when no symbol should be popped. */ |
1616 |
- int yylen = 0; |
1617 |
- |
1618 |
- yyssp = yyss = yyssa; |
1619 |
- yyvsp = yyvs = yyvsa; |
1620 |
- yylsp = yyls = yylsa; |
1621 |
- yystacksize = YYINITDEPTH; |
1622 |
- |
1623 |
- YYDPRINTF ((stderr, "Starting parse\n")); |
1624 |
- |
1625 |
- yystate = 0; |
1626 |
- yyerrstatus = 0; |
1627 |
- yynerrs = 0; |
1628 |
- yychar = YYEMPTY; /* Cause a token to be read. */ |
1629 |
- yylsp[0] = yylloc; |
1630 |
- goto yysetstate; |
1631 |
- |
1632 |
- |
1633 |
-/*------------------------------------------------------------. |
1634 |
-| yynewstate -- push a new state, which is found in yystate. | |
1635 |
-`------------------------------------------------------------*/ |
1636 |
-yynewstate: |
1637 |
- /* In all cases, when you get here, the value and location stacks |
1638 |
- have just been pushed. So pushing a state here evens the stacks. */ |
1639 |
- yyssp++; |
1640 |
- |
1641 |
- |
1642 |
-/*--------------------------------------------------------------------. |
1643 |
-| yynewstate -- set current state (the top of the stack) to yystate. | |
1644 |
-`--------------------------------------------------------------------*/ |
1645 |
-yysetstate: |
1646 |
- YYDPRINTF ((stderr, "Entering state %d\n", yystate)); |
1647 |
- YY_ASSERT (0 <= yystate && yystate < YYNSTATES); |
1648 |
- *yyssp = (yytype_int16) yystate; |
1649 |
- |
1650 |
- if (yyss + yystacksize - 1 <= yyssp) |
1651 |
-#if !defined yyoverflow && !defined YYSTACK_RELOCATE |
1652 |
- goto yyexhaustedlab; |
1653 |
-#else |
1654 |
- { |
1655 |
- /* Get the current used size of the three stacks, in elements. */ |
1656 |
- YYSIZE_T yysize = (YYSIZE_T) (yyssp - yyss + 1); |
1657 |
- |
1658 |
-# if defined yyoverflow |
1659 |
- { |
1660 |
- /* Give user a chance to reallocate the stack. Use copies of |
1661 |
- these so that the &'s don't force the real ones into |
1662 |
- memory. */ |
1663 |
- YYSTYPE *yyvs1 = yyvs; |
1664 |
- yytype_int16 *yyss1 = yyss; |
1665 |
- YYLTYPE *yyls1 = yyls; |
1666 |
- |
1667 |
- /* Each stack pointer address is followed by the size of the |
1668 |
- data in use in that stack, in bytes. This used to be a |
1669 |
- conditional around just the two extra args, but that might |
1670 |
- be undefined if yyoverflow is a macro. */ |
1671 |
- yyoverflow (YY_("memory exhausted"), |
1672 |
- &yyss1, yysize * sizeof (*yyssp), |
1673 |
- &yyvs1, yysize * sizeof (*yyvsp), |
1674 |
- &yyls1, yysize * sizeof (*yylsp), |
1675 |
- &yystacksize); |
1676 |
- yyss = yyss1; |
1677 |
- yyvs = yyvs1; |
1678 |
- yyls = yyls1; |
1679 |
- } |
1680 |
-# else /* defined YYSTACK_RELOCATE */ |
1681 |
- /* Extend the stack our own way. */ |
1682 |
- if (YYMAXDEPTH <= yystacksize) |
1683 |
- goto yyexhaustedlab; |
1684 |
- yystacksize *= 2; |
1685 |
- if (YYMAXDEPTH < yystacksize) |
1686 |
- yystacksize = YYMAXDEPTH; |
1687 |
- |
1688 |
- { |
1689 |
- yytype_int16 *yyss1 = yyss; |
1690 |
- union yyalloc *yyptr = |
1691 |
- (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); |
1692 |
- if (! yyptr) |
1693 |
- goto yyexhaustedlab; |
1694 |
- YYSTACK_RELOCATE (yyss_alloc, yyss); |
1695 |
- YYSTACK_RELOCATE (yyvs_alloc, yyvs); |
1696 |
- YYSTACK_RELOCATE (yyls_alloc, yyls); |
1697 |
-# undef YYSTACK_RELOCATE |
1698 |
- if (yyss1 != yyssa) |
1699 |
- YYSTACK_FREE (yyss1); |
1700 |
- } |
1701 |
-# endif |
1702 |
- |
1703 |
- yyssp = yyss + yysize - 1; |
1704 |
- yyvsp = yyvs + yysize - 1; |
1705 |
- yylsp = yyls + yysize - 1; |
1706 |
- |
1707 |
- YYDPRINTF ((stderr, "Stack size increased to %lu\n", |
1708 |
- (unsigned long) yystacksize)); |
1709 |
- |
1710 |
- if (yyss + yystacksize - 1 <= yyssp) |
1711 |
- YYABORT; |
1712 |
- } |
1713 |
-#endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */ |
1714 |
- |
1715 |
- if (yystate == YYFINAL) |
1716 |
- YYACCEPT; |
1717 |
- |
1718 |
- goto yybackup; |
1719 |
- |
1720 |
- |
1721 |
-/*-----------. |
1722 |
-| yybackup. | |
1723 |
-`-----------*/ |
1724 |
-yybackup: |
1725 |
- /* Do appropriate processing given the current state. Read a |
1726 |
- lookahead token if we need one and don't already have one. */ |
1727 |
- |
1728 |
- /* First try to decide what to do without reference to lookahead token. */ |
1729 |
- yyn = yypact[yystate]; |
1730 |
- if (yypact_value_is_default (yyn)) |
1731 |
- goto yydefault; |
1732 |
- |
1733 |
- /* Not known => get a lookahead token if don't already have one. */ |
1734 |
- |
1735 |
- /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ |
1736 |
- if (yychar == YYEMPTY) |
1737 |
- { |
1738 |
- YYDPRINTF ((stderr, "Reading a token: ")); |
1739 |
- yychar = yylex (&yylval, &yylloc, mc, scanner); |
1740 |
- } |
1741 |
- |
1742 |
- if (yychar <= YYEOF) |
1743 |
- { |
1744 |
- yychar = yytoken = YYEOF; |
1745 |
- YYDPRINTF ((stderr, "Now at end of input.\n")); |
1746 |
- } |
1747 |
- else |
1748 |
- { |
1749 |
- yytoken = YYTRANSLATE (yychar); |
1750 |
- YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); |
1751 |
- } |
1752 |
- |
1753 |
- /* If the proper action on seeing token YYTOKEN is to reduce or to |
1754 |
- detect an error, take that action. */ |
1755 |
- yyn += yytoken; |
1756 |
- if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) |
1757 |
- goto yydefault; |
1758 |
- yyn = yytable[yyn]; |
1759 |
- if (yyn <= 0) |
1760 |
- { |
1761 |
- if (yytable_value_is_error (yyn)) |
1762 |
- goto yyerrlab; |
1763 |
- yyn = -yyn; |
1764 |
- goto yyreduce; |
1765 |
- } |
1766 |
- |
1767 |
- /* Count tokens shifted since error; after three, turn off error |
1768 |
- status. */ |
1769 |
- if (yyerrstatus) |
1770 |
- yyerrstatus--; |
1771 |
- |
1772 |
- /* Shift the lookahead token. */ |
1773 |
- YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); |
1774 |
- |
1775 |
- /* Discard the shifted token. */ |
1776 |
- yychar = YYEMPTY; |
1777 |
- |
1778 |
- yystate = yyn; |
1779 |
- YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
1780 |
- *++yyvsp = yylval; |
1781 |
- YY_IGNORE_MAYBE_UNINITIALIZED_END |
1782 |
- *++yylsp = yylloc; |
1783 |
- goto yynewstate; |
1784 |
- |
1785 |
- |
1786 |
-/*-----------------------------------------------------------. |
1787 |
-| yydefault -- do the default action for the current state. | |
1788 |
-`-----------------------------------------------------------*/ |
1789 |
-yydefault: |
1790 |
- yyn = yydefact[yystate]; |
1791 |
- if (yyn == 0) |
1792 |
- goto yyerrlab; |
1793 |
- goto yyreduce; |
1794 |
- |
1795 |
- |
1796 |
-/*-----------------------------. |
1797 |
-| yyreduce -- do a reduction. | |
1798 |
-`-----------------------------*/ |
1799 |
-yyreduce: |
1800 |
- /* yyn is the number of a rule to reduce with. */ |
1801 |
- yylen = yyr2[yyn]; |
1802 |
- |
1803 |
- /* If YYLEN is nonzero, implement the default value of the action: |
1804 |
- '$$ = $1'. |
1805 |
- |
1806 |
- Otherwise, the following line sets YYVAL to garbage. |
1807 |
- This behavior is undocumented and Bison |
1808 |
- users should not rely upon it. Assigning to YYVAL |
1809 |
- unconditionally makes the parser a bit smaller, and it avoids a |
1810 |
- GCC warning that YYVAL may be used uninitialized. */ |
1811 |
- yyval = yyvsp[1-yylen]; |
1812 |
- |
1813 |
- /* Default location. */ |
1814 |
- YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen); |
1815 |
- yyerror_range[1] = yyloc; |
1816 |
- YY_REDUCE_PRINT (yyn); |
1817 |
- switch (yyn) |
1818 |
- { |
1819 |
- case 2: |
1820 |
-#line 99 "expr_arith.y" |
1821 |
- { result = static_cast<int>((yyvsp[0].val_float));} |
1822 |
-#line 1403 "expr_arith.cc" |
1823 |
- break; |
1824 |
- |
1825 |
- case 3: |
1826 |
-#line 100 "expr_arith.y" |
1827 |
- { result = 0; } |
1828 |
-#line 1409 "expr_arith.cc" |
1829 |
- break; |
1830 |
- |
1831 |
- case 4: |
1832 |
-#line 103 "expr_arith.y" |
1833 |
- { float val; oxml->search((yyvsp[0].val_str), val); (yyval.val_float) = val; } |
1834 |
-#line 1415 "expr_arith.cc" |
1835 |
- break; |
1836 |
- |
1837 |
- case 5: |
1838 |
-#line 104 "expr_arith.y" |
1839 |
- { (yyval.val_float) = (yyvsp[0].val_float); } |
1840 |
-#line 1421 "expr_arith.cc" |
1841 |
- break; |
1842 |
- |
1843 |
- case 6: |
1844 |
-#line 105 "expr_arith.y" |
1845 |
- { (yyval.val_float) = static_cast<float>((yyvsp[0].val_int)); } |
1846 |
-#line 1427 "expr_arith.cc" |
1847 |
- break; |
1848 |
- |
1849 |
- case 7: |
1850 |
-#line 106 "expr_arith.y" |
1851 |
- { (yyval.val_float) = (yyvsp[-2].val_float) + (yyvsp[0].val_float);} |
1852 |
-#line 1433 "expr_arith.cc" |
1853 |
- break; |
1854 |
- |
1855 |
- case 8: |
1856 |
-#line 107 "expr_arith.y" |
1857 |
- { (yyval.val_float) = (yyvsp[-2].val_float) - (yyvsp[0].val_float);} |
1858 |
-#line 1439 "expr_arith.cc" |
1859 |
- break; |
1860 |
- |
1861 |
- case 9: |
1862 |
-#line 108 "expr_arith.y" |
1863 |
- { (yyval.val_float) = (yyvsp[-2].val_float) * (yyvsp[0].val_float);} |
1864 |
-#line 1445 "expr_arith.cc" |
1865 |
- break; |
1866 |
- |
1867 |
- case 10: |
1868 |
-#line 109 "expr_arith.y" |
1869 |
- { (yyval.val_float) = (yyvsp[-2].val_float) / (yyvsp[0].val_float);} |
1870 |
-#line 1451 "expr_arith.cc" |
1871 |
- break; |
1872 |
- |
1873 |
- case 11: |
1874 |
-#line 110 "expr_arith.y" |
1875 |
- { (yyval.val_float) = - (yyvsp[0].val_float);} |
1876 |
-#line 1457 "expr_arith.cc" |
1877 |
- break; |
1878 |
- |
1879 |
- case 12: |
1880 |
-#line 111 "expr_arith.y" |
1881 |
- { (yyval.val_float) = (yyvsp[-1].val_float);} |
1882 |
-#line 1463 "expr_arith.cc" |
1883 |
- break; |
1884 |
- |
1885 |
- |
1886 |
-#line 1467 "expr_arith.cc" |
1887 |
- |
1888 |
- default: break; |
1889 |
- } |
1890 |
- /* User semantic actions sometimes alter yychar, and that requires |
1891 |
- that yytoken be updated with the new translation. We take the |
1892 |
- approach of translating immediately before every use of yytoken. |
1893 |
- One alternative is translating here after every semantic action, |
1894 |
- but that translation would be missed if the semantic action invokes |
1895 |
- YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or |
1896 |
- if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an |
1897 |
- incorrect destructor might then be invoked immediately. In the |
1898 |
- case of YYERROR or YYBACKUP, subsequent parser actions might lead |
1899 |
- to an incorrect destructor call or verbose syntax error message |
1900 |
- before the lookahead is translated. */ |
1901 |
- YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); |
1902 |
- |
1903 |
- YYPOPSTACK (yylen); |
1904 |
- yylen = 0; |
1905 |
- YY_STACK_PRINT (yyss, yyssp); |
1906 |
- |
1907 |
- *++yyvsp = yyval; |
1908 |
- *++yylsp = yyloc; |
1909 |
- |
1910 |
- /* Now 'shift' the result of the reduction. Determine what state |
1911 |
- that goes to, based on the state we popped back to and the rule |
1912 |
- number reduced by. */ |
1913 |
- { |
1914 |
- const int yylhs = yyr1[yyn] - YYNTOKENS; |
1915 |
- const int yyi = yypgoto[yylhs] + *yyssp; |
1916 |
- yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp |
1917 |
- ? yytable[yyi] |
1918 |
- : yydefgoto[yylhs]); |
1919 |
- } |
1920 |
- |
1921 |
- goto yynewstate; |
1922 |
- |
1923 |
- |
1924 |
-/*--------------------------------------. |
1925 |
-| yyerrlab -- here on detecting error. | |
1926 |
-`--------------------------------------*/ |
1927 |
-yyerrlab: |
1928 |
- /* Make sure we have latest lookahead translation. See comments at |
1929 |
- user semantic actions for why this is necessary. */ |
1930 |
- yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); |
1931 |
- |
1932 |
- /* If not already recovering from an error, report this error. */ |
1933 |
- if (!yyerrstatus) |
1934 |
- { |
1935 |
- ++yynerrs; |
1936 |
-#if ! YYERROR_VERBOSE |
1937 |
- yyerror (&yylloc, mc, oxml, result, error_msg, scanner, YY_("syntax error")); |
1938 |
-#else |
1939 |
-# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ |
1940 |
- yyssp, yytoken) |
1941 |
- { |
1942 |
- char const *yymsgp = YY_("syntax error"); |
1943 |
- int yysyntax_error_status; |
1944 |
- yysyntax_error_status = YYSYNTAX_ERROR; |
1945 |
- if (yysyntax_error_status == 0) |
1946 |
- yymsgp = yymsg; |
1947 |
- else if (yysyntax_error_status == 1) |
1948 |
- { |
1949 |
- if (yymsg != yymsgbuf) |
1950 |
- YYSTACK_FREE (yymsg); |
1951 |
- yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); |
1952 |
- if (!yymsg) |
1953 |
- { |
1954 |
- yymsg = yymsgbuf; |
1955 |
- yymsg_alloc = sizeof yymsgbuf; |
1956 |
- yysyntax_error_status = 2; |
1957 |
- } |
1958 |
- else |
1959 |
- { |
1960 |
- yysyntax_error_status = YYSYNTAX_ERROR; |
1961 |
- yymsgp = yymsg; |
1962 |
- } |
1963 |
- } |
1964 |
- yyerror (&yylloc, mc, oxml, result, error_msg, scanner, yymsgp); |
1965 |
- if (yysyntax_error_status == 2) |
1966 |
- goto yyexhaustedlab; |
1967 |
- } |
1968 |
-# undef YYSYNTAX_ERROR |
1969 |
-#endif |
1970 |
- } |
1971 |
- |
1972 |
- yyerror_range[1] = yylloc; |
1973 |
- |
1974 |
- if (yyerrstatus == 3) |
1975 |
- { |
1976 |
- /* If just tried and failed to reuse lookahead token after an |
1977 |
- error, discard it. */ |
1978 |
- |
1979 |
- if (yychar <= YYEOF) |
1980 |
- { |
1981 |
- /* Return failure if at end of input. */ |
1982 |
- if (yychar == YYEOF) |
1983 |
- YYABORT; |
1984 |
- } |
1985 |
- else |
1986 |
- { |
1987 |
- yydestruct ("Error: discarding", |
1988 |
- yytoken, &yylval, &yylloc, mc, oxml, result, error_msg, scanner); |
1989 |
- yychar = YYEMPTY; |
1990 |
- } |
1991 |
- } |
1992 |
- |
1993 |
- /* Else will try to reuse lookahead token after shifting the error |
1994 |
- token. */ |
1995 |
- goto yyerrlab1; |
1996 |
- |
1997 |
- |
1998 |
-/*---------------------------------------------------. |
1999 |
-| yyerrorlab -- error raised explicitly by YYERROR. | |
2000 |
-`---------------------------------------------------*/ |
2001 |
-yyerrorlab: |
2002 |
- /* Pacify compilers when the user code never invokes YYERROR and the |
2003 |
- label yyerrorlab therefore never appears in user code. */ |
2004 |
- if (0) |
2005 |
- YYERROR; |
2006 |
- |
2007 |
- /* Do not reclaim the symbols of the rule whose action triggered |
2008 |
- this YYERROR. */ |
2009 |
- YYPOPSTACK (yylen); |
2010 |
- yylen = 0; |
2011 |
- YY_STACK_PRINT (yyss, yyssp); |
2012 |
- yystate = *yyssp; |
2013 |
- goto yyerrlab1; |
2014 |
- |
2015 |
- |
2016 |
-/*-------------------------------------------------------------. |
2017 |
-| yyerrlab1 -- common code for both syntax error and YYERROR. | |
2018 |
-`-------------------------------------------------------------*/ |
2019 |
-yyerrlab1: |
2020 |
- yyerrstatus = 3; /* Each real token shifted decrements this. */ |
2021 |
- |
2022 |
- for (;;) |
2023 |
- { |
2024 |
- yyn = yypact[yystate]; |
2025 |
- if (!yypact_value_is_default (yyn)) |
2026 |
- { |
2027 |
- yyn += YYTERROR; |
2028 |
- if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) |
2029 |
- { |
2030 |
- yyn = yytable[yyn]; |
2031 |
- if (0 < yyn) |
2032 |
- break; |
2033 |
- } |
2034 |
- } |
2035 |
- |
2036 |
- /* Pop the current state because it cannot handle the error token. */ |
2037 |
- if (yyssp == yyss) |
2038 |
- YYABORT; |
2039 |
- |
2040 |
- yyerror_range[1] = *yylsp; |
2041 |
- yydestruct ("Error: popping", |
2042 |
- yystos[yystate], yyvsp, yylsp, mc, oxml, result, error_msg, scanner); |
2043 |
- YYPOPSTACK (1); |
2044 |
- yystate = *yyssp; |
2045 |
- YY_STACK_PRINT (yyss, yyssp); |
2046 |
- } |
2047 |
- |
2048 |
- YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
2049 |
- *++yyvsp = yylval; |
2050 |
- YY_IGNORE_MAYBE_UNINITIALIZED_END |
2051 |
- |
2052 |
- yyerror_range[2] = yylloc; |
2053 |
- /* Using YYLLOC is tempting, but would change the location of |
2054 |
- the lookahead. YYLOC is available though. */ |
2055 |
- YYLLOC_DEFAULT (yyloc, yyerror_range, 2); |
2056 |
- *++yylsp = yyloc; |
2057 |
- |
2058 |
- /* Shift the error token. */ |
2059 |
- YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); |
2060 |
- |
2061 |
- yystate = yyn; |
2062 |
- goto yynewstate; |
2063 |
- |
2064 |
- |
2065 |
-/*-------------------------------------. |
2066 |
-| yyacceptlab -- YYACCEPT comes here. | |
2067 |
-`-------------------------------------*/ |
2068 |
-yyacceptlab: |
2069 |
- yyresult = 0; |
2070 |
- goto yyreturn; |
2071 |
- |
2072 |
- |
2073 |
-/*-----------------------------------. |
2074 |
-| yyabortlab -- YYABORT comes here. | |
2075 |
-`-----------------------------------*/ |
2076 |
-yyabortlab: |
2077 |
- yyresult = 1; |
2078 |
- goto yyreturn; |
2079 |
- |
2080 |
- |
2081 |
-#if !defined yyoverflow || YYERROR_VERBOSE |
2082 |
-/*-------------------------------------------------. |
2083 |
-| yyexhaustedlab -- memory exhaustion comes here. | |
2084 |
-`-------------------------------------------------*/ |
2085 |
-yyexhaustedlab: |
2086 |
- yyerror (&yylloc, mc, oxml, result, error_msg, scanner, YY_("memory exhausted")); |
2087 |
- yyresult = 2; |
2088 |
- /* Fall through. */ |
2089 |
-#endif |
2090 |
- |
2091 |
- |
2092 |
-/*-----------------------------------------------------. |
2093 |
-| yyreturn -- parsing is finished, return the result. | |
2094 |
-`-----------------------------------------------------*/ |
2095 |
-yyreturn: |
2096 |
- if (yychar != YYEMPTY) |
2097 |
- { |
2098 |
- /* Make sure we have latest lookahead translation. See comments at |
2099 |
- user semantic actions for why this is necessary. */ |
2100 |
- yytoken = YYTRANSLATE (yychar); |
2101 |
- yydestruct ("Cleanup: discarding lookahead", |
2102 |
- yytoken, &yylval, &yylloc, mc, oxml, result, error_msg, scanner); |
2103 |
- } |
2104 |
- /* Do not reclaim the symbols of the rule whose action triggered |
2105 |
- this YYABORT or YYACCEPT. */ |
2106 |
- YYPOPSTACK (yylen); |
2107 |
- YY_STACK_PRINT (yyss, yyssp); |
2108 |
- while (yyssp != yyss) |
2109 |
- { |
2110 |
- yydestruct ("Cleanup: popping", |
2111 |
- yystos[*yyssp], yyvsp, yylsp, mc, oxml, result, error_msg, scanner); |
2112 |
- YYPOPSTACK (1); |
2113 |
- } |
2114 |
-#ifndef yyoverflow |
2115 |
- if (yyss != yyssa) |
2116 |
- YYSTACK_FREE (yyss); |
2117 |
-#endif |
2118 |
-#if YYERROR_VERBOSE |
2119 |
- if (yymsg != yymsgbuf) |
2120 |
- YYSTACK_FREE (yymsg); |
2121 |
-#endif |
2122 |
- return yyresult; |
2123 |
-} |
2124 |
-#line 114 "expr_arith.y" |
2125 |
- |
2126 |
- |
2127 |
-void expr_arith_error( |
2128 |
- YYLTYPE * llocp, |
2129 |
- mem_collector * mc, |
2130 |
- ObjectXML * oxml, |
2131 |
- int& result, |
2132 |
- char ** error_msg, |
2133 |
- yyscan_t scanner, |
2134 |
- const char * str) |
2135 |
-{ |
2136 |
- int length; |
2137 |
- |
2138 |
- length = strlen(str)+ 64; |
2139 |
- |
2140 |
- *error_msg = (char *) malloc(sizeof(char)*length); |
2141 |
- |
2142 |
- if (*error_msg != 0) |
2143 |
- { |
2144 |
- snprintf(*error_msg, |
2145 |
- length, |
2146 |
- "%s at line %i, columns %i:%i", |
2147 |
- str, |
2148 |
- llocp->first_line, |
2149 |
- llocp->first_column, |
2150 |
- llocp->last_column); |
2151 |
- } |
2152 |
-} |
2153 |
|
2154 |
diff --git a/app-emulation/opennebula/files/opennebula-5.10.1/parsers/expr_arith.h b/app-emulation/opennebula/files/opennebula-5.10.1/parsers/expr_arith.h |
2155 |
deleted file mode 100644 |
2156 |
index d8fb402..0000000 |
2157 |
--- a/app-emulation/opennebula/files/opennebula-5.10.1/parsers/expr_arith.h |
2158 |
+++ /dev/null |
2159 |
@@ -1,117 +0,0 @@ |
2160 |
-/* A Bison parser, made by GNU Bison 3.4.1. */ |
2161 |
- |
2162 |
-/* Bison interface for Yacc-like parsers in C |
2163 |
- |
2164 |
- Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2019 Free Software Foundation, |
2165 |
- Inc. |
2166 |
- |
2167 |
- This program is free software: you can redistribute it and/or modify |
2168 |
- it under the terms of the GNU General Public License as published by |
2169 |
- the Free Software Foundation, either version 3 of the License, or |
2170 |
- (at your option) any later version. |
2171 |
- |
2172 |
- This program is distributed in the hope that it will be useful, |
2173 |
- but WITHOUT ANY WARRANTY; without even the implied warranty of |
2174 |
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2175 |
- GNU General Public License for more details. |
2176 |
- |
2177 |
- You should have received a copy of the GNU General Public License |
2178 |
- along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
2179 |
- |
2180 |
-/* As a special exception, you may create a larger work that contains |
2181 |
- part or all of the Bison parser skeleton and distribute that work |
2182 |
- under terms of your choice, so long as that work isn't itself a |
2183 |
- parser generator using the skeleton or a modified version thereof |
2184 |
- as a parser skeleton. Alternatively, if you modify or redistribute |
2185 |
- the parser skeleton itself, you may (at your option) remove this |
2186 |
- special exception, which will cause the skeleton and the resulting |
2187 |
- Bison output files to be licensed under the GNU General Public |
2188 |
- License without this special exception. |
2189 |
- |
2190 |
- This special exception was added by the Free Software Foundation in |
2191 |
- version 2.2 of Bison. */ |
2192 |
- |
2193 |
-/* Undocumented macros, especially those whose name start with YY_, |
2194 |
- are private implementation details. Do not rely on them. */ |
2195 |
- |
2196 |
-#ifndef YY_EXPR_ARITH_EXPR_ARITH_HH_INCLUDED |
2197 |
-# define YY_EXPR_ARITH_EXPR_ARITH_HH_INCLUDED |
2198 |
-/* Debug traces. */ |
2199 |
-#ifndef YYDEBUG |
2200 |
-# define YYDEBUG 0 |
2201 |
-#endif |
2202 |
-#if YYDEBUG |
2203 |
-extern int expr_arith_debug; |
2204 |
-#endif |
2205 |
-/* "%code requires" blocks. */ |
2206 |
-#line 47 "expr_arith.y" |
2207 |
- |
2208 |
-#include <iostream> |
2209 |
-#include <sstream> |
2210 |
-#include <string> |
2211 |
-#include <vector> |
2212 |
-#include <algorithm> |
2213 |
-#include <set> |
2214 |
- |
2215 |
-#include <ctype.h> |
2216 |
-#include <string.h> |
2217 |
-#include <fnmatch.h> |
2218 |
- |
2219 |
-#include "mem_collector.h" |
2220 |
-#include "ObjectXML.h" |
2221 |
- |
2222 |
-typedef void * yyscan_t; |
2223 |
- |
2224 |
-int expr_arith_parse(ObjectXML *oxml, int& result, char ** errmsg, |
2225 |
- yyscan_t scanner); |
2226 |
- |
2227 |
-#line 69 "expr_arith.hh" |
2228 |
- |
2229 |
-/* Token type. */ |
2230 |
-#ifndef YYTOKENTYPE |
2231 |
-# define YYTOKENTYPE |
2232 |
- enum yytokentype |
2233 |
- { |
2234 |
- INTEGER = 258, |
2235 |
- STRING = 259, |
2236 |
- FLOAT = 260 |
2237 |
- }; |
2238 |
-#endif |
2239 |
- |
2240 |
-/* Value type. */ |
2241 |
-#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED |
2242 |
-union YYSTYPE |
2243 |
-{ |
2244 |
-#line 77 "expr_arith.y" |
2245 |
- |
2246 |
- char * val_str; |
2247 |
- int val_int; |
2248 |
- float val_float; |
2249 |
- |
2250 |
-#line 92 "expr_arith.hh" |
2251 |
- |
2252 |
-}; |
2253 |
-typedef union YYSTYPE YYSTYPE; |
2254 |
-# define YYSTYPE_IS_TRIVIAL 1 |
2255 |
-# define YYSTYPE_IS_DECLARED 1 |
2256 |
-#endif |
2257 |
- |
2258 |
-/* Location type. */ |
2259 |
-#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED |
2260 |
-typedef struct YYLTYPE YYLTYPE; |
2261 |
-struct YYLTYPE |
2262 |
-{ |
2263 |
- int first_line; |
2264 |
- int first_column; |
2265 |
- int last_line; |
2266 |
- int last_column; |
2267 |
-}; |
2268 |
-# define YYLTYPE_IS_DECLARED 1 |
2269 |
-# define YYLTYPE_IS_TRIVIAL 1 |
2270 |
-#endif |
2271 |
- |
2272 |
- |
2273 |
- |
2274 |
-int expr_arith_parse (mem_collector * mc, ObjectXML * oxml, int& result, char ** error_msg, yyscan_t scanner); |
2275 |
- |
2276 |
-#endif /* !YY_EXPR_ARITH_EXPR_ARITH_HH_INCLUDED */ |
2277 |
|
2278 |
diff --git a/app-emulation/opennebula/files/opennebula-5.10.1/parsers/expr_arith.y b/app-emulation/opennebula/files/opennebula-5.10.1/parsers/expr_arith.y |
2279 |
deleted file mode 100644 |
2280 |
index 9540c92..0000000 |
2281 |
--- a/app-emulation/opennebula/files/opennebula-5.10.1/parsers/expr_arith.y |
2282 |
+++ /dev/null |
2283 |
@@ -1,141 +0,0 @@ |
2284 |
-/* -------------------------------------------------------------------------- */ |
2285 |
-/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */ |
2286 |
-/* */ |
2287 |
-/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ |
2288 |
-/* not use this file except in compliance with the License. You may obtain */ |
2289 |
-/* a copy of the License at */ |
2290 |
-/* */ |
2291 |
-/* http://www.apache.org/licenses/LICENSE-2.0 */ |
2292 |
-/* */ |
2293 |
-/* Unless required by applicable law or agreed to in writing, software */ |
2294 |
-/* distributed under the License is distributed on an "AS IS" BASIS, */ |
2295 |
-/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ |
2296 |
-/* See the License for the specific language governing permissions and */ |
2297 |
-/* limitations under the License. */ |
2298 |
-/* -------------------------------------------------------------------------- */ |
2299 |
- |
2300 |
-%{ |
2301 |
-#include "expr_arith.h" |
2302 |
-#include "expr_parser.h" |
2303 |
- |
2304 |
-#define YYERROR_VERBOSE |
2305 |
-#define expr_arith_lex expr_lex |
2306 |
- |
2307 |
- |
2308 |
-void expr_arith_error(YYLTYPE * llocp, mem_collector * mc, ObjectXML * oxml, |
2309 |
- int& result, char ** error_msg, yyscan_t scanner, const char * str); |
2310 |
- |
2311 |
-int expr_arith_lex(YYSTYPE *lvalp, YYLTYPE *llocp, mem_collector * mc, |
2312 |
- yyscan_t scanner); |
2313 |
- |
2314 |
-int expr_arith_parse(ObjectXML *oxml, int& result, char ** errmsg, |
2315 |
- yyscan_t scanner) |
2316 |
-{ |
2317 |
- mem_collector mc; |
2318 |
- int rc; |
2319 |
- |
2320 |
- mem_collector_init(&mc); |
2321 |
- |
2322 |
- rc = expr_arith_parse(&mc, oxml, result, errmsg, scanner); |
2323 |
- |
2324 |
- mem_collector_cleanup(&mc); |
2325 |
- |
2326 |
- return rc; |
2327 |
-} |
2328 |
-%} |
2329 |
- |
2330 |
-%code requires { |
2331 |
-#include <iostream> |
2332 |
-#include <sstream> |
2333 |
-#include <string> |
2334 |
-#include <vector> |
2335 |
-#include <algorithm> |
2336 |
-#include <set> |
2337 |
- |
2338 |
-#include <ctype.h> |
2339 |
-#include <string.h> |
2340 |
-#include <fnmatch.h> |
2341 |
- |
2342 |
-#include "mem_collector.h" |
2343 |
-#include "ObjectXML.h" |
2344 |
- |
2345 |
-typedef void * yyscan_t; |
2346 |
- |
2347 |
-int expr_arith_parse(ObjectXML *oxml, int& result, char ** errmsg, |
2348 |
- yyscan_t scanner); |
2349 |
-} |
2350 |
- |
2351 |
-%parse-param {mem_collector * mc} |
2352 |
-%parse-param {ObjectXML * oxml} |
2353 |
-%parse-param {int& result} |
2354 |
-%parse-param {char ** error_msg} |
2355 |
-%parse-param {yyscan_t scanner} |
2356 |
- |
2357 |
-%lex-param {mem_collector * mc} |
2358 |
-%lex-param {yyscan_t scanner} |
2359 |
- |
2360 |
-%union { |
2361 |
- char * val_str; |
2362 |
- int val_int; |
2363 |
- float val_float; |
2364 |
-}; |
2365 |
- |
2366 |
-%defines |
2367 |
-%locations |
2368 |
-%pure-parser |
2369 |
-%name-prefix "expr_arith_" |
2370 |
-%output "expr_arith.cc" |
2371 |
- |
2372 |
-%left '+' '-' |
2373 |
-%left '*' '/' |
2374 |
-%token <val_int> INTEGER |
2375 |
-%token <val_str> STRING |
2376 |
-%token <val_float> FLOAT |
2377 |
-%type <val_int> stmt |
2378 |
-%type <val_float> expr |
2379 |
- |
2380 |
-%% |
2381 |
- |
2382 |
-stmt: expr { result = static_cast<int>($1);} |
2383 |
- | { result = 0; } |
2384 |
- ; |
2385 |
- |
2386 |
-expr: STRING { float val; oxml->search($1, val); $$ = val; } |
2387 |
- | FLOAT { $$ = $1; } |
2388 |
- | INTEGER { $$ = static_cast<float>($1); } |
2389 |
- | expr '+' expr { $$ = $1 + $3;} |
2390 |
- | expr '-' expr { $$ = $1 - $3;} |
2391 |
- | expr '*' expr { $$ = $1 * $3;} |
2392 |
- | expr '/' expr { $$ = $1 / $3;} |
2393 |
- | '-' expr { $$ = - $2;} |
2394 |
- | '(' expr ')' { $$ = $2;} |
2395 |
- ; |
2396 |
- |
2397 |
-%% |
2398 |
- |
2399 |
-void expr_arith_error( |
2400 |
- YYLTYPE * llocp, |
2401 |
- mem_collector * mc, |
2402 |
- ObjectXML * oxml, |
2403 |
- int& result, |
2404 |
- char ** error_msg, |
2405 |
- yyscan_t scanner, |
2406 |
- const char * str) |
2407 |
-{ |
2408 |
- int length; |
2409 |
- |
2410 |
- length = strlen(str)+ 64; |
2411 |
- |
2412 |
- *error_msg = (char *) malloc(sizeof(char)*length); |
2413 |
- |
2414 |
- if (*error_msg != 0) |
2415 |
- { |
2416 |
- snprintf(*error_msg, |
2417 |
- length, |
2418 |
- "%s at line %i, columns %i:%i", |
2419 |
- str, |
2420 |
- llocp->first_line, |
2421 |
- llocp->first_column, |
2422 |
- llocp->last_column); |
2423 |
- } |
2424 |
-} |
2425 |
|
2426 |
diff --git a/app-emulation/opennebula/files/opennebula-5.10.1/parsers/expr_bool.cc b/app-emulation/opennebula/files/opennebula-5.10.1/parsers/expr_bool.cc |
2427 |
deleted file mode 100644 |
2428 |
index 024999a..0000000 |
2429 |
--- a/app-emulation/opennebula/files/opennebula-5.10.1/parsers/expr_bool.cc |
2430 |
+++ /dev/null |
2431 |
@@ -1,1902 +0,0 @@ |
2432 |
-/* A Bison parser, made by GNU Bison 3.4.1. */ |
2433 |
- |
2434 |
-/* Bison implementation for Yacc-like parsers in C |
2435 |
- |
2436 |
- Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2019 Free Software Foundation, |
2437 |
- Inc. |
2438 |
- |
2439 |
- This program is free software: you can redistribute it and/or modify |
2440 |
- it under the terms of the GNU General Public License as published by |
2441 |
- the Free Software Foundation, either version 3 of the License, or |
2442 |
- (at your option) any later version. |
2443 |
- |
2444 |
- This program is distributed in the hope that it will be useful, |
2445 |
- but WITHOUT ANY WARRANTY; without even the implied warranty of |
2446 |
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2447 |
- GNU General Public License for more details. |
2448 |
- |
2449 |
- You should have received a copy of the GNU General Public License |
2450 |
- along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
2451 |
- |
2452 |
-/* As a special exception, you may create a larger work that contains |
2453 |
- part or all of the Bison parser skeleton and distribute that work |
2454 |
- under terms of your choice, so long as that work isn't itself a |
2455 |
- parser generator using the skeleton or a modified version thereof |
2456 |
- as a parser skeleton. Alternatively, if you modify or redistribute |
2457 |
- the parser skeleton itself, you may (at your option) remove this |
2458 |
- special exception, which will cause the skeleton and the resulting |
2459 |
- Bison output files to be licensed under the GNU General Public |
2460 |
- License without this special exception. |
2461 |
- |
2462 |
- This special exception was added by the Free Software Foundation in |
2463 |
- version 2.2 of Bison. */ |
2464 |
- |
2465 |
-/* C LALR(1) parser skeleton written by Richard Stallman, by |
2466 |
- simplifying the original so-called "semantic" parser. */ |
2467 |
- |
2468 |
-/* All symbols defined below should begin with yy or YY, to avoid |
2469 |
- infringing on user name space. This should be done even for local |
2470 |
- variables, as they might otherwise be expanded by user macros. |
2471 |
- There are some unavoidable exceptions within include files to |
2472 |
- define necessary library symbols; they are noted "INFRINGES ON |
2473 |
- USER NAME SPACE" below. */ |
2474 |
- |
2475 |
-/* Undocumented macros, especially those whose name start with YY_, |
2476 |
- are private implementation details. Do not rely on them. */ |
2477 |
- |
2478 |
-/* Identify Bison output. */ |
2479 |
-#define YYBISON 1 |
2480 |
- |
2481 |
-/* Bison version. */ |
2482 |
-#define YYBISON_VERSION "3.4.1" |
2483 |
- |
2484 |
-/* Skeleton name. */ |
2485 |
-#define YYSKELETON_NAME "yacc.c" |
2486 |
- |
2487 |
-/* Pure parsers. */ |
2488 |
-#define YYPURE 1 |
2489 |
- |
2490 |
-/* Push parsers. */ |
2491 |
-#define YYPUSH 0 |
2492 |
- |
2493 |
-/* Pull parsers. */ |
2494 |
-#define YYPULL 1 |
2495 |
- |
2496 |
- |
2497 |
-/* Substitute the variable and function names. */ |
2498 |
-#define yyparse expr_bool_parse |
2499 |
-#define yylex expr_bool_lex |
2500 |
-#define yyerror expr_bool_error |
2501 |
-#define yydebug expr_bool_debug |
2502 |
-#define yynerrs expr_bool_nerrs |
2503 |
- |
2504 |
- |
2505 |
-/* First part of user prologue. */ |
2506 |
-#line 18 "expr_bool.y" |
2507 |
- |
2508 |
-#include "expr_bool.h" |
2509 |
-#include "expr_parser.h" |
2510 |
- |
2511 |
-#define YYERROR_VERBOSE |
2512 |
-#define expr_bool_lex expr_lex |
2513 |
- |
2514 |
-void expr_bool_error(YYLTYPE * llocp, mem_collector * mc, ObjectXML * oxml, |
2515 |
- bool& result, char ** error_msg, yyscan_t scanner, const char * str); |
2516 |
- |
2517 |
-int expr_bool_lex (YYSTYPE *lvalp, YYLTYPE *llocp, mem_collector * mc, |
2518 |
- yyscan_t scanner); |
2519 |
- |
2520 |
-int expr_bool_parse(ObjectXML *oxml, bool& result, char ** errmsg, |
2521 |
- yyscan_t scanner) |
2522 |
-{ |
2523 |
- mem_collector mc; |
2524 |
- int rc; |
2525 |
- |
2526 |
- mem_collector_init(&mc); |
2527 |
- |
2528 |
- rc = expr_bool_parse(&mc, oxml, result, errmsg, scanner); |
2529 |
- |
2530 |
- mem_collector_cleanup(&mc); |
2531 |
- |
2532 |
- return rc; |
2533 |
-} |
2534 |
- |
2535 |
- |
2536 |
-#line 106 "expr_bool.cc" |
2537 |
- |
2538 |
-# ifndef YY_NULLPTR |
2539 |
-# if defined __cplusplus |
2540 |
-# if 201103L <= __cplusplus |
2541 |
-# define YY_NULLPTR nullptr |
2542 |
-# else |
2543 |
-# define YY_NULLPTR 0 |
2544 |
-# endif |
2545 |
-# else |
2546 |
-# define YY_NULLPTR ((void*)0) |
2547 |
-# endif |
2548 |
-# endif |
2549 |
- |
2550 |
-/* Enabling verbose error messages. */ |
2551 |
-#ifdef YYERROR_VERBOSE |
2552 |
-# undef YYERROR_VERBOSE |
2553 |
-# define YYERROR_VERBOSE 1 |
2554 |
-#else |
2555 |
-# define YYERROR_VERBOSE 0 |
2556 |
-#endif |
2557 |
- |
2558 |
-/* Use api.header.include to #include this header |
2559 |
- instead of duplicating it here. */ |
2560 |
-#ifndef YY_EXPR_BOOL_EXPR_BOOL_HH_INCLUDED |
2561 |
-# define YY_EXPR_BOOL_EXPR_BOOL_HH_INCLUDED |
2562 |
-/* Debug traces. */ |
2563 |
-#ifndef YYDEBUG |
2564 |
-# define YYDEBUG 0 |
2565 |
-#endif |
2566 |
-#if YYDEBUG |
2567 |
-extern int expr_bool_debug; |
2568 |
-#endif |
2569 |
-/* "%code requires" blocks. */ |
2570 |
-#line 48 "expr_bool.y" |
2571 |
- |
2572 |
-#include <iostream> |
2573 |
-#include <sstream> |
2574 |
-#include <string> |
2575 |
-#include <vector> |
2576 |
-#include <algorithm> |
2577 |
-#include <set> |
2578 |
- |
2579 |
-#include <ctype.h> |
2580 |
-#include <string.h> |
2581 |
-#include <fnmatch.h> |
2582 |
- |
2583 |
-#include "mem_collector.h" |
2584 |
- |
2585 |
-#include "ObjectXML.h" |
2586 |
- |
2587 |
-typedef void * yyscan_t; |
2588 |
- |
2589 |
-int expr_bool_parse(ObjectXML *oxml, bool& result, char ** errmsg, |
2590 |
- yyscan_t scanner); |
2591 |
- |
2592 |
-#line 162 "expr_bool.cc" |
2593 |
- |
2594 |
-/* Token type. */ |
2595 |
-#ifndef YYTOKENTYPE |
2596 |
-# define YYTOKENTYPE |
2597 |
- enum yytokentype |
2598 |
- { |
2599 |
- INTEGER = 258, |
2600 |
- STRING = 259, |
2601 |
- FLOAT = 260 |
2602 |
- }; |
2603 |
-#endif |
2604 |
- |
2605 |
-/* Value type. */ |
2606 |
-#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED |
2607 |
-union YYSTYPE |
2608 |
-{ |
2609 |
-#line 79 "expr_bool.y" |
2610 |
- |
2611 |
- char * val_str; |
2612 |
- int val_int; |
2613 |
- float val_float; |
2614 |
- |
2615 |
-#line 185 "expr_bool.cc" |
2616 |
- |
2617 |
-}; |
2618 |
-typedef union YYSTYPE YYSTYPE; |
2619 |
-# define YYSTYPE_IS_TRIVIAL 1 |
2620 |
-# define YYSTYPE_IS_DECLARED 1 |
2621 |
-#endif |
2622 |
- |
2623 |
-/* Location type. */ |
2624 |
-#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED |
2625 |
-typedef struct YYLTYPE YYLTYPE; |
2626 |
-struct YYLTYPE |
2627 |
-{ |
2628 |
- int first_line; |
2629 |
- int first_column; |
2630 |
- int last_line; |
2631 |
- int last_column; |
2632 |
-}; |
2633 |
-# define YYLTYPE_IS_DECLARED 1 |
2634 |
-# define YYLTYPE_IS_TRIVIAL 1 |
2635 |
-#endif |
2636 |
- |
2637 |
- |
2638 |
- |
2639 |
-int expr_bool_parse (mem_collector * mc, ObjectXML * oxml, bool& result, char ** error_msg, yyscan_t scanner); |
2640 |
- |
2641 |
-#endif /* !YY_EXPR_BOOL_EXPR_BOOL_HH_INCLUDED */ |
2642 |
- |
2643 |
- |
2644 |
- |
2645 |
-#ifdef short |
2646 |
-# undef short |
2647 |
-#endif |
2648 |
- |
2649 |
-#ifdef YYTYPE_UINT8 |
2650 |
-typedef YYTYPE_UINT8 yytype_uint8; |
2651 |
-#else |
2652 |
-typedef unsigned char yytype_uint8; |
2653 |
-#endif |
2654 |
- |
2655 |
-#ifdef YYTYPE_INT8 |
2656 |
-typedef YYTYPE_INT8 yytype_int8; |
2657 |
-#else |
2658 |
-typedef signed char yytype_int8; |
2659 |
-#endif |
2660 |
- |
2661 |
-#ifdef YYTYPE_UINT16 |
2662 |
-typedef YYTYPE_UINT16 yytype_uint16; |
2663 |
-#else |
2664 |
-typedef unsigned short yytype_uint16; |
2665 |
-#endif |
2666 |
- |
2667 |
-#ifdef YYTYPE_INT16 |
2668 |
-typedef YYTYPE_INT16 yytype_int16; |
2669 |
-#else |
2670 |
-typedef short yytype_int16; |
2671 |
-#endif |
2672 |
- |
2673 |
-#ifndef YYSIZE_T |
2674 |
-# ifdef __SIZE_TYPE__ |
2675 |
-# define YYSIZE_T __SIZE_TYPE__ |
2676 |
-# elif defined size_t |
2677 |
-# define YYSIZE_T size_t |
2678 |
-# elif ! defined YYSIZE_T |
2679 |
-# include <stddef.h> /* INFRINGES ON USER NAME SPACE */ |
2680 |
-# define YYSIZE_T size_t |
2681 |
-# else |
2682 |
-# define YYSIZE_T unsigned |
2683 |
-# endif |
2684 |
-#endif |
2685 |
- |
2686 |
-#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) |
2687 |
- |
2688 |
-#ifndef YY_ |
2689 |
-# if defined YYENABLE_NLS && YYENABLE_NLS |
2690 |
-# if ENABLE_NLS |
2691 |
-# include <libintl.h> /* INFRINGES ON USER NAME SPACE */ |
2692 |
-# define YY_(Msgid) dgettext ("bison-runtime", Msgid) |
2693 |
-# endif |
2694 |
-# endif |
2695 |
-# ifndef YY_ |
2696 |
-# define YY_(Msgid) Msgid |
2697 |
-# endif |
2698 |
-#endif |
2699 |
- |
2700 |
-#ifndef YY_ATTRIBUTE |
2701 |
-# if (defined __GNUC__ \ |
2702 |
- && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \ |
2703 |
- || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C |
2704 |
-# define YY_ATTRIBUTE(Spec) __attribute__(Spec) |
2705 |
-# else |
2706 |
-# define YY_ATTRIBUTE(Spec) /* empty */ |
2707 |
-# endif |
2708 |
-#endif |
2709 |
- |
2710 |
-#ifndef YY_ATTRIBUTE_PURE |
2711 |
-# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__)) |
2712 |
-#endif |
2713 |
- |
2714 |
-#ifndef YY_ATTRIBUTE_UNUSED |
2715 |
-# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) |
2716 |
-#endif |
2717 |
- |
2718 |
-/* Suppress unused-variable warnings by "using" E. */ |
2719 |
-#if ! defined lint || defined __GNUC__ |
2720 |
-# define YYUSE(E) ((void) (E)) |
2721 |
-#else |
2722 |
-# define YYUSE(E) /* empty */ |
2723 |
-#endif |
2724 |
- |
2725 |
-#if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ |
2726 |
-/* Suppress an incorrect diagnostic about yylval being uninitialized. */ |
2727 |
-# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ |
2728 |
- _Pragma ("GCC diagnostic push") \ |
2729 |
- _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ |
2730 |
- _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") |
2731 |
-# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ |
2732 |
- _Pragma ("GCC diagnostic pop") |
2733 |
-#else |
2734 |
-# define YY_INITIAL_VALUE(Value) Value |
2735 |
-#endif |
2736 |
-#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
2737 |
-# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
2738 |
-# define YY_IGNORE_MAYBE_UNINITIALIZED_END |
2739 |
-#endif |
2740 |
-#ifndef YY_INITIAL_VALUE |
2741 |
-# define YY_INITIAL_VALUE(Value) /* Nothing. */ |
2742 |
-#endif |
2743 |
- |
2744 |
- |
2745 |
-#define YY_ASSERT(E) ((void) (0 && (E))) |
2746 |
- |
2747 |
-#if ! defined yyoverflow || YYERROR_VERBOSE |
2748 |
- |
2749 |
-/* The parser invokes alloca or malloc; define the necessary symbols. */ |
2750 |
- |
2751 |
-# ifdef YYSTACK_USE_ALLOCA |
2752 |
-# if YYSTACK_USE_ALLOCA |
2753 |
-# ifdef __GNUC__ |
2754 |
-# define YYSTACK_ALLOC __builtin_alloca |
2755 |
-# elif defined __BUILTIN_VA_ARG_INCR |
2756 |
-# include <alloca.h> /* INFRINGES ON USER NAME SPACE */ |
2757 |
-# elif defined _AIX |
2758 |
-# define YYSTACK_ALLOC __alloca |
2759 |
-# elif defined _MSC_VER |
2760 |
-# include <malloc.h> /* INFRINGES ON USER NAME SPACE */ |
2761 |
-# define alloca _alloca |
2762 |
-# else |
2763 |
-# define YYSTACK_ALLOC alloca |
2764 |
-# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS |
2765 |
-# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ |
2766 |
- /* Use EXIT_SUCCESS as a witness for stdlib.h. */ |
2767 |
-# ifndef EXIT_SUCCESS |
2768 |
-# define EXIT_SUCCESS 0 |
2769 |
-# endif |
2770 |
-# endif |
2771 |
-# endif |
2772 |
-# endif |
2773 |
-# endif |
2774 |
- |
2775 |
-# ifdef YYSTACK_ALLOC |
2776 |
- /* Pacify GCC's 'empty if-body' warning. */ |
2777 |
-# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) |
2778 |
-# ifndef YYSTACK_ALLOC_MAXIMUM |
2779 |
- /* The OS might guarantee only one guard page at the bottom of the stack, |
2780 |
- and a page size can be as small as 4096 bytes. So we cannot safely |
2781 |
- invoke alloca (N) if N exceeds 4096. Use a slightly smaller number |
2782 |
- to allow for a few compiler-allocated temporary stack slots. */ |
2783 |
-# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ |
2784 |
-# endif |
2785 |
-# else |
2786 |
-# define YYSTACK_ALLOC YYMALLOC |
2787 |
-# define YYSTACK_FREE YYFREE |
2788 |
-# ifndef YYSTACK_ALLOC_MAXIMUM |
2789 |
-# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM |
2790 |
-# endif |
2791 |
-# if (defined __cplusplus && ! defined EXIT_SUCCESS \ |
2792 |
- && ! ((defined YYMALLOC || defined malloc) \ |
2793 |
- && (defined YYFREE || defined free))) |
2794 |
-# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ |
2795 |
-# ifndef EXIT_SUCCESS |
2796 |
-# define EXIT_SUCCESS 0 |
2797 |
-# endif |
2798 |
-# endif |
2799 |
-# ifndef YYMALLOC |
2800 |
-# define YYMALLOC malloc |
2801 |
-# if ! defined malloc && ! defined EXIT_SUCCESS |
2802 |
-void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ |
2803 |
-# endif |
2804 |
-# endif |
2805 |
-# ifndef YYFREE |
2806 |
-# define YYFREE free |
2807 |
-# if ! defined free && ! defined EXIT_SUCCESS |
2808 |
-void free (void *); /* INFRINGES ON USER NAME SPACE */ |
2809 |
-# endif |
2810 |
-# endif |
2811 |
-# endif |
2812 |
-#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ |
2813 |
- |
2814 |
- |
2815 |
-#if (! defined yyoverflow \ |
2816 |
- && (! defined __cplusplus \ |
2817 |
- || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \ |
2818 |
- && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) |
2819 |
- |
2820 |
-/* A type that is properly aligned for any stack member. */ |
2821 |
-union yyalloc |
2822 |
-{ |
2823 |
- yytype_int16 yyss_alloc; |
2824 |
- YYSTYPE yyvs_alloc; |
2825 |
- YYLTYPE yyls_alloc; |
2826 |
-}; |
2827 |
- |
2828 |
-/* The size of the maximum gap between one aligned stack and the next. */ |
2829 |
-# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) |
2830 |
- |
2831 |
-/* The size of an array large to enough to hold all stacks, each with |
2832 |
- N elements. */ |
2833 |
-# define YYSTACK_BYTES(N) \ |
2834 |
- ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \ |
2835 |
- + 2 * YYSTACK_GAP_MAXIMUM) |
2836 |
- |
2837 |
-# define YYCOPY_NEEDED 1 |
2838 |
- |
2839 |
-/* Relocate STACK from its old location to the new one. The |
2840 |
- local variables YYSIZE and YYSTACKSIZE give the old and new number of |
2841 |
- elements in the stack, and YYPTR gives the new location of the |
2842 |
- stack. Advance YYPTR to a properly aligned location for the next |
2843 |
- stack. */ |
2844 |
-# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ |
2845 |
- do \ |
2846 |
- { \ |
2847 |
- YYSIZE_T yynewbytes; \ |
2848 |
- YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ |
2849 |
- Stack = &yyptr->Stack_alloc; \ |
2850 |
- yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ |
2851 |
- yyptr += yynewbytes / sizeof (*yyptr); \ |
2852 |
- } \ |
2853 |
- while (0) |
2854 |
- |
2855 |
-#endif |
2856 |
- |
2857 |
-#if defined YYCOPY_NEEDED && YYCOPY_NEEDED |
2858 |
-/* Copy COUNT objects from SRC to DST. The source and destination do |
2859 |
- not overlap. */ |
2860 |
-# ifndef YYCOPY |
2861 |
-# if defined __GNUC__ && 1 < __GNUC__ |
2862 |
-# define YYCOPY(Dst, Src, Count) \ |
2863 |
- __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) |
2864 |
-# else |
2865 |
-# define YYCOPY(Dst, Src, Count) \ |
2866 |
- do \ |
2867 |
- { \ |
2868 |
- YYSIZE_T yyi; \ |
2869 |
- for (yyi = 0; yyi < (Count); yyi++) \ |
2870 |
- (Dst)[yyi] = (Src)[yyi]; \ |
2871 |
- } \ |
2872 |
- while (0) |
2873 |
-# endif |
2874 |
-# endif |
2875 |
-#endif /* !YYCOPY_NEEDED */ |
2876 |
- |
2877 |
-/* YYFINAL -- State number of the termination state. */ |
2878 |
-#define YYFINAL 13 |
2879 |
-/* YYLAST -- Last index in YYTABLE. */ |
2880 |
-#define YYLAST 34 |
2881 |
- |
2882 |
-/* YYNTOKENS -- Number of terminals. */ |
2883 |
-#define YYNTOKENS 15 |
2884 |
-/* YYNNTS -- Number of nonterminals. */ |
2885 |
-#define YYNNTS 3 |
2886 |
-/* YYNRULES -- Number of rules. */ |
2887 |
-#define YYNRULES 20 |
2888 |
-/* YYNSTATES -- Number of states. */ |
2889 |
-#define YYNSTATES 34 |
2890 |
- |
2891 |
-#define YYUNDEFTOK 2 |
2892 |
-#define YYMAXUTOK 260 |
2893 |
- |
2894 |
-/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM |
2895 |
- as returned by yylex, with out-of-bounds checking. */ |
2896 |
-#define YYTRANSLATE(YYX) \ |
2897 |
- ((unsigned) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) |
2898 |
- |
2899 |
-/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM |
2900 |
- as returned by yylex. */ |
2901 |
-static const yytype_uint8 yytranslate[] = |
2902 |
-{ |
2903 |
- 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
2904 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
2905 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
2906 |
- 2, 2, 2, 3, 2, 2, 2, 2, 4, 2, |
2907 |
- 13, 14, 2, 2, 2, 2, 2, 2, 2, 2, |
2908 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
2909 |
- 11, 9, 10, 2, 12, 2, 2, 2, 2, 2, |
2910 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
2911 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
2912 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
2913 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
2914 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
2915 |
- 2, 2, 2, 2, 5, 2, 2, 2, 2, 2, |
2916 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
2917 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
2918 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
2919 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
2920 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
2921 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
2922 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
2923 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
2924 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
2925 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
2926 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
2927 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
2928 |
- 2, 2, 2, 2, 2, 2, 1, 2, 6, 7, |
2929 |
- 8 |
2930 |
-}; |
2931 |
- |
2932 |
-#if YYDEBUG |
2933 |
- /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ |
2934 |
-static const yytype_uint8 yyrline[] = |
2935 |
-{ |
2936 |
- 0, 99, 99, 100, 103, 112, 121, 128, 135, 153, |
2937 |
- 160, 167, 174, 181, 199, 207, 215, 236, 237, 238, |
2938 |
- 239 |
2939 |
-}; |
2940 |
-#endif |
2941 |
- |
2942 |
-#if YYDEBUG || YYERROR_VERBOSE || 0 |
2943 |
-/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. |
2944 |
- First, the terminals, then, starting at YYNTOKENS, nonterminals. */ |
2945 |
-static const char *const yytname[] = |
2946 |
-{ |
2947 |
- "$end", "error", "$undefined", "'!'", "'&'", "'|'", "INTEGER", "STRING", |
2948 |
- "FLOAT", "'='", "'>'", "'<'", "'@'", "'('", "')'", "$accept", "stmt", |
2949 |
- "expr", YY_NULLPTR |
2950 |
-}; |
2951 |
-#endif |
2952 |
- |
2953 |
-# ifdef YYPRINT |
2954 |
-/* YYTOKNUM[NUM] -- (External) token number corresponding to the |
2955 |
- (internal) symbol number NUM (which must be that of a token). */ |
2956 |
-static const yytype_uint16 yytoknum[] = |
2957 |
-{ |
2958 |
- 0, 256, 257, 33, 38, 124, 258, 259, 260, 61, |
2959 |
- 62, 60, 64, 40, 41 |
2960 |
-}; |
2961 |
-# endif |
2962 |
- |
2963 |
-#define YYPACT_NINF -6 |
2964 |
- |
2965 |
-#define yypact_value_is_default(Yystate) \ |
2966 |
- (!!((Yystate) == (-6))) |
2967 |
- |
2968 |
-#define YYTABLE_NINF -1 |
2969 |
- |
2970 |
-#define yytable_value_is_error(Yytable_value) \ |
2971 |
- 0 |
2972 |
- |
2973 |
- /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing |
2974 |
- STATE-NUM. */ |
2975 |
-static const yytype_int8 yypact[] = |
2976 |
-{ |
2977 |
- -2, -2, 9, -2, 3, 4, -6, -5, 16, 25, |
2978 |
- 26, 0, 2, -6, -2, -2, 19, -6, -6, -6, |
2979 |
- -6, -6, -6, -6, 22, -6, -6, -6, -6, -6, |
2980 |
- -6, -6, -6, -6 |
2981 |
-}; |
2982 |
- |
2983 |
- /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. |
2984 |
- Performed when YYTABLE does not specify something else to do. Zero |
2985 |
- means the default is an error. */ |
2986 |
-static const yytype_uint8 yydefact[] = |
2987 |
-{ |
2988 |
- 3, 0, 0, 0, 0, 2, 19, 0, 0, 0, |
2989 |
- 0, 0, 0, 1, 0, 0, 0, 4, 14, 9, |
2990 |
- 6, 11, 7, 12, 0, 20, 17, 18, 5, 15, |
2991 |
- 10, 8, 16, 13 |
2992 |
-}; |
2993 |
- |
2994 |
- /* YYPGOTO[NTERM-NUM]. */ |
2995 |
-static const yytype_int8 yypgoto[] = |
2996 |
-{ |
2997 |
- -6, -6, -1 |
2998 |
-}; |
2999 |
- |
3000 |
- /* YYDEFGOTO[NTERM-NUM]. */ |
3001 |
-static const yytype_int8 yydefgoto[] = |
3002 |
-{ |
3003 |
- -1, 4, 5 |
3004 |
-}; |
3005 |
- |
3006 |
- /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If |
3007 |
- positive, shift that token. If negative, reduce the rule whose |
3008 |
- number is the opposite. If YYTABLE_NINF, syntax error. */ |
3009 |
-static const yytype_uint8 yytable[] = |
3010 |
-{ |
3011 |
- 6, 1, 12, 13, 16, 2, 14, 15, 14, 15, |
3012 |
- 24, 3, 7, 26, 27, 0, 25, 0, 8, 9, |
3013 |
- 10, 11, 17, 18, 19, 28, 29, 30, 31, 32, |
3014 |
- 33, 20, 22, 21, 23 |
3015 |
-}; |
3016 |
- |
3017 |
-static const yytype_int8 yycheck[] = |
3018 |
-{ |
3019 |
- 1, 3, 3, 0, 9, 7, 4, 5, 4, 5, |
3020 |
- 10, 13, 3, 14, 15, -1, 14, -1, 9, 10, |
3021 |
- 11, 12, 6, 7, 8, 6, 7, 8, 6, 7, |
3022 |
- 8, 6, 6, 8, 8 |
3023 |
-}; |
3024 |
- |
3025 |
- /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing |
3026 |
- symbol of state STATE-NUM. */ |
3027 |
-static const yytype_uint8 yystos[] = |
3028 |
-{ |
3029 |
- 0, 3, 7, 13, 16, 17, 17, 3, 9, 10, |
3030 |
- 11, 12, 17, 0, 4, 5, 9, 6, 7, 8, |
3031 |
- 6, 8, 6, 8, 10, 14, 17, 17, 6, 7, |
3032 |
- 8, 6, 7, 8 |
3033 |
-}; |
3034 |
- |
3035 |
- /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ |
3036 |
-static const yytype_uint8 yyr1[] = |
3037 |
-{ |
3038 |
- 0, 15, 16, 16, 17, 17, 17, 17, 17, 17, |
3039 |
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, |
3040 |
- 17 |
3041 |
-}; |
3042 |
- |
3043 |
- /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ |
3044 |
-static const yytype_uint8 yyr2[] = |
3045 |
-{ |
3046 |
- 0, 2, 1, 0, 3, 4, 3, 3, 4, 3, |
3047 |
- 4, 3, 3, 4, 3, 4, 4, 3, 3, 2, |
3048 |
- 3 |
3049 |
-}; |
3050 |
- |
3051 |
- |
3052 |
-#define yyerrok (yyerrstatus = 0) |
3053 |
-#define yyclearin (yychar = YYEMPTY) |
3054 |
-#define YYEMPTY (-2) |
3055 |
-#define YYEOF 0 |
3056 |
- |
3057 |
-#define YYACCEPT goto yyacceptlab |
3058 |
-#define YYABORT goto yyabortlab |
3059 |
-#define YYERROR goto yyerrorlab |
3060 |
- |
3061 |
- |
3062 |
-#define YYRECOVERING() (!!yyerrstatus) |
3063 |
- |
3064 |
-#define YYBACKUP(Token, Value) \ |
3065 |
- do \ |
3066 |
- if (yychar == YYEMPTY) \ |
3067 |
- { \ |
3068 |
- yychar = (Token); \ |
3069 |
- yylval = (Value); \ |
3070 |
- YYPOPSTACK (yylen); \ |
3071 |
- yystate = *yyssp; \ |
3072 |
- goto yybackup; \ |
3073 |
- } \ |
3074 |
- else \ |
3075 |
- { \ |
3076 |
- yyerror (&yylloc, mc, oxml, result, error_msg, scanner, YY_("syntax error: cannot back up")); \ |
3077 |
- YYERROR; \ |
3078 |
- } \ |
3079 |
- while (0) |
3080 |
- |
3081 |
-/* Error token number */ |
3082 |
-#define YYTERROR 1 |
3083 |
-#define YYERRCODE 256 |
3084 |
- |
3085 |
- |
3086 |
-/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. |
3087 |
- If N is 0, then set CURRENT to the empty location which ends |
3088 |
- the previous symbol: RHS[0] (always defined). */ |
3089 |
- |
3090 |
-#ifndef YYLLOC_DEFAULT |
3091 |
-# define YYLLOC_DEFAULT(Current, Rhs, N) \ |
3092 |
- do \ |
3093 |
- if (N) \ |
3094 |
- { \ |
3095 |
- (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ |
3096 |
- (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ |
3097 |
- (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ |
3098 |
- (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ |
3099 |
- } \ |
3100 |
- else \ |
3101 |
- { \ |
3102 |
- (Current).first_line = (Current).last_line = \ |
3103 |
- YYRHSLOC (Rhs, 0).last_line; \ |
3104 |
- (Current).first_column = (Current).last_column = \ |
3105 |
- YYRHSLOC (Rhs, 0).last_column; \ |
3106 |
- } \ |
3107 |
- while (0) |
3108 |
-#endif |
3109 |
- |
3110 |
-#define YYRHSLOC(Rhs, K) ((Rhs)[K]) |
3111 |
- |
3112 |
- |
3113 |
-/* Enable debugging if requested. */ |
3114 |
-#if YYDEBUG |
3115 |
- |
3116 |
-# ifndef YYFPRINTF |
3117 |
-# include <stdio.h> /* INFRINGES ON USER NAME SPACE */ |
3118 |
-# define YYFPRINTF fprintf |
3119 |
-# endif |
3120 |
- |
3121 |
-# define YYDPRINTF(Args) \ |
3122 |
-do { \ |
3123 |
- if (yydebug) \ |
3124 |
- YYFPRINTF Args; \ |
3125 |
-} while (0) |
3126 |
- |
3127 |
- |
3128 |
-/* YY_LOCATION_PRINT -- Print the location on the stream. |
3129 |
- This macro was not mandated originally: define only if we know |
3130 |
- we won't break user code: when these are the locations we know. */ |
3131 |
- |
3132 |
-#ifndef YY_LOCATION_PRINT |
3133 |
-# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL |
3134 |
- |
3135 |
-/* Print *YYLOCP on YYO. Private, do not rely on its existence. */ |
3136 |
- |
3137 |
-YY_ATTRIBUTE_UNUSED |
3138 |
-static int |
3139 |
-yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp) |
3140 |
-{ |
3141 |
- int res = 0; |
3142 |
- int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0; |
3143 |
- if (0 <= yylocp->first_line) |
3144 |
- { |
3145 |
- res += YYFPRINTF (yyo, "%d", yylocp->first_line); |
3146 |
- if (0 <= yylocp->first_column) |
3147 |
- res += YYFPRINTF (yyo, ".%d", yylocp->first_column); |
3148 |
- } |
3149 |
- if (0 <= yylocp->last_line) |
3150 |
- { |
3151 |
- if (yylocp->first_line < yylocp->last_line) |
3152 |
- { |
3153 |
- res += YYFPRINTF (yyo, "-%d", yylocp->last_line); |
3154 |
- if (0 <= end_col) |
3155 |
- res += YYFPRINTF (yyo, ".%d", end_col); |
3156 |
- } |
3157 |
- else if (0 <= end_col && yylocp->first_column < end_col) |
3158 |
- res += YYFPRINTF (yyo, "-%d", end_col); |
3159 |
- } |
3160 |
- return res; |
3161 |
- } |
3162 |
- |
3163 |
-# define YY_LOCATION_PRINT(File, Loc) \ |
3164 |
- yy_location_print_ (File, &(Loc)) |
3165 |
- |
3166 |
-# else |
3167 |
-# define YY_LOCATION_PRINT(File, Loc) ((void) 0) |
3168 |
-# endif |
3169 |
-#endif |
3170 |
- |
3171 |
- |
3172 |
-# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ |
3173 |
-do { \ |
3174 |
- if (yydebug) \ |
3175 |
- { \ |
3176 |
- YYFPRINTF (stderr, "%s ", Title); \ |
3177 |
- yy_symbol_print (stderr, \ |
3178 |
- Type, Value, Location, mc, oxml, result, error_msg, scanner); \ |
3179 |
- YYFPRINTF (stderr, "\n"); \ |
3180 |
- } \ |
3181 |
-} while (0) |
3182 |
- |
3183 |
- |
3184 |
-/*-----------------------------------. |
3185 |
-| Print this symbol's value on YYO. | |
3186 |
-`-----------------------------------*/ |
3187 |
- |
3188 |
-static void |
3189 |
-yy_symbol_value_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, mem_collector * mc, ObjectXML * oxml, bool& result, char ** error_msg, yyscan_t scanner) |
3190 |
-{ |
3191 |
- FILE *yyoutput = yyo; |
3192 |
- YYUSE (yyoutput); |
3193 |
- YYUSE (yylocationp); |
3194 |
- YYUSE (mc); |
3195 |
- YYUSE (oxml); |
3196 |
- YYUSE (result); |
3197 |
- YYUSE (error_msg); |
3198 |
- YYUSE (scanner); |
3199 |
- if (!yyvaluep) |
3200 |
- return; |
3201 |
-# ifdef YYPRINT |
3202 |
- if (yytype < YYNTOKENS) |
3203 |
- YYPRINT (yyo, yytoknum[yytype], *yyvaluep); |
3204 |
-# endif |
3205 |
- YYUSE (yytype); |
3206 |
-} |
3207 |
- |
3208 |
- |
3209 |
-/*---------------------------. |
3210 |
-| Print this symbol on YYO. | |
3211 |
-`---------------------------*/ |
3212 |
- |
3213 |
-static void |
3214 |
-yy_symbol_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, mem_collector * mc, ObjectXML * oxml, bool& result, char ** error_msg, yyscan_t scanner) |
3215 |
-{ |
3216 |
- YYFPRINTF (yyo, "%s %s (", |
3217 |
- yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); |
3218 |
- |
3219 |
- YY_LOCATION_PRINT (yyo, *yylocationp); |
3220 |
- YYFPRINTF (yyo, ": "); |
3221 |
- yy_symbol_value_print (yyo, yytype, yyvaluep, yylocationp, mc, oxml, result, error_msg, scanner); |
3222 |
- YYFPRINTF (yyo, ")"); |
3223 |
-} |
3224 |
- |
3225 |
-/*------------------------------------------------------------------. |
3226 |
-| yy_stack_print -- Print the state stack from its BOTTOM up to its | |
3227 |
-| TOP (included). | |
3228 |
-`------------------------------------------------------------------*/ |
3229 |
- |
3230 |
-static void |
3231 |
-yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) |
3232 |
-{ |
3233 |
- YYFPRINTF (stderr, "Stack now"); |
3234 |
- for (; yybottom <= yytop; yybottom++) |
3235 |
- { |
3236 |
- int yybot = *yybottom; |
3237 |
- YYFPRINTF (stderr, " %d", yybot); |
3238 |
- } |
3239 |
- YYFPRINTF (stderr, "\n"); |
3240 |
-} |
3241 |
- |
3242 |
-# define YY_STACK_PRINT(Bottom, Top) \ |
3243 |
-do { \ |
3244 |
- if (yydebug) \ |
3245 |
- yy_stack_print ((Bottom), (Top)); \ |
3246 |
-} while (0) |
3247 |
- |
3248 |
- |
3249 |
-/*------------------------------------------------. |
3250 |
-| Report that the YYRULE is going to be reduced. | |
3251 |
-`------------------------------------------------*/ |
3252 |
- |
3253 |
-static void |
3254 |
-yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, mem_collector * mc, ObjectXML * oxml, bool& result, char ** error_msg, yyscan_t scanner) |
3255 |
-{ |
3256 |
- unsigned long yylno = yyrline[yyrule]; |
3257 |
- int yynrhs = yyr2[yyrule]; |
3258 |
- int yyi; |
3259 |
- YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", |
3260 |
- yyrule - 1, yylno); |
3261 |
- /* The symbols being reduced. */ |
3262 |
- for (yyi = 0; yyi < yynrhs; yyi++) |
3263 |
- { |
3264 |
- YYFPRINTF (stderr, " $%d = ", yyi + 1); |
3265 |
- yy_symbol_print (stderr, |
3266 |
- yystos[yyssp[yyi + 1 - yynrhs]], |
3267 |
- &yyvsp[(yyi + 1) - (yynrhs)] |
3268 |
- , &(yylsp[(yyi + 1) - (yynrhs)]) , mc, oxml, result, error_msg, scanner); |
3269 |
- YYFPRINTF (stderr, "\n"); |
3270 |
- } |
3271 |
-} |
3272 |
- |
3273 |
-# define YY_REDUCE_PRINT(Rule) \ |
3274 |
-do { \ |
3275 |
- if (yydebug) \ |
3276 |
- yy_reduce_print (yyssp, yyvsp, yylsp, Rule, mc, oxml, result, error_msg, scanner); \ |
3277 |
-} while (0) |
3278 |
- |
3279 |
-/* Nonzero means print parse trace. It is left uninitialized so that |
3280 |
- multiple parsers can coexist. */ |
3281 |
-int yydebug; |
3282 |
-#else /* !YYDEBUG */ |
3283 |
-# define YYDPRINTF(Args) |
3284 |
-# define YY_SYMBOL_PRINT(Title, Type, Value, Location) |
3285 |
-# define YY_STACK_PRINT(Bottom, Top) |
3286 |
-# define YY_REDUCE_PRINT(Rule) |
3287 |
-#endif /* !YYDEBUG */ |
3288 |
- |
3289 |
- |
3290 |
-/* YYINITDEPTH -- initial size of the parser's stacks. */ |
3291 |
-#ifndef YYINITDEPTH |
3292 |
-# define YYINITDEPTH 200 |
3293 |
-#endif |
3294 |
- |
3295 |
-/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only |
3296 |
- if the built-in stack extension method is used). |
3297 |
- |
3298 |
- Do not make this value too large; the results are undefined if |
3299 |
- YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) |
3300 |
- evaluated with infinite-precision integer arithmetic. */ |
3301 |
- |
3302 |
-#ifndef YYMAXDEPTH |
3303 |
-# define YYMAXDEPTH 10000 |
3304 |
-#endif |
3305 |
- |
3306 |
- |
3307 |
-#if YYERROR_VERBOSE |
3308 |
- |
3309 |
-# ifndef yystrlen |
3310 |
-# if defined __GLIBC__ && defined _STRING_H |
3311 |
-# define yystrlen strlen |
3312 |
-# else |
3313 |
-/* Return the length of YYSTR. */ |
3314 |
-static YYSIZE_T |
3315 |
-yystrlen (const char *yystr) |
3316 |
-{ |
3317 |
- YYSIZE_T yylen; |
3318 |
- for (yylen = 0; yystr[yylen]; yylen++) |
3319 |
- continue; |
3320 |
- return yylen; |
3321 |
-} |
3322 |
-# endif |
3323 |
-# endif |
3324 |
- |
3325 |
-# ifndef yystpcpy |
3326 |
-# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE |
3327 |
-# define yystpcpy stpcpy |
3328 |
-# else |
3329 |
-/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in |
3330 |
- YYDEST. */ |
3331 |
-static char * |
3332 |
-yystpcpy (char *yydest, const char *yysrc) |
3333 |
-{ |
3334 |
- char *yyd = yydest; |
3335 |
- const char *yys = yysrc; |
3336 |
- |
3337 |
- while ((*yyd++ = *yys++) != '\0') |
3338 |
- continue; |
3339 |
- |
3340 |
- return yyd - 1; |
3341 |
-} |
3342 |
-# endif |
3343 |
-# endif |
3344 |
- |
3345 |
-# ifndef yytnamerr |
3346 |
-/* Copy to YYRES the contents of YYSTR after stripping away unnecessary |
3347 |
- quotes and backslashes, so that it's suitable for yyerror. The |
3348 |
- heuristic is that double-quoting is unnecessary unless the string |
3349 |
- contains an apostrophe, a comma, or backslash (other than |
3350 |
- backslash-backslash). YYSTR is taken from yytname. If YYRES is |
3351 |
- null, do not copy; instead, return the length of what the result |
3352 |
- would have been. */ |
3353 |
-static YYSIZE_T |
3354 |
-yytnamerr (char *yyres, const char *yystr) |
3355 |
-{ |
3356 |
- if (*yystr == '"') |
3357 |
- { |
3358 |
- YYSIZE_T yyn = 0; |
3359 |
- char const *yyp = yystr; |
3360 |
- |
3361 |
- for (;;) |
3362 |
- switch (*++yyp) |
3363 |
- { |
3364 |
- case '\'': |
3365 |
- case ',': |
3366 |
- goto do_not_strip_quotes; |
3367 |
- |
3368 |
- case '\\': |
3369 |
- if (*++yyp != '\\') |
3370 |
- goto do_not_strip_quotes; |
3371 |
- else |
3372 |
- goto append; |
3373 |
- |
3374 |
- append: |
3375 |
- default: |
3376 |
- if (yyres) |
3377 |
- yyres[yyn] = *yyp; |
3378 |
- yyn++; |
3379 |
- break; |
3380 |
- |
3381 |
- case '"': |
3382 |
- if (yyres) |
3383 |
- yyres[yyn] = '\0'; |
3384 |
- return yyn; |
3385 |
- } |
3386 |
- do_not_strip_quotes: ; |
3387 |
- } |
3388 |
- |
3389 |
- if (! yyres) |
3390 |
- return yystrlen (yystr); |
3391 |
- |
3392 |
- return (YYSIZE_T) (yystpcpy (yyres, yystr) - yyres); |
3393 |
-} |
3394 |
-# endif |
3395 |
- |
3396 |
-/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message |
3397 |
- about the unexpected token YYTOKEN for the state stack whose top is |
3398 |
- YYSSP. |
3399 |
- |
3400 |
- Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is |
3401 |
- not large enough to hold the message. In that case, also set |
3402 |
- *YYMSG_ALLOC to the required number of bytes. Return 2 if the |
3403 |
- required number of bytes is too large to store. */ |
3404 |
-static int |
3405 |
-yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, |
3406 |
- yytype_int16 *yyssp, int yytoken) |
3407 |
-{ |
3408 |
- YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]); |
3409 |
- YYSIZE_T yysize = yysize0; |
3410 |
- enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; |
3411 |
- /* Internationalized format string. */ |
3412 |
- const char *yyformat = YY_NULLPTR; |
3413 |
- /* Arguments of yyformat. */ |
3414 |
- char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; |
3415 |
- /* Number of reported tokens (one for the "unexpected", one per |
3416 |
- "expected"). */ |
3417 |
- int yycount = 0; |
3418 |
- |
3419 |
- /* There are many possibilities here to consider: |
3420 |
- - If this state is a consistent state with a default action, then |
3421 |
- the only way this function was invoked is if the default action |
3422 |
- is an error action. In that case, don't check for expected |
3423 |
- tokens because there are none. |
3424 |
- - The only way there can be no lookahead present (in yychar) is if |
3425 |
- this state is a consistent state with a default action. Thus, |
3426 |
- detecting the absence of a lookahead is sufficient to determine |
3427 |
- that there is no unexpected or expected token to report. In that |
3428 |
- case, just report a simple "syntax error". |
3429 |
- - Don't assume there isn't a lookahead just because this state is a |
3430 |
- consistent state with a default action. There might have been a |
3431 |
- previous inconsistent state, consistent state with a non-default |
3432 |
- action, or user semantic action that manipulated yychar. |
3433 |
- - Of course, the expected token list depends on states to have |
3434 |
- correct lookahead information, and it depends on the parser not |
3435 |
- to perform extra reductions after fetching a lookahead from the |
3436 |
- scanner and before detecting a syntax error. Thus, state merging |
3437 |
- (from LALR or IELR) and default reductions corrupt the expected |
3438 |
- token list. However, the list is correct for canonical LR with |
3439 |
- one exception: it will still contain any token that will not be |
3440 |
- accepted due to an error action in a later state. |
3441 |
- */ |
3442 |
- if (yytoken != YYEMPTY) |
3443 |
- { |
3444 |
- int yyn = yypact[*yyssp]; |
3445 |
- yyarg[yycount++] = yytname[yytoken]; |
3446 |
- if (!yypact_value_is_default (yyn)) |
3447 |
- { |
3448 |
- /* Start YYX at -YYN if negative to avoid negative indexes in |
3449 |
- YYCHECK. In other words, skip the first -YYN actions for |
3450 |
- this state because they are default actions. */ |
3451 |
- int yyxbegin = yyn < 0 ? -yyn : 0; |
3452 |
- /* Stay within bounds of both yycheck and yytname. */ |
3453 |
- int yychecklim = YYLAST - yyn + 1; |
3454 |
- int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; |
3455 |
- int yyx; |
3456 |
- |
3457 |
- for (yyx = yyxbegin; yyx < yyxend; ++yyx) |
3458 |
- if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR |
3459 |
- && !yytable_value_is_error (yytable[yyx + yyn])) |
3460 |
- { |
3461 |
- if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) |
3462 |
- { |
3463 |
- yycount = 1; |
3464 |
- yysize = yysize0; |
3465 |
- break; |
3466 |
- } |
3467 |
- yyarg[yycount++] = yytname[yyx]; |
3468 |
- { |
3469 |
- YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]); |
3470 |
- if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) |
3471 |
- yysize = yysize1; |
3472 |
- else |
3473 |
- return 2; |
3474 |
- } |
3475 |
- } |
3476 |
- } |
3477 |
- } |
3478 |
- |
3479 |
- switch (yycount) |
3480 |
- { |
3481 |
-# define YYCASE_(N, S) \ |
3482 |
- case N: \ |
3483 |
- yyformat = S; \ |
3484 |
- break |
3485 |
- default: /* Avoid compiler warnings. */ |
3486 |
- YYCASE_(0, YY_("syntax error")); |
3487 |
- YYCASE_(1, YY_("syntax error, unexpected %s")); |
3488 |
- YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); |
3489 |
- YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); |
3490 |
- YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); |
3491 |
- YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); |
3492 |
-# undef YYCASE_ |
3493 |
- } |
3494 |
- |
3495 |
- { |
3496 |
- YYSIZE_T yysize1 = yysize + yystrlen (yyformat); |
3497 |
- if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) |
3498 |
- yysize = yysize1; |
3499 |
- else |
3500 |
- return 2; |
3501 |
- } |
3502 |
- |
3503 |
- if (*yymsg_alloc < yysize) |
3504 |
- { |
3505 |
- *yymsg_alloc = 2 * yysize; |
3506 |
- if (! (yysize <= *yymsg_alloc |
3507 |
- && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) |
3508 |
- *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; |
3509 |
- return 1; |
3510 |
- } |
3511 |
- |
3512 |
- /* Avoid sprintf, as that infringes on the user's name space. |
3513 |
- Don't have undefined behavior even if the translation |
3514 |
- produced a string with the wrong number of "%s"s. */ |
3515 |
- { |
3516 |
- char *yyp = *yymsg; |
3517 |
- int yyi = 0; |
3518 |
- while ((*yyp = *yyformat) != '\0') |
3519 |
- if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) |
3520 |
- { |
3521 |
- yyp += yytnamerr (yyp, yyarg[yyi++]); |
3522 |
- yyformat += 2; |
3523 |
- } |
3524 |
- else |
3525 |
- { |
3526 |
- yyp++; |
3527 |
- yyformat++; |
3528 |
- } |
3529 |
- } |
3530 |
- return 0; |
3531 |
-} |
3532 |
-#endif /* YYERROR_VERBOSE */ |
3533 |
- |
3534 |
-/*-----------------------------------------------. |
3535 |
-| Release the memory associated to this symbol. | |
3536 |
-`-----------------------------------------------*/ |
3537 |
- |
3538 |
-static void |
3539 |
-yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, mem_collector * mc, ObjectXML * oxml, bool& result, char ** error_msg, yyscan_t scanner) |
3540 |
-{ |
3541 |
- YYUSE (yyvaluep); |
3542 |
- YYUSE (yylocationp); |
3543 |
- YYUSE (mc); |
3544 |
- YYUSE (oxml); |
3545 |
- YYUSE (result); |
3546 |
- YYUSE (error_msg); |
3547 |
- YYUSE (scanner); |
3548 |
- if (!yymsg) |
3549 |
- yymsg = "Deleting"; |
3550 |
- YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); |
3551 |
- |
3552 |
- YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
3553 |
- YYUSE (yytype); |
3554 |
- YY_IGNORE_MAYBE_UNINITIALIZED_END |
3555 |
-} |
3556 |
- |
3557 |
- |
3558 |
- |
3559 |
- |
3560 |
-/*----------. |
3561 |
-| yyparse. | |
3562 |
-`----------*/ |
3563 |
- |
3564 |
-int |
3565 |
-yyparse (mem_collector * mc, ObjectXML * oxml, bool& result, char ** error_msg, yyscan_t scanner) |
3566 |
-{ |
3567 |
-/* The lookahead symbol. */ |
3568 |
-int yychar; |
3569 |
- |
3570 |
- |
3571 |
-/* The semantic value of the lookahead symbol. */ |
3572 |
-/* Default value used for initialization, for pacifying older GCCs |
3573 |
- or non-GCC compilers. */ |
3574 |
-YY_INITIAL_VALUE (static YYSTYPE yyval_default;) |
3575 |
-YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); |
3576 |
- |
3577 |
-/* Location data for the lookahead symbol. */ |
3578 |
-static YYLTYPE yyloc_default |
3579 |
-# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL |
3580 |
- = { 1, 1, 1, 1 } |
3581 |
-# endif |
3582 |
-; |
3583 |
-YYLTYPE yylloc = yyloc_default; |
3584 |
- |
3585 |
- /* Number of syntax errors so far. */ |
3586 |
- int yynerrs; |
3587 |
- |
3588 |
- int yystate; |
3589 |
- /* Number of tokens to shift before error messages enabled. */ |
3590 |
- int yyerrstatus; |
3591 |
- |
3592 |
- /* The stacks and their tools: |
3593 |
- 'yyss': related to states. |
3594 |
- 'yyvs': related to semantic values. |
3595 |
- 'yyls': related to locations. |
3596 |
- |
3597 |
- Refer to the stacks through separate pointers, to allow yyoverflow |
3598 |
- to reallocate them elsewhere. */ |
3599 |
- |
3600 |
- /* The state stack. */ |
3601 |
- yytype_int16 yyssa[YYINITDEPTH]; |
3602 |
- yytype_int16 *yyss; |
3603 |
- yytype_int16 *yyssp; |
3604 |
- |
3605 |
- /* The semantic value stack. */ |
3606 |
- YYSTYPE yyvsa[YYINITDEPTH]; |
3607 |
- YYSTYPE *yyvs; |
3608 |
- YYSTYPE *yyvsp; |
3609 |
- |
3610 |
- /* The location stack. */ |
3611 |
- YYLTYPE yylsa[YYINITDEPTH]; |
3612 |
- YYLTYPE *yyls; |
3613 |
- YYLTYPE *yylsp; |
3614 |
- |
3615 |
- /* The locations where the error started and ended. */ |
3616 |
- YYLTYPE yyerror_range[3]; |
3617 |
- |
3618 |
- YYSIZE_T yystacksize; |
3619 |
- |
3620 |
- int yyn; |
3621 |
- int yyresult; |
3622 |
- /* Lookahead token as an internal (translated) token number. */ |
3623 |
- int yytoken = 0; |
3624 |
- /* The variables used to return semantic value and location from the |
3625 |
- action routines. */ |
3626 |
- YYSTYPE yyval; |
3627 |
- YYLTYPE yyloc; |
3628 |
- |
3629 |
-#if YYERROR_VERBOSE |
3630 |
- /* Buffer for error messages, and its allocated size. */ |
3631 |
- char yymsgbuf[128]; |
3632 |
- char *yymsg = yymsgbuf; |
3633 |
- YYSIZE_T yymsg_alloc = sizeof yymsgbuf; |
3634 |
-#endif |
3635 |
- |
3636 |
-#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) |
3637 |
- |
3638 |
- /* The number of symbols on the RHS of the reduced rule. |
3639 |
- Keep to zero when no symbol should be popped. */ |
3640 |
- int yylen = 0; |
3641 |
- |
3642 |
- yyssp = yyss = yyssa; |
3643 |
- yyvsp = yyvs = yyvsa; |
3644 |
- yylsp = yyls = yylsa; |
3645 |
- yystacksize = YYINITDEPTH; |
3646 |
- |
3647 |
- YYDPRINTF ((stderr, "Starting parse\n")); |
3648 |
- |
3649 |
- yystate = 0; |
3650 |
- yyerrstatus = 0; |
3651 |
- yynerrs = 0; |
3652 |
- yychar = YYEMPTY; /* Cause a token to be read. */ |
3653 |
- yylsp[0] = yylloc; |
3654 |
- goto yysetstate; |
3655 |
- |
3656 |
- |
3657 |
-/*------------------------------------------------------------. |
3658 |
-| yynewstate -- push a new state, which is found in yystate. | |
3659 |
-`------------------------------------------------------------*/ |
3660 |
-yynewstate: |
3661 |
- /* In all cases, when you get here, the value and location stacks |
3662 |
- have just been pushed. So pushing a state here evens the stacks. */ |
3663 |
- yyssp++; |
3664 |
- |
3665 |
- |
3666 |
-/*--------------------------------------------------------------------. |
3667 |
-| yynewstate -- set current state (the top of the stack) to yystate. | |
3668 |
-`--------------------------------------------------------------------*/ |
3669 |
-yysetstate: |
3670 |
- YYDPRINTF ((stderr, "Entering state %d\n", yystate)); |
3671 |
- YY_ASSERT (0 <= yystate && yystate < YYNSTATES); |
3672 |
- *yyssp = (yytype_int16) yystate; |
3673 |
- |
3674 |
- if (yyss + yystacksize - 1 <= yyssp) |
3675 |
-#if !defined yyoverflow && !defined YYSTACK_RELOCATE |
3676 |
- goto yyexhaustedlab; |
3677 |
-#else |
3678 |
- { |
3679 |
- /* Get the current used size of the three stacks, in elements. */ |
3680 |
- YYSIZE_T yysize = (YYSIZE_T) (yyssp - yyss + 1); |
3681 |
- |
3682 |
-# if defined yyoverflow |
3683 |
- { |
3684 |
- /* Give user a chance to reallocate the stack. Use copies of |
3685 |
- these so that the &'s don't force the real ones into |
3686 |
- memory. */ |
3687 |
- YYSTYPE *yyvs1 = yyvs; |
3688 |
- yytype_int16 *yyss1 = yyss; |
3689 |
- YYLTYPE *yyls1 = yyls; |
3690 |
- |
3691 |
- /* Each stack pointer address is followed by the size of the |
3692 |
- data in use in that stack, in bytes. This used to be a |
3693 |
- conditional around just the two extra args, but that might |
3694 |
- be undefined if yyoverflow is a macro. */ |
3695 |
- yyoverflow (YY_("memory exhausted"), |
3696 |
- &yyss1, yysize * sizeof (*yyssp), |
3697 |
- &yyvs1, yysize * sizeof (*yyvsp), |
3698 |
- &yyls1, yysize * sizeof (*yylsp), |
3699 |
- &yystacksize); |
3700 |
- yyss = yyss1; |
3701 |
- yyvs = yyvs1; |
3702 |
- yyls = yyls1; |
3703 |
- } |
3704 |
-# else /* defined YYSTACK_RELOCATE */ |
3705 |
- /* Extend the stack our own way. */ |
3706 |
- if (YYMAXDEPTH <= yystacksize) |
3707 |
- goto yyexhaustedlab; |
3708 |
- yystacksize *= 2; |
3709 |
- if (YYMAXDEPTH < yystacksize) |
3710 |
- yystacksize = YYMAXDEPTH; |
3711 |
- |
3712 |
- { |
3713 |
- yytype_int16 *yyss1 = yyss; |
3714 |
- union yyalloc *yyptr = |
3715 |
- (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); |
3716 |
- if (! yyptr) |
3717 |
- goto yyexhaustedlab; |
3718 |
- YYSTACK_RELOCATE (yyss_alloc, yyss); |
3719 |
- YYSTACK_RELOCATE (yyvs_alloc, yyvs); |
3720 |
- YYSTACK_RELOCATE (yyls_alloc, yyls); |
3721 |
-# undef YYSTACK_RELOCATE |
3722 |
- if (yyss1 != yyssa) |
3723 |
- YYSTACK_FREE (yyss1); |
3724 |
- } |
3725 |
-# endif |
3726 |
- |
3727 |
- yyssp = yyss + yysize - 1; |
3728 |
- yyvsp = yyvs + yysize - 1; |
3729 |
- yylsp = yyls + yysize - 1; |
3730 |
- |
3731 |
- YYDPRINTF ((stderr, "Stack size increased to %lu\n", |
3732 |
- (unsigned long) yystacksize)); |
3733 |
- |
3734 |
- if (yyss + yystacksize - 1 <= yyssp) |
3735 |
- YYABORT; |
3736 |
- } |
3737 |
-#endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */ |
3738 |
- |
3739 |
- if (yystate == YYFINAL) |
3740 |
- YYACCEPT; |
3741 |
- |
3742 |
- goto yybackup; |
3743 |
- |
3744 |
- |
3745 |
-/*-----------. |
3746 |
-| yybackup. | |
3747 |
-`-----------*/ |
3748 |
-yybackup: |
3749 |
- /* Do appropriate processing given the current state. Read a |
3750 |
- lookahead token if we need one and don't already have one. */ |
3751 |
- |
3752 |
- /* First try to decide what to do without reference to lookahead token. */ |
3753 |
- yyn = yypact[yystate]; |
3754 |
- if (yypact_value_is_default (yyn)) |
3755 |
- goto yydefault; |
3756 |
- |
3757 |
- /* Not known => get a lookahead token if don't already have one. */ |
3758 |
- |
3759 |
- /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ |
3760 |
- if (yychar == YYEMPTY) |
3761 |
- { |
3762 |
- YYDPRINTF ((stderr, "Reading a token: ")); |
3763 |
- yychar = yylex (&yylval, &yylloc, mc, scanner); |
3764 |
- } |
3765 |
- |
3766 |
- if (yychar <= YYEOF) |
3767 |
- { |
3768 |
- yychar = yytoken = YYEOF; |
3769 |
- YYDPRINTF ((stderr, "Now at end of input.\n")); |
3770 |
- } |
3771 |
- else |
3772 |
- { |
3773 |
- yytoken = YYTRANSLATE (yychar); |
3774 |
- YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); |
3775 |
- } |
3776 |
- |
3777 |
- /* If the proper action on seeing token YYTOKEN is to reduce or to |
3778 |
- detect an error, take that action. */ |
3779 |
- yyn += yytoken; |
3780 |
- if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) |
3781 |
- goto yydefault; |
3782 |
- yyn = yytable[yyn]; |
3783 |
- if (yyn <= 0) |
3784 |
- { |
3785 |
- if (yytable_value_is_error (yyn)) |
3786 |
- goto yyerrlab; |
3787 |
- yyn = -yyn; |
3788 |
- goto yyreduce; |
3789 |
- } |
3790 |
- |
3791 |
- /* Count tokens shifted since error; after three, turn off error |
3792 |
- status. */ |
3793 |
- if (yyerrstatus) |
3794 |
- yyerrstatus--; |
3795 |
- |
3796 |
- /* Shift the lookahead token. */ |
3797 |
- YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); |
3798 |
- |
3799 |
- /* Discard the shifted token. */ |
3800 |
- yychar = YYEMPTY; |
3801 |
- |
3802 |
- yystate = yyn; |
3803 |
- YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
3804 |
- *++yyvsp = yylval; |
3805 |
- YY_IGNORE_MAYBE_UNINITIALIZED_END |
3806 |
- *++yylsp = yylloc; |
3807 |
- goto yynewstate; |
3808 |
- |
3809 |
- |
3810 |
-/*-----------------------------------------------------------. |
3811 |
-| yydefault -- do the default action for the current state. | |
3812 |
-`-----------------------------------------------------------*/ |
3813 |
-yydefault: |
3814 |
- yyn = yydefact[yystate]; |
3815 |
- if (yyn == 0) |
3816 |
- goto yyerrlab; |
3817 |
- goto yyreduce; |
3818 |
- |
3819 |
- |
3820 |
-/*-----------------------------. |
3821 |
-| yyreduce -- do a reduction. | |
3822 |
-`-----------------------------*/ |
3823 |
-yyreduce: |
3824 |
- /* yyn is the number of a rule to reduce with. */ |
3825 |
- yylen = yyr2[yyn]; |
3826 |
- |
3827 |
- /* If YYLEN is nonzero, implement the default value of the action: |
3828 |
- '$$ = $1'. |
3829 |
- |
3830 |
- Otherwise, the following line sets YYVAL to garbage. |
3831 |
- This behavior is undocumented and Bison |
3832 |
- users should not rely upon it. Assigning to YYVAL |
3833 |
- unconditionally makes the parser a bit smaller, and it avoids a |
3834 |
- GCC warning that YYVAL may be used uninitialized. */ |
3835 |
- yyval = yyvsp[1-yylen]; |
3836 |
- |
3837 |
- /* Default location. */ |
3838 |
- YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen); |
3839 |
- yyerror_range[1] = yyloc; |
3840 |
- YY_REDUCE_PRINT (yyn); |
3841 |
- switch (yyn) |
3842 |
- { |
3843 |
- case 2: |
3844 |
-#line 99 "expr_bool.y" |
3845 |
- { result=(yyvsp[0].val_int); } |
3846 |
-#line 1416 "expr_bool.cc" |
3847 |
- break; |
3848 |
- |
3849 |
- case 3: |
3850 |
-#line 100 "expr_bool.y" |
3851 |
- { result=true; } |
3852 |
-#line 1422 "expr_bool.cc" |
3853 |
- break; |
3854 |
- |
3855 |
- case 4: |
3856 |
-#line 103 "expr_bool.y" |
3857 |
- { |
3858 |
- int val = (yyvsp[0].val_int); |
3859 |
- int rc; |
3860 |
- |
3861 |
- rc = oxml->search((yyvsp[-2].val_str),val); |
3862 |
- |
3863 |
- (yyval.val_int) = (rc == 0 && val == (yyvsp[0].val_int)); |
3864 |
- } |
3865 |
-#line 1435 "expr_bool.cc" |
3866 |
- break; |
3867 |
- |
3868 |
- case 5: |
3869 |
-#line 112 "expr_bool.y" |
3870 |
- { |
3871 |
- int val = (yyvsp[0].val_int); |
3872 |
- int rc; |
3873 |
- |
3874 |
- rc = oxml->search((yyvsp[-3].val_str),val); |
3875 |
- |
3876 |
- (yyval.val_int) = (rc == 0 && val != (yyvsp[0].val_int)); |
3877 |
- } |
3878 |
-#line 1448 "expr_bool.cc" |
3879 |
- break; |
3880 |
- |
3881 |
- case 6: |
3882 |
-#line 121 "expr_bool.y" |
3883 |
- { |
3884 |
- int val, rc; |
3885 |
- |
3886 |
- rc = oxml->search((yyvsp[-2].val_str),val); |
3887 |
- (yyval.val_int) = (rc == 0 && val > (yyvsp[0].val_int)); |
3888 |
- } |
3889 |
-#line 1459 "expr_bool.cc" |
3890 |
- break; |
3891 |
- |
3892 |
- case 7: |
3893 |
-#line 128 "expr_bool.y" |
3894 |
- { |
3895 |
- int val, rc; |
3896 |
- |
3897 |
- rc = oxml->search((yyvsp[-2].val_str),val); |
3898 |
- (yyval.val_int) = (rc == 0 && val < (yyvsp[0].val_int)); |
3899 |
- } |
3900 |
-#line 1470 "expr_bool.cc" |
3901 |
- break; |
3902 |
- |
3903 |
- case 8: |
3904 |
-#line 135 "expr_bool.y" |
3905 |
- { |
3906 |
- std::vector<int> val; |
3907 |
- std::vector<int>::iterator it; |
3908 |
- |
3909 |
- (yyval.val_int) = false; |
3910 |
- |
3911 |
- oxml->search((yyvsp[-3].val_str),val); |
3912 |
- |
3913 |
- for (it=val.begin(); it != val.end(); ++it) |
3914 |
- { |
3915 |
- if ((yyvsp[0].val_int) == *it) |
3916 |
- { |
3917 |
- (yyval.val_int) = true; |
3918 |
- break; |
3919 |
- } |
3920 |
- } |
3921 |
- } |
3922 |
-#line 1492 "expr_bool.cc" |
3923 |
- break; |
3924 |
- |
3925 |
- case 9: |
3926 |
-#line 153 "expr_bool.y" |
3927 |
- { |
3928 |
- float val, rc; |
3929 |
- |
3930 |
- rc = oxml->search((yyvsp[-2].val_str),val); |
3931 |
- (yyval.val_int) = (rc == 0 && val == (yyvsp[0].val_float)); |
3932 |
- } |
3933 |
-#line 1503 "expr_bool.cc" |
3934 |
- break; |
3935 |
- |
3936 |
- case 10: |
3937 |
-#line 160 "expr_bool.y" |
3938 |
- { |
3939 |
- float val, rc; |
3940 |
- |
3941 |
- rc = oxml->search((yyvsp[-3].val_str),val); |
3942 |
- (yyval.val_int) = (rc == 0 && val != (yyvsp[0].val_float)); |
3943 |
- } |
3944 |
-#line 1514 "expr_bool.cc" |
3945 |
- break; |
3946 |
- |
3947 |
- case 11: |
3948 |
-#line 167 "expr_bool.y" |
3949 |
- { |
3950 |
- float val, rc; |
3951 |
- |
3952 |
- rc = oxml->search((yyvsp[-2].val_str),val); |
3953 |
- (yyval.val_int) = (rc == 0 && val > (yyvsp[0].val_float)); |
3954 |
- } |
3955 |
-#line 1525 "expr_bool.cc" |
3956 |
- break; |
3957 |
- |
3958 |
- case 12: |
3959 |
-#line 174 "expr_bool.y" |
3960 |
- { |
3961 |
- float val, rc; |
3962 |
- |
3963 |
- rc = oxml->search((yyvsp[-2].val_str),val); |
3964 |
- (yyval.val_int) = (rc == 0 && val < (yyvsp[0].val_float)); |
3965 |
- } |
3966 |
-#line 1536 "expr_bool.cc" |
3967 |
- break; |
3968 |
- |
3969 |
- case 13: |
3970 |
-#line 181 "expr_bool.y" |
3971 |
- { |
3972 |
- std::vector<float> val; |
3973 |
- std::vector<float>::iterator it; |
3974 |
- |
3975 |
- (yyval.val_int) = false; |
3976 |
- |
3977 |
- oxml->search((yyvsp[-3].val_str),val); |
3978 |
- |
3979 |
- for (it=val.begin(); it != val.end(); ++it) |
3980 |
- { |
3981 |
- if ((yyvsp[0].val_float) == *it) |
3982 |
- { |
3983 |
- (yyval.val_int) = true; |
3984 |
- break; |
3985 |
- } |
3986 |
- } |
3987 |
- } |
3988 |
-#line 1558 "expr_bool.cc" |
3989 |
- break; |
3990 |
- |
3991 |
- case 14: |
3992 |
-#line 199 "expr_bool.y" |
3993 |
- { |
3994 |
- std::string val; |
3995 |
- int rc; |
3996 |
- |
3997 |
- rc = oxml->search((yyvsp[-2].val_str),val); |
3998 |
- (yyval.val_int) = (rc != 0 || (yyvsp[0].val_str)==0) ? false : fnmatch((yyvsp[0].val_str),val.c_str(),0)==0; |
3999 |
- } |
4000 |
-#line 1570 "expr_bool.cc" |
4001 |
- break; |
4002 |
- |
4003 |
- case 15: |
4004 |
-#line 207 "expr_bool.y" |
4005 |
- { |
4006 |
- std::string val; |
4007 |
- int rc; |
4008 |
- |
4009 |
- rc = oxml->search((yyvsp[-3].val_str),val); |
4010 |
- (yyval.val_int) = (rc != 0 || (yyvsp[0].val_str)==0) ? false : fnmatch((yyvsp[0].val_str),val.c_str(),0)!=0; |
4011 |
- } |
4012 |
-#line 1582 "expr_bool.cc" |
4013 |
- break; |
4014 |
- |
4015 |
- case 16: |
4016 |
-#line 215 "expr_bool.y" |
4017 |
- { |
4018 |
- std::vector<std::string> val; |
4019 |
- std::vector<std::string>::iterator it; |
4020 |
- |
4021 |
- (yyval.val_int) = false; |
4022 |
- |
4023 |
- if ( (yyvsp[0].val_str) != 0 ) |
4024 |
- { |
4025 |
- oxml->search((yyvsp[-3].val_str),val); |
4026 |
- |
4027 |
- for (it=val.begin(); it != val.end(); ++it) |
4028 |
- { |
4029 |
- if ( fnmatch((yyvsp[0].val_str), (*it).c_str(), 0) == 0 ) |
4030 |
- { |
4031 |
- (yyval.val_int) = true; |
4032 |
- break; |
4033 |
- } |
4034 |
- } |
4035 |
- } |
4036 |
- } |
4037 |
-#line 1607 "expr_bool.cc" |
4038 |
- break; |
4039 |
- |
4040 |
- case 17: |
4041 |
-#line 236 "expr_bool.y" |
4042 |
- { (yyval.val_int) = (yyvsp[-2].val_int) && (yyvsp[0].val_int); } |
4043 |
-#line 1613 "expr_bool.cc" |
4044 |
- break; |
4045 |
- |
4046 |
- case 18: |
4047 |
-#line 237 "expr_bool.y" |
4048 |
- { (yyval.val_int) = (yyvsp[-2].val_int) || (yyvsp[0].val_int); } |
4049 |
-#line 1619 "expr_bool.cc" |
4050 |
- break; |
4051 |
- |
4052 |
- case 19: |
4053 |
-#line 238 "expr_bool.y" |
4054 |
- { (yyval.val_int) = ! (yyvsp[0].val_int); } |
4055 |
-#line 1625 "expr_bool.cc" |
4056 |
- break; |
4057 |
- |
4058 |
- case 20: |
4059 |
-#line 239 "expr_bool.y" |
4060 |
- { (yyval.val_int) = (yyvsp[-1].val_int); } |
4061 |
-#line 1631 "expr_bool.cc" |
4062 |
- break; |
4063 |
- |
4064 |
- |
4065 |
-#line 1635 "expr_bool.cc" |
4066 |
- |
4067 |
- default: break; |
4068 |
- } |
4069 |
- /* User semantic actions sometimes alter yychar, and that requires |
4070 |
- that yytoken be updated with the new translation. We take the |
4071 |
- approach of translating immediately before every use of yytoken. |
4072 |
- One alternative is translating here after every semantic action, |
4073 |
- but that translation would be missed if the semantic action invokes |
4074 |
- YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or |
4075 |
- if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an |
4076 |
- incorrect destructor might then be invoked immediately. In the |
4077 |
- case of YYERROR or YYBACKUP, subsequent parser actions might lead |
4078 |
- to an incorrect destructor call or verbose syntax error message |
4079 |
- before the lookahead is translated. */ |
4080 |
- YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); |
4081 |
- |
4082 |
- YYPOPSTACK (yylen); |
4083 |
- yylen = 0; |
4084 |
- YY_STACK_PRINT (yyss, yyssp); |
4085 |
- |
4086 |
- *++yyvsp = yyval; |
4087 |
- *++yylsp = yyloc; |
4088 |
- |
4089 |
- /* Now 'shift' the result of the reduction. Determine what state |
4090 |
- that goes to, based on the state we popped back to and the rule |
4091 |
- number reduced by. */ |
4092 |
- { |
4093 |
- const int yylhs = yyr1[yyn] - YYNTOKENS; |
4094 |
- const int yyi = yypgoto[yylhs] + *yyssp; |
4095 |
- yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp |
4096 |
- ? yytable[yyi] |
4097 |
- : yydefgoto[yylhs]); |
4098 |
- } |
4099 |
- |
4100 |
- goto yynewstate; |
4101 |
- |
4102 |
- |
4103 |
-/*--------------------------------------. |
4104 |
-| yyerrlab -- here on detecting error. | |
4105 |
-`--------------------------------------*/ |
4106 |
-yyerrlab: |
4107 |
- /* Make sure we have latest lookahead translation. See comments at |
4108 |
- user semantic actions for why this is necessary. */ |
4109 |
- yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); |
4110 |
- |
4111 |
- /* If not already recovering from an error, report this error. */ |
4112 |
- if (!yyerrstatus) |
4113 |
- { |
4114 |
- ++yynerrs; |
4115 |
-#if ! YYERROR_VERBOSE |
4116 |
- yyerror (&yylloc, mc, oxml, result, error_msg, scanner, YY_("syntax error")); |
4117 |
-#else |
4118 |
-# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ |
4119 |
- yyssp, yytoken) |
4120 |
- { |
4121 |
- char const *yymsgp = YY_("syntax error"); |
4122 |
- int yysyntax_error_status; |
4123 |
- yysyntax_error_status = YYSYNTAX_ERROR; |
4124 |
- if (yysyntax_error_status == 0) |
4125 |
- yymsgp = yymsg; |
4126 |
- else if (yysyntax_error_status == 1) |
4127 |
- { |
4128 |
- if (yymsg != yymsgbuf) |
4129 |
- YYSTACK_FREE (yymsg); |
4130 |
- yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); |
4131 |
- if (!yymsg) |
4132 |
- { |
4133 |
- yymsg = yymsgbuf; |
4134 |
- yymsg_alloc = sizeof yymsgbuf; |
4135 |
- yysyntax_error_status = 2; |
4136 |
- } |
4137 |
- else |
4138 |
- { |
4139 |
- yysyntax_error_status = YYSYNTAX_ERROR; |
4140 |
- yymsgp = yymsg; |
4141 |
- } |
4142 |
- } |
4143 |
- yyerror (&yylloc, mc, oxml, result, error_msg, scanner, yymsgp); |
4144 |
- if (yysyntax_error_status == 2) |
4145 |
- goto yyexhaustedlab; |
4146 |
- } |
4147 |
-# undef YYSYNTAX_ERROR |
4148 |
-#endif |
4149 |
- } |
4150 |
- |
4151 |
- yyerror_range[1] = yylloc; |
4152 |
- |
4153 |
- if (yyerrstatus == 3) |
4154 |
- { |
4155 |
- /* If just tried and failed to reuse lookahead token after an |
4156 |
- error, discard it. */ |
4157 |
- |
4158 |
- if (yychar <= YYEOF) |
4159 |
- { |
4160 |
- /* Return failure if at end of input. */ |
4161 |
- if (yychar == YYEOF) |
4162 |
- YYABORT; |
4163 |
- } |
4164 |
- else |
4165 |
- { |
4166 |
- yydestruct ("Error: discarding", |
4167 |
- yytoken, &yylval, &yylloc, mc, oxml, result, error_msg, scanner); |
4168 |
- yychar = YYEMPTY; |
4169 |
- } |
4170 |
- } |
4171 |
- |
4172 |
- /* Else will try to reuse lookahead token after shifting the error |
4173 |
- token. */ |
4174 |
- goto yyerrlab1; |
4175 |
- |
4176 |
- |
4177 |
-/*---------------------------------------------------. |
4178 |
-| yyerrorlab -- error raised explicitly by YYERROR. | |
4179 |
-`---------------------------------------------------*/ |
4180 |
-yyerrorlab: |
4181 |
- /* Pacify compilers when the user code never invokes YYERROR and the |
4182 |
- label yyerrorlab therefore never appears in user code. */ |
4183 |
- if (0) |
4184 |
- YYERROR; |
4185 |
- |
4186 |
- /* Do not reclaim the symbols of the rule whose action triggered |
4187 |
- this YYERROR. */ |
4188 |
- YYPOPSTACK (yylen); |
4189 |
- yylen = 0; |
4190 |
- YY_STACK_PRINT (yyss, yyssp); |
4191 |
- yystate = *yyssp; |
4192 |
- goto yyerrlab1; |
4193 |
- |
4194 |
- |
4195 |
-/*-------------------------------------------------------------. |
4196 |
-| yyerrlab1 -- common code for both syntax error and YYERROR. | |
4197 |
-`-------------------------------------------------------------*/ |
4198 |
-yyerrlab1: |
4199 |
- yyerrstatus = 3; /* Each real token shifted decrements this. */ |
4200 |
- |
4201 |
- for (;;) |
4202 |
- { |
4203 |
- yyn = yypact[yystate]; |
4204 |
- if (!yypact_value_is_default (yyn)) |
4205 |
- { |
4206 |
- yyn += YYTERROR; |
4207 |
- if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) |
4208 |
- { |
4209 |
- yyn = yytable[yyn]; |
4210 |
- if (0 < yyn) |
4211 |
- break; |
4212 |
- } |
4213 |
- } |
4214 |
- |
4215 |
- /* Pop the current state because it cannot handle the error token. */ |
4216 |
- if (yyssp == yyss) |
4217 |
- YYABORT; |
4218 |
- |
4219 |
- yyerror_range[1] = *yylsp; |
4220 |
- yydestruct ("Error: popping", |
4221 |
- yystos[yystate], yyvsp, yylsp, mc, oxml, result, error_msg, scanner); |
4222 |
- YYPOPSTACK (1); |
4223 |
- yystate = *yyssp; |
4224 |
- YY_STACK_PRINT (yyss, yyssp); |
4225 |
- } |
4226 |
- |
4227 |
- YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
4228 |
- *++yyvsp = yylval; |
4229 |
- YY_IGNORE_MAYBE_UNINITIALIZED_END |
4230 |
- |
4231 |
- yyerror_range[2] = yylloc; |
4232 |
- /* Using YYLLOC is tempting, but would change the location of |
4233 |
- the lookahead. YYLOC is available though. */ |
4234 |
- YYLLOC_DEFAULT (yyloc, yyerror_range, 2); |
4235 |
- *++yylsp = yyloc; |
4236 |
- |
4237 |
- /* Shift the error token. */ |
4238 |
- YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); |
4239 |
- |
4240 |
- yystate = yyn; |
4241 |
- goto yynewstate; |
4242 |
- |
4243 |
- |
4244 |
-/*-------------------------------------. |
4245 |
-| yyacceptlab -- YYACCEPT comes here. | |
4246 |
-`-------------------------------------*/ |
4247 |
-yyacceptlab: |
4248 |
- yyresult = 0; |
4249 |
- goto yyreturn; |
4250 |
- |
4251 |
- |
4252 |
-/*-----------------------------------. |
4253 |
-| yyabortlab -- YYABORT comes here. | |
4254 |
-`-----------------------------------*/ |
4255 |
-yyabortlab: |
4256 |
- yyresult = 1; |
4257 |
- goto yyreturn; |
4258 |
- |
4259 |
- |
4260 |
-#if !defined yyoverflow || YYERROR_VERBOSE |
4261 |
-/*-------------------------------------------------. |
4262 |
-| yyexhaustedlab -- memory exhaustion comes here. | |
4263 |
-`-------------------------------------------------*/ |
4264 |
-yyexhaustedlab: |
4265 |
- yyerror (&yylloc, mc, oxml, result, error_msg, scanner, YY_("memory exhausted")); |
4266 |
- yyresult = 2; |
4267 |
- /* Fall through. */ |
4268 |
-#endif |
4269 |
- |
4270 |
- |
4271 |
-/*-----------------------------------------------------. |
4272 |
-| yyreturn -- parsing is finished, return the result. | |
4273 |
-`-----------------------------------------------------*/ |
4274 |
-yyreturn: |
4275 |
- if (yychar != YYEMPTY) |
4276 |
- { |
4277 |
- /* Make sure we have latest lookahead translation. See comments at |
4278 |
- user semantic actions for why this is necessary. */ |
4279 |
- yytoken = YYTRANSLATE (yychar); |
4280 |
- yydestruct ("Cleanup: discarding lookahead", |
4281 |
- yytoken, &yylval, &yylloc, mc, oxml, result, error_msg, scanner); |
4282 |
- } |
4283 |
- /* Do not reclaim the symbols of the rule whose action triggered |
4284 |
- this YYABORT or YYACCEPT. */ |
4285 |
- YYPOPSTACK (yylen); |
4286 |
- YY_STACK_PRINT (yyss, yyssp); |
4287 |
- while (yyssp != yyss) |
4288 |
- { |
4289 |
- yydestruct ("Cleanup: popping", |
4290 |
- yystos[*yyssp], yyvsp, yylsp, mc, oxml, result, error_msg, scanner); |
4291 |
- YYPOPSTACK (1); |
4292 |
- } |
4293 |
-#ifndef yyoverflow |
4294 |
- if (yyss != yyssa) |
4295 |
- YYSTACK_FREE (yyss); |
4296 |
-#endif |
4297 |
-#if YYERROR_VERBOSE |
4298 |
- if (yymsg != yymsgbuf) |
4299 |
- YYSTACK_FREE (yymsg); |
4300 |
-#endif |
4301 |
- return yyresult; |
4302 |
-} |
4303 |
-#line 242 "expr_bool.y" |
4304 |
- |
4305 |
- |
4306 |
-void expr_bool_error( |
4307 |
- YYLTYPE * llocp, |
4308 |
- mem_collector * mc, |
4309 |
- ObjectXML * oxml, |
4310 |
- bool& result, |
4311 |
- char ** error_msg, |
4312 |
- yyscan_t scanner, |
4313 |
- const char * str) |
4314 |
-{ |
4315 |
- int length; |
4316 |
- |
4317 |
- length = strlen(str)+ 64; |
4318 |
- |
4319 |
- *error_msg = (char *) malloc(sizeof(char)*length); |
4320 |
- |
4321 |
- if (*error_msg != 0) |
4322 |
- { |
4323 |
- snprintf(*error_msg, |
4324 |
- length, |
4325 |
- "%s at line %i, columns %i:%i", |
4326 |
- str, |
4327 |
- llocp->first_line, |
4328 |
- llocp->first_column, |
4329 |
- llocp->last_column); |
4330 |
- } |
4331 |
- |
4332 |
- result = false; |
4333 |
-} |
4334 |
|
4335 |
diff --git a/app-emulation/opennebula/files/opennebula-5.10.1/parsers/expr_bool.h b/app-emulation/opennebula/files/opennebula-5.10.1/parsers/expr_bool.h |
4336 |
deleted file mode 100644 |
4337 |
index e179ddb..0000000 |
4338 |
--- a/app-emulation/opennebula/files/opennebula-5.10.1/parsers/expr_bool.h |
4339 |
+++ /dev/null |
4340 |
@@ -1,118 +0,0 @@ |
4341 |
-/* A Bison parser, made by GNU Bison 3.4.1. */ |
4342 |
- |
4343 |
-/* Bison interface for Yacc-like parsers in C |
4344 |
- |
4345 |
- Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2019 Free Software Foundation, |
4346 |
- Inc. |
4347 |
- |
4348 |
- This program is free software: you can redistribute it and/or modify |
4349 |
- it under the terms of the GNU General Public License as published by |
4350 |
- the Free Software Foundation, either version 3 of the License, or |
4351 |
- (at your option) any later version. |
4352 |
- |
4353 |
- This program is distributed in the hope that it will be useful, |
4354 |
- but WITHOUT ANY WARRANTY; without even the implied warranty of |
4355 |
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
4356 |
- GNU General Public License for more details. |
4357 |
- |
4358 |
- You should have received a copy of the GNU General Public License |
4359 |
- along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
4360 |
- |
4361 |
-/* As a special exception, you may create a larger work that contains |
4362 |
- part or all of the Bison parser skeleton and distribute that work |
4363 |
- under terms of your choice, so long as that work isn't itself a |
4364 |
- parser generator using the skeleton or a modified version thereof |
4365 |
- as a parser skeleton. Alternatively, if you modify or redistribute |
4366 |
- the parser skeleton itself, you may (at your option) remove this |
4367 |
- special exception, which will cause the skeleton and the resulting |
4368 |
- Bison output files to be licensed under the GNU General Public |
4369 |
- License without this special exception. |
4370 |
- |
4371 |
- This special exception was added by the Free Software Foundation in |
4372 |
- version 2.2 of Bison. */ |
4373 |
- |
4374 |
-/* Undocumented macros, especially those whose name start with YY_, |
4375 |
- are private implementation details. Do not rely on them. */ |
4376 |
- |
4377 |
-#ifndef YY_EXPR_BOOL_EXPR_BOOL_HH_INCLUDED |
4378 |
-# define YY_EXPR_BOOL_EXPR_BOOL_HH_INCLUDED |
4379 |
-/* Debug traces. */ |
4380 |
-#ifndef YYDEBUG |
4381 |
-# define YYDEBUG 0 |
4382 |
-#endif |
4383 |
-#if YYDEBUG |
4384 |
-extern int expr_bool_debug; |
4385 |
-#endif |
4386 |
-/* "%code requires" blocks. */ |
4387 |
-#line 48 "expr_bool.y" |
4388 |
- |
4389 |
-#include <iostream> |
4390 |
-#include <sstream> |
4391 |
-#include <string> |
4392 |
-#include <vector> |
4393 |
-#include <algorithm> |
4394 |
-#include <set> |
4395 |
- |
4396 |
-#include <ctype.h> |
4397 |
-#include <string.h> |
4398 |
-#include <fnmatch.h> |
4399 |
- |
4400 |
-#include "mem_collector.h" |
4401 |
- |
4402 |
-#include "ObjectXML.h" |
4403 |
- |
4404 |
-typedef void * yyscan_t; |
4405 |
- |
4406 |
-int expr_bool_parse(ObjectXML *oxml, bool& result, char ** errmsg, |
4407 |
- yyscan_t scanner); |
4408 |
- |
4409 |
-#line 70 "expr_bool.hh" |
4410 |
- |
4411 |
-/* Token type. */ |
4412 |
-#ifndef YYTOKENTYPE |
4413 |
-# define YYTOKENTYPE |
4414 |
- enum yytokentype |
4415 |
- { |
4416 |
- INTEGER = 258, |
4417 |
- STRING = 259, |
4418 |
- FLOAT = 260 |
4419 |
- }; |
4420 |
-#endif |
4421 |
- |
4422 |
-/* Value type. */ |
4423 |
-#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED |
4424 |
-union YYSTYPE |
4425 |
-{ |
4426 |
-#line 79 "expr_bool.y" |
4427 |
- |
4428 |
- char * val_str; |
4429 |
- int val_int; |
4430 |
- float val_float; |
4431 |
- |
4432 |
-#line 93 "expr_bool.hh" |
4433 |
- |
4434 |
-}; |
4435 |
-typedef union YYSTYPE YYSTYPE; |
4436 |
-# define YYSTYPE_IS_TRIVIAL 1 |
4437 |
-# define YYSTYPE_IS_DECLARED 1 |
4438 |
-#endif |
4439 |
- |
4440 |
-/* Location type. */ |
4441 |
-#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED |
4442 |
-typedef struct YYLTYPE YYLTYPE; |
4443 |
-struct YYLTYPE |
4444 |
-{ |
4445 |
- int first_line; |
4446 |
- int first_column; |
4447 |
- int last_line; |
4448 |
- int last_column; |
4449 |
-}; |
4450 |
-# define YYLTYPE_IS_DECLARED 1 |
4451 |
-# define YYLTYPE_IS_TRIVIAL 1 |
4452 |
-#endif |
4453 |
- |
4454 |
- |
4455 |
- |
4456 |
-int expr_bool_parse (mem_collector * mc, ObjectXML * oxml, bool& result, char ** error_msg, yyscan_t scanner); |
4457 |
- |
4458 |
-#endif /* !YY_EXPR_BOOL_EXPR_BOOL_HH_INCLUDED */ |
4459 |
|
4460 |
diff --git a/app-emulation/opennebula/files/opennebula-5.10.1/parsers/expr_bool.y b/app-emulation/opennebula/files/opennebula-5.10.1/parsers/expr_bool.y |
4461 |
deleted file mode 100644 |
4462 |
index 17bdd16..0000000 |
4463 |
--- a/app-emulation/opennebula/files/opennebula-5.10.1/parsers/expr_bool.y |
4464 |
+++ /dev/null |
4465 |
@@ -1,271 +0,0 @@ |
4466 |
-/* -------------------------------------------------------------------------- */ |
4467 |
-/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */ |
4468 |
-/* */ |
4469 |
-/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ |
4470 |
-/* not use this file except in compliance with the License. You may obtain */ |
4471 |
-/* a copy of the License at */ |
4472 |
-/* */ |
4473 |
-/* http://www.apache.org/licenses/LICENSE-2.0 */ |
4474 |
-/* */ |
4475 |
-/* Unless required by applicable law or agreed to in writing, software */ |
4476 |
-/* distributed under the License is distributed on an "AS IS" BASIS, */ |
4477 |
-/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ |
4478 |
-/* See the License for the specific language governing permissions and */ |
4479 |
-/* limitations under the License. */ |
4480 |
-/* -------------------------------------------------------------------------- */ |
4481 |
- |
4482 |
- |
4483 |
-%{ |
4484 |
-#include "expr_bool.h" |
4485 |
-#include "expr_parser.h" |
4486 |
- |
4487 |
-#define YYERROR_VERBOSE |
4488 |
-#define expr_bool_lex expr_lex |
4489 |
- |
4490 |
-void expr_bool_error(YYLTYPE * llocp, mem_collector * mc, ObjectXML * oxml, |
4491 |
- bool& result, char ** error_msg, yyscan_t scanner, const char * str); |
4492 |
- |
4493 |
-int expr_bool_lex (YYSTYPE *lvalp, YYLTYPE *llocp, mem_collector * mc, |
4494 |
- yyscan_t scanner); |
4495 |
- |
4496 |
-int expr_bool_parse(ObjectXML *oxml, bool& result, char ** errmsg, |
4497 |
- yyscan_t scanner) |
4498 |
-{ |
4499 |
- mem_collector mc; |
4500 |
- int rc; |
4501 |
- |
4502 |
- mem_collector_init(&mc); |
4503 |
- |
4504 |
- rc = expr_bool_parse(&mc, oxml, result, errmsg, scanner); |
4505 |
- |
4506 |
- mem_collector_cleanup(&mc); |
4507 |
- |
4508 |
- return rc; |
4509 |
-} |
4510 |
- |
4511 |
-%} |
4512 |
- |
4513 |
-%code requires { |
4514 |
-#include <iostream> |
4515 |
-#include <sstream> |
4516 |
-#include <string> |
4517 |
-#include <vector> |
4518 |
-#include <algorithm> |
4519 |
-#include <set> |
4520 |
- |
4521 |
-#include <ctype.h> |
4522 |
-#include <string.h> |
4523 |
-#include <fnmatch.h> |
4524 |
- |
4525 |
-#include "mem_collector.h" |
4526 |
- |
4527 |
-#include "ObjectXML.h" |
4528 |
- |
4529 |
-typedef void * yyscan_t; |
4530 |
- |
4531 |
-int expr_bool_parse(ObjectXML *oxml, bool& result, char ** errmsg, |
4532 |
- yyscan_t scanner); |
4533 |
-} |
4534 |
- |
4535 |
-%parse-param {mem_collector * mc} |
4536 |
-%parse-param {ObjectXML * oxml} |
4537 |
-%parse-param {bool& result} |
4538 |
-%parse-param {char ** error_msg} |
4539 |
-%parse-param {yyscan_t scanner} |
4540 |
- |
4541 |
-%lex-param {mem_collector * mc} |
4542 |
-%lex-param {yyscan_t scanner} |
4543 |
- |
4544 |
-%union { |
4545 |
- char * val_str; |
4546 |
- int val_int; |
4547 |
- float val_float; |
4548 |
-}; |
4549 |
- |
4550 |
-%defines |
4551 |
-%locations |
4552 |
-%pure-parser |
4553 |
-%name-prefix "expr_bool_" |
4554 |
-%output "expr_bool.cc" |
4555 |
- |
4556 |
-%left '!' '&' '|' |
4557 |
-%token <val_int> INTEGER |
4558 |
-%token <val_str> STRING |
4559 |
-%token <val_float> FLOAT |
4560 |
-%type <val_int> stmt expr |
4561 |
- |
4562 |
-%% |
4563 |
- |
4564 |
-stmt: expr { result=$1; } |
4565 |
- | { result=true; } /* TRUE BY DEFAULT, ON EMPTY STRINGS */ |
4566 |
- ; |
4567 |
- |
4568 |
-expr: STRING '=' INTEGER { |
4569 |
- int val = $3; |
4570 |
- int rc; |
4571 |
- |
4572 |
- rc = oxml->search($1,val); |
4573 |
- |
4574 |
- $$ = (rc == 0 && val == $3); |
4575 |
- } |
4576 |
- |
4577 |
- | STRING '!' '=' INTEGER { |
4578 |
- int val = $4; |
4579 |
- int rc; |
4580 |
- |
4581 |
- rc = oxml->search($1,val); |
4582 |
- |
4583 |
- $$ = (rc == 0 && val != $4); |
4584 |
- } |
4585 |
- |
4586 |
- | STRING '>' INTEGER { |
4587 |
- int val, rc; |
4588 |
- |
4589 |
- rc = oxml->search($1,val); |
4590 |
- $$ = (rc == 0 && val > $3); |
4591 |
- } |
4592 |
- |
4593 |
- | STRING '<' INTEGER { |
4594 |
- int val, rc; |
4595 |
- |
4596 |
- rc = oxml->search($1,val); |
4597 |
- $$ = (rc == 0 && val < $3); |
4598 |
- } |
4599 |
- |
4600 |
- | STRING '@''>' INTEGER { |
4601 |
- std::vector<int> val; |
4602 |
- std::vector<int>::iterator it; |
4603 |
- |
4604 |
- $$ = false; |
4605 |
- |
4606 |
- oxml->search($1,val); |
4607 |
- |
4608 |
- for (it=val.begin(); it != val.end(); ++it) |
4609 |
- { |
4610 |
- if ($4 == *it) |
4611 |
- { |
4612 |
- $$ = true; |
4613 |
- break; |
4614 |
- } |
4615 |
- } |
4616 |
- } |
4617 |
- |
4618 |
- | STRING '=' FLOAT { |
4619 |
- float val, rc; |
4620 |
- |
4621 |
- rc = oxml->search($1,val); |
4622 |
- $$ = (rc == 0 && val == $3); |
4623 |
- } |
4624 |
- |
4625 |
- | STRING '!' '=' FLOAT { |
4626 |
- float val, rc; |
4627 |
- |
4628 |
- rc = oxml->search($1,val); |
4629 |
- $$ = (rc == 0 && val != $4); |
4630 |
- } |
4631 |
- |
4632 |
- | STRING '>' FLOAT { |
4633 |
- float val, rc; |
4634 |
- |
4635 |
- rc = oxml->search($1,val); |
4636 |
- $$ = (rc == 0 && val > $3); |
4637 |
- } |
4638 |
- |
4639 |
- | STRING '<' FLOAT { |
4640 |
- float val, rc; |
4641 |
- |
4642 |
- rc = oxml->search($1,val); |
4643 |
- $$ = (rc == 0 && val < $3); |
4644 |
- } |
4645 |
- |
4646 |
- | STRING '@''>' FLOAT { |
4647 |
- std::vector<float> val; |
4648 |
- std::vector<float>::iterator it; |
4649 |
- |
4650 |
- $$ = false; |
4651 |
- |
4652 |
- oxml->search($1,val); |
4653 |
- |
4654 |
- for (it=val.begin(); it != val.end(); ++it) |
4655 |
- { |
4656 |
- if ($4 == *it) |
4657 |
- { |
4658 |
- $$ = true; |
4659 |
- break; |
4660 |
- } |
4661 |
- } |
4662 |
- } |
4663 |
- |
4664 |
- | STRING '=' STRING { |
4665 |
- std::string val; |
4666 |
- int rc; |
4667 |
- |
4668 |
- rc = oxml->search($1,val); |
4669 |
- $$ = (rc != 0 || $3==0) ? false : fnmatch($3,val.c_str(),0)==0; |
4670 |
- } |
4671 |
- |
4672 |
- | STRING '!''=' STRING { |
4673 |
- std::string val; |
4674 |
- int rc; |
4675 |
- |
4676 |
- rc = oxml->search($1,val); |
4677 |
- $$ = (rc != 0 || $4==0) ? false : fnmatch($4,val.c_str(),0)!=0; |
4678 |
- } |
4679 |
- |
4680 |
- | STRING '@''>' STRING { |
4681 |
- std::vector<std::string> val; |
4682 |
- std::vector<std::string>::iterator it; |
4683 |
- |
4684 |
- $$ = false; |
4685 |
- |
4686 |
- if ( $4 != 0 ) |
4687 |
- { |
4688 |
- oxml->search($1,val); |
4689 |
- |
4690 |
- for (it=val.begin(); it != val.end(); ++it) |
4691 |
- { |
4692 |
- if ( fnmatch($4, (*it).c_str(), 0) == 0 ) |
4693 |
- { |
4694 |
- $$ = true; |
4695 |
- break; |
4696 |
- } |
4697 |
- } |
4698 |
- } |
4699 |
- } |
4700 |
- |
4701 |
- | expr '&' expr { $$ = $1 && $3; } |
4702 |
- | expr '|' expr { $$ = $1 || $3; } |
4703 |
- | '!' expr { $$ = ! $2; } |
4704 |
- | '(' expr ')' { $$ = $2; } |
4705 |
- ; |
4706 |
- |
4707 |
-%% |
4708 |
- |
4709 |
-void expr_bool_error( |
4710 |
- YYLTYPE * llocp, |
4711 |
- mem_collector * mc, |
4712 |
- ObjectXML * oxml, |
4713 |
- bool& result, |
4714 |
- char ** error_msg, |
4715 |
- yyscan_t scanner, |
4716 |
- const char * str) |
4717 |
-{ |
4718 |
- int length; |
4719 |
- |
4720 |
- length = strlen(str)+ 64; |
4721 |
- |
4722 |
- *error_msg = (char *) malloc(sizeof(char)*length); |
4723 |
- |
4724 |
- if (*error_msg != 0) |
4725 |
- { |
4726 |
- snprintf(*error_msg, |
4727 |
- length, |
4728 |
- "%s at line %i, columns %i:%i", |
4729 |
- str, |
4730 |
- llocp->first_line, |
4731 |
- llocp->first_column, |
4732 |
- llocp->last_column); |
4733 |
- } |
4734 |
- |
4735 |
- result = false; |
4736 |
-} |
4737 |
|
4738 |
diff --git a/app-emulation/opennebula/files/opennebula-5.10.1/parsers/expr_parser.cc b/app-emulation/opennebula/files/opennebula-5.10.1/parsers/expr_parser.cc |
4739 |
deleted file mode 100644 |
4740 |
index 5809272..0000000 |
4741 |
--- a/app-emulation/opennebula/files/opennebula-5.10.1/parsers/expr_parser.cc |
4742 |
+++ /dev/null |
4743 |
@@ -1,2260 +0,0 @@ |
4744 |
-#line 1 "expr_parser.cc" |
4745 |
- |
4746 |
-#line 3 "expr_parser.cc" |
4747 |
- |
4748 |
-#define YY_INT_ALIGNED short int |
4749 |
- |
4750 |
-/* A lexical scanner generated by flex */ |
4751 |
- |
4752 |
-#define FLEX_SCANNER |
4753 |
-#define YY_FLEX_MAJOR_VERSION 2 |
4754 |
-#define YY_FLEX_MINOR_VERSION 6 |
4755 |
-#define YY_FLEX_SUBMINOR_VERSION 4 |
4756 |
-#if YY_FLEX_SUBMINOR_VERSION > 0 |
4757 |
-#define FLEX_BETA |
4758 |
-#endif |
4759 |
- |
4760 |
-#ifdef yy_create_buffer |
4761 |
-#define expr__create_buffer_ALREADY_DEFINED |
4762 |
-#else |
4763 |
-#define yy_create_buffer expr__create_buffer |
4764 |
-#endif |
4765 |
- |
4766 |
-#ifdef yy_delete_buffer |
4767 |
-#define expr__delete_buffer_ALREADY_DEFINED |
4768 |
-#else |
4769 |
-#define yy_delete_buffer expr__delete_buffer |
4770 |
-#endif |
4771 |
- |
4772 |
-#ifdef yy_scan_buffer |
4773 |
-#define expr__scan_buffer_ALREADY_DEFINED |
4774 |
-#else |
4775 |
-#define yy_scan_buffer expr__scan_buffer |
4776 |
-#endif |
4777 |
- |
4778 |
-#ifdef yy_scan_string |
4779 |
-#define expr__scan_string_ALREADY_DEFINED |
4780 |
-#else |
4781 |
-#define yy_scan_string expr__scan_string |
4782 |
-#endif |
4783 |
- |
4784 |
-#ifdef yy_scan_bytes |
4785 |
-#define expr__scan_bytes_ALREADY_DEFINED |
4786 |
-#else |
4787 |
-#define yy_scan_bytes expr__scan_bytes |
4788 |
-#endif |
4789 |
- |
4790 |
-#ifdef yy_init_buffer |
4791 |
-#define expr__init_buffer_ALREADY_DEFINED |
4792 |
-#else |
4793 |
-#define yy_init_buffer expr__init_buffer |
4794 |
-#endif |
4795 |
- |
4796 |
-#ifdef yy_flush_buffer |
4797 |
-#define expr__flush_buffer_ALREADY_DEFINED |
4798 |
-#else |
4799 |
-#define yy_flush_buffer expr__flush_buffer |
4800 |
-#endif |
4801 |
- |
4802 |
-#ifdef yy_load_buffer_state |
4803 |
-#define expr__load_buffer_state_ALREADY_DEFINED |
4804 |
-#else |
4805 |
-#define yy_load_buffer_state expr__load_buffer_state |
4806 |
-#endif |
4807 |
- |
4808 |
-#ifdef yy_switch_to_buffer |
4809 |
-#define expr__switch_to_buffer_ALREADY_DEFINED |
4810 |
-#else |
4811 |
-#define yy_switch_to_buffer expr__switch_to_buffer |
4812 |
-#endif |
4813 |
- |
4814 |
-#ifdef yypush_buffer_state |
4815 |
-#define expr_push_buffer_state_ALREADY_DEFINED |
4816 |
-#else |
4817 |
-#define yypush_buffer_state expr_push_buffer_state |
4818 |
-#endif |
4819 |
- |
4820 |
-#ifdef yypop_buffer_state |
4821 |
-#define expr_pop_buffer_state_ALREADY_DEFINED |
4822 |
-#else |
4823 |
-#define yypop_buffer_state expr_pop_buffer_state |
4824 |
-#endif |
4825 |
- |
4826 |
-#ifdef yyensure_buffer_stack |
4827 |
-#define expr_ensure_buffer_stack_ALREADY_DEFINED |
4828 |
-#else |
4829 |
-#define yyensure_buffer_stack expr_ensure_buffer_stack |
4830 |
-#endif |
4831 |
- |
4832 |
-#ifdef yylex |
4833 |
-#define expr_lex_ALREADY_DEFINED |
4834 |
-#else |
4835 |
-#define yylex expr_lex |
4836 |
-#endif |
4837 |
- |
4838 |
-#ifdef yyrestart |
4839 |
-#define expr_restart_ALREADY_DEFINED |
4840 |
-#else |
4841 |
-#define yyrestart expr_restart |
4842 |
-#endif |
4843 |
- |
4844 |
-#ifdef yylex_init |
4845 |
-#define expr_lex_init_ALREADY_DEFINED |
4846 |
-#else |
4847 |
-#define yylex_init expr_lex_init |
4848 |
-#endif |
4849 |
- |
4850 |
-#ifdef yylex_init_extra |
4851 |
-#define expr_lex_init_extra_ALREADY_DEFINED |
4852 |
-#else |
4853 |
-#define yylex_init_extra expr_lex_init_extra |
4854 |
-#endif |
4855 |
- |
4856 |
-#ifdef yylex_destroy |
4857 |
-#define expr_lex_destroy_ALREADY_DEFINED |
4858 |
-#else |
4859 |
-#define yylex_destroy expr_lex_destroy |
4860 |
-#endif |
4861 |
- |
4862 |
-#ifdef yyget_debug |
4863 |
-#define expr_get_debug_ALREADY_DEFINED |
4864 |
-#else |
4865 |
-#define yyget_debug expr_get_debug |
4866 |
-#endif |
4867 |
- |
4868 |
-#ifdef yyset_debug |
4869 |
-#define expr_set_debug_ALREADY_DEFINED |
4870 |
-#else |
4871 |
-#define yyset_debug expr_set_debug |
4872 |
-#endif |
4873 |
- |
4874 |
-#ifdef yyget_extra |
4875 |
-#define expr_get_extra_ALREADY_DEFINED |
4876 |
-#else |
4877 |
-#define yyget_extra expr_get_extra |
4878 |
-#endif |
4879 |
- |
4880 |
-#ifdef yyset_extra |
4881 |
-#define expr_set_extra_ALREADY_DEFINED |
4882 |
-#else |
4883 |
-#define yyset_extra expr_set_extra |
4884 |
-#endif |
4885 |
- |
4886 |
-#ifdef yyget_in |
4887 |
-#define expr_get_in_ALREADY_DEFINED |
4888 |
-#else |
4889 |
-#define yyget_in expr_get_in |
4890 |
-#endif |
4891 |
- |
4892 |
-#ifdef yyset_in |
4893 |
-#define expr_set_in_ALREADY_DEFINED |
4894 |
-#else |
4895 |
-#define yyset_in expr_set_in |
4896 |
-#endif |
4897 |
- |
4898 |
-#ifdef yyget_out |
4899 |
-#define expr_get_out_ALREADY_DEFINED |
4900 |
-#else |
4901 |
-#define yyget_out expr_get_out |
4902 |
-#endif |
4903 |
- |
4904 |
-#ifdef yyset_out |
4905 |
-#define expr_set_out_ALREADY_DEFINED |
4906 |
-#else |
4907 |
-#define yyset_out expr_set_out |
4908 |
-#endif |
4909 |
- |
4910 |
-#ifdef yyget_leng |
4911 |
-#define expr_get_leng_ALREADY_DEFINED |
4912 |
-#else |
4913 |
-#define yyget_leng expr_get_leng |
4914 |
-#endif |
4915 |
- |
4916 |
-#ifdef yyget_text |
4917 |
-#define expr_get_text_ALREADY_DEFINED |
4918 |
-#else |
4919 |
-#define yyget_text expr_get_text |
4920 |
-#endif |
4921 |
- |
4922 |
-#ifdef yyget_lineno |
4923 |
-#define expr_get_lineno_ALREADY_DEFINED |
4924 |
-#else |
4925 |
-#define yyget_lineno expr_get_lineno |
4926 |
-#endif |
4927 |
- |
4928 |
-#ifdef yyset_lineno |
4929 |
-#define expr_set_lineno_ALREADY_DEFINED |
4930 |
-#else |
4931 |
-#define yyset_lineno expr_set_lineno |
4932 |
-#endif |
4933 |
- |
4934 |
-#ifdef yyget_column |
4935 |
-#define expr_get_column_ALREADY_DEFINED |
4936 |
-#else |
4937 |
-#define yyget_column expr_get_column |
4938 |
-#endif |
4939 |
- |
4940 |
-#ifdef yyset_column |
4941 |
-#define expr_set_column_ALREADY_DEFINED |
4942 |
-#else |
4943 |
-#define yyset_column expr_set_column |
4944 |
-#endif |
4945 |
- |
4946 |
-#ifdef yywrap |
4947 |
-#define expr_wrap_ALREADY_DEFINED |
4948 |
-#else |
4949 |
-#define yywrap expr_wrap |
4950 |
-#endif |
4951 |
- |
4952 |
-#ifdef yyget_lval |
4953 |
-#define expr_get_lval_ALREADY_DEFINED |
4954 |
-#else |
4955 |
-#define yyget_lval expr_get_lval |
4956 |
-#endif |
4957 |
- |
4958 |
-#ifdef yyset_lval |
4959 |
-#define expr_set_lval_ALREADY_DEFINED |
4960 |
-#else |
4961 |
-#define yyset_lval expr_set_lval |
4962 |
-#endif |
4963 |
- |
4964 |
-#ifdef yyalloc |
4965 |
-#define expr_alloc_ALREADY_DEFINED |
4966 |
-#else |
4967 |
-#define yyalloc expr_alloc |
4968 |
-#endif |
4969 |
- |
4970 |
-#ifdef yyrealloc |
4971 |
-#define expr_realloc_ALREADY_DEFINED |
4972 |
-#else |
4973 |
-#define yyrealloc expr_realloc |
4974 |
-#endif |
4975 |
- |
4976 |
-#ifdef yyfree |
4977 |
-#define expr_free_ALREADY_DEFINED |
4978 |
-#else |
4979 |
-#define yyfree expr_free |
4980 |
-#endif |
4981 |
- |
4982 |
-/* First, we deal with platform-specific or compiler-specific issues. */ |
4983 |
- |
4984 |
-/* begin standard C headers. */ |
4985 |
-#include <stdio.h> |
4986 |
-#include <string.h> |
4987 |
-#include <errno.h> |
4988 |
-#include <stdlib.h> |
4989 |
- |
4990 |
-/* end standard C headers. */ |
4991 |
- |
4992 |
-/* flex integer type definitions */ |
4993 |
- |
4994 |
-#ifndef FLEXINT_H |
4995 |
-#define FLEXINT_H |
4996 |
- |
4997 |
-/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */ |
4998 |
- |
4999 |
-#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L |
5000 |
- |
5001 |
-/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, |
5002 |
- * if you want the limit (max/min) macros for int types. |
5003 |
- */ |
5004 |
-#ifndef __STDC_LIMIT_MACROS |
5005 |
-#define __STDC_LIMIT_MACROS 1 |
5006 |
-#endif |
5007 |
- |
5008 |
-#include <inttypes.h> |
5009 |
-typedef int8_t flex_int8_t; |
5010 |
-typedef uint8_t flex_uint8_t; |
5011 |
-typedef int16_t flex_int16_t; |
5012 |
-typedef uint16_t flex_uint16_t; |
5013 |
-typedef int32_t flex_int32_t; |
5014 |
-typedef uint32_t flex_uint32_t; |
5015 |
-#else |
5016 |
-typedef signed char flex_int8_t; |
5017 |
-typedef short int flex_int16_t; |
5018 |
-typedef int flex_int32_t; |
5019 |
-typedef unsigned char flex_uint8_t; |
5020 |
-typedef unsigned short int flex_uint16_t; |
5021 |
-typedef unsigned int flex_uint32_t; |
5022 |
- |
5023 |
-/* Limits of integral types. */ |
5024 |
-#ifndef INT8_MIN |
5025 |
-#define INT8_MIN (-128) |
5026 |
-#endif |
5027 |
-#ifndef INT16_MIN |
5028 |
-#define INT16_MIN (-32767-1) |
5029 |
-#endif |
5030 |
-#ifndef INT32_MIN |
5031 |
-#define INT32_MIN (-2147483647-1) |
5032 |
-#endif |
5033 |
-#ifndef INT8_MAX |
5034 |
-#define INT8_MAX (127) |
5035 |
-#endif |
5036 |
-#ifndef INT16_MAX |
5037 |
-#define INT16_MAX (32767) |
5038 |
-#endif |
5039 |
-#ifndef INT32_MAX |
5040 |
-#define INT32_MAX (2147483647) |
5041 |
-#endif |
5042 |
-#ifndef UINT8_MAX |
5043 |
-#define UINT8_MAX (255U) |
5044 |
-#endif |
5045 |
-#ifndef UINT16_MAX |
5046 |
-#define UINT16_MAX (65535U) |
5047 |
-#endif |
5048 |
-#ifndef UINT32_MAX |
5049 |
-#define UINT32_MAX (4294967295U) |
5050 |
-#endif |
5051 |
- |
5052 |
-#ifndef SIZE_MAX |
5053 |
-#define SIZE_MAX (~(size_t)0) |
5054 |
-#endif |
5055 |
- |
5056 |
-#endif /* ! C99 */ |
5057 |
- |
5058 |
-#endif /* ! FLEXINT_H */ |
5059 |
- |
5060 |
-/* begin standard C++ headers. */ |
5061 |
- |
5062 |
-/* TODO: this is always defined, so inline it */ |
5063 |
-#define yyconst const |
5064 |
- |
5065 |
-#if defined(__GNUC__) && __GNUC__ >= 3 |
5066 |
-#define yynoreturn __attribute__((__noreturn__)) |
5067 |
-#else |
5068 |
-#define yynoreturn |
5069 |
-#endif |
5070 |
- |
5071 |
-/* Returned upon end-of-file. */ |
5072 |
-#define YY_NULL 0 |
5073 |
- |
5074 |
-/* Promotes a possibly negative, possibly signed char to an |
5075 |
- * integer in range [0..255] for use as an array index. |
5076 |
- */ |
5077 |
-#define YY_SC_TO_UI(c) ((YY_CHAR) (c)) |
5078 |
- |
5079 |
-/* An opaque pointer. */ |
5080 |
-#ifndef YY_TYPEDEF_YY_SCANNER_T |
5081 |
-#define YY_TYPEDEF_YY_SCANNER_T |
5082 |
-typedef void* yyscan_t; |
5083 |
-#endif |
5084 |
- |
5085 |
-/* For convenience, these vars (plus the bison vars far below) |
5086 |
- are macros in the reentrant scanner. */ |
5087 |
-#define yyin yyg->yyin_r |
5088 |
-#define yyout yyg->yyout_r |
5089 |
-#define yyextra yyg->yyextra_r |
5090 |
-#define yyleng yyg->yyleng_r |
5091 |
-#define yytext yyg->yytext_r |
5092 |
-#define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno) |
5093 |
-#define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column) |
5094 |
-#define yy_flex_debug yyg->yy_flex_debug_r |
5095 |
- |
5096 |
-/* Enter a start condition. This macro really ought to take a parameter, |
5097 |
- * but we do it the disgusting crufty way forced on us by the ()-less |
5098 |
- * definition of BEGIN. |
5099 |
- */ |
5100 |
-#define BEGIN yyg->yy_start = 1 + 2 * |
5101 |
-/* Translate the current start state into a value that can be later handed |
5102 |
- * to BEGIN to return to the state. The YYSTATE alias is for lex |
5103 |
- * compatibility. |
5104 |
- */ |
5105 |
-#define YY_START ((yyg->yy_start - 1) / 2) |
5106 |
-#define YYSTATE YY_START |
5107 |
-/* Action number for EOF rule of a given start state. */ |
5108 |
-#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) |
5109 |
-/* Special action meaning "start processing a new file". */ |
5110 |
-#define YY_NEW_FILE yyrestart( yyin , yyscanner ) |
5111 |
-#define YY_END_OF_BUFFER_CHAR 0 |
5112 |
- |
5113 |
-/* Size of default input buffer. */ |
5114 |
-#ifndef YY_BUF_SIZE |
5115 |
-#ifdef __ia64__ |
5116 |
-/* On IA-64, the buffer size is 16k, not 8k. |
5117 |
- * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. |
5118 |
- * Ditto for the __ia64__ case accordingly. |
5119 |
- */ |
5120 |
-#define YY_BUF_SIZE 32768 |
5121 |
-#else |
5122 |
-#define YY_BUF_SIZE 16384 |
5123 |
-#endif /* __ia64__ */ |
5124 |
-#endif |
5125 |
- |
5126 |
-/* The state buf must be large enough to hold one state per character in the main buffer. |
5127 |
- */ |
5128 |
-#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) |
5129 |
- |
5130 |
-#ifndef YY_TYPEDEF_YY_BUFFER_STATE |
5131 |
-#define YY_TYPEDEF_YY_BUFFER_STATE |
5132 |
-typedef struct yy_buffer_state *YY_BUFFER_STATE; |
5133 |
-#endif |
5134 |
- |
5135 |
-#ifndef YY_TYPEDEF_YY_SIZE_T |
5136 |
-#define YY_TYPEDEF_YY_SIZE_T |
5137 |
-typedef size_t yy_size_t; |
5138 |
-#endif |
5139 |
- |
5140 |
-#define EOB_ACT_CONTINUE_SCAN 0 |
5141 |
-#define EOB_ACT_END_OF_FILE 1 |
5142 |
-#define EOB_ACT_LAST_MATCH 2 |
5143 |
- |
5144 |
- /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires |
5145 |
- * access to the local variable yy_act. Since yyless() is a macro, it would break |
5146 |
- * existing scanners that call yyless() from OUTSIDE yylex. |
5147 |
- * One obvious solution it to make yy_act a global. I tried that, and saw |
5148 |
- * a 5% performance hit in a non-yylineno scanner, because yy_act is |
5149 |
- * normally declared as a register variable-- so it is not worth it. |
5150 |
- */ |
5151 |
- #define YY_LESS_LINENO(n) \ |
5152 |
- do { \ |
5153 |
- int yyl;\ |
5154 |
- for ( yyl = n; yyl < yyleng; ++yyl )\ |
5155 |
- if ( yytext[yyl] == '\n' )\ |
5156 |
- --yylineno;\ |
5157 |
- }while(0) |
5158 |
- #define YY_LINENO_REWIND_TO(dst) \ |
5159 |
- do {\ |
5160 |
- const char *p;\ |
5161 |
- for ( p = yy_cp-1; p >= (dst); --p)\ |
5162 |
- if ( *p == '\n' )\ |
5163 |
- --yylineno;\ |
5164 |
- }while(0) |
5165 |
- |
5166 |
-/* Return all but the first "n" matched characters back to the input stream. */ |
5167 |
-#define yyless(n) \ |
5168 |
- do \ |
5169 |
- { \ |
5170 |
- /* Undo effects of setting up yytext. */ \ |
5171 |
- int yyless_macro_arg = (n); \ |
5172 |
- YY_LESS_LINENO(yyless_macro_arg);\ |
5173 |
- *yy_cp = yyg->yy_hold_char; \ |
5174 |
- YY_RESTORE_YY_MORE_OFFSET \ |
5175 |
- yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ |
5176 |
- YY_DO_BEFORE_ACTION; /* set up yytext again */ \ |
5177 |
- } \ |
5178 |
- while ( 0 ) |
5179 |
-#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner ) |
5180 |
- |
5181 |
-#ifndef YY_STRUCT_YY_BUFFER_STATE |
5182 |
-#define YY_STRUCT_YY_BUFFER_STATE |
5183 |
-struct yy_buffer_state |
5184 |
- { |
5185 |
- FILE *yy_input_file; |
5186 |
- |
5187 |
- char *yy_ch_buf; /* input buffer */ |
5188 |
- char *yy_buf_pos; /* current position in input buffer */ |
5189 |
- |
5190 |
- /* Size of input buffer in bytes, not including room for EOB |
5191 |
- * characters. |
5192 |
- */ |
5193 |
- int yy_buf_size; |
5194 |
- |
5195 |
- /* Number of characters read into yy_ch_buf, not including EOB |
5196 |
- * characters. |
5197 |
- */ |
5198 |
- int yy_n_chars; |
5199 |
- |
5200 |
- /* Whether we "own" the buffer - i.e., we know we created it, |
5201 |
- * and can realloc() it to grow it, and should free() it to |
5202 |
- * delete it. |
5203 |
- */ |
5204 |
- int yy_is_our_buffer; |
5205 |
- |
5206 |
- /* Whether this is an "interactive" input source; if so, and |
5207 |
- * if we're using stdio for input, then we want to use getc() |
5208 |
- * instead of fread(), to make sure we stop fetching input after |
5209 |
- * each newline. |
5210 |
- */ |
5211 |
- int yy_is_interactive; |
5212 |
- |
5213 |
- /* Whether we're considered to be at the beginning of a line. |
5214 |
- * If so, '^' rules will be active on the next match, otherwise |
5215 |
- * not. |
5216 |
- */ |
5217 |
- int yy_at_bol; |
5218 |
- |
5219 |
- int yy_bs_lineno; /**< The line count. */ |
5220 |
- int yy_bs_column; /**< The column count. */ |
5221 |
- |
5222 |
- /* Whether to try to fill the input buffer when we reach the |
5223 |
- * end of it. |
5224 |
- */ |
5225 |
- int yy_fill_buffer; |
5226 |
- |
5227 |
- int yy_buffer_status; |
5228 |
- |
5229 |
-#define YY_BUFFER_NEW 0 |
5230 |
-#define YY_BUFFER_NORMAL 1 |
5231 |
- /* When an EOF's been seen but there's still some text to process |
5232 |
- * then we mark the buffer as YY_EOF_PENDING, to indicate that we |
5233 |
- * shouldn't try reading from the input source any more. We might |
5234 |
- * still have a bunch of tokens to match, though, because of |
5235 |
- * possible backing-up. |
5236 |
- * |
5237 |
- * When we actually see the EOF, we change the status to "new" |
5238 |
- * (via yyrestart()), so that the user can continue scanning by |
5239 |
- * just pointing yyin at a new input file. |
5240 |
- */ |
5241 |
-#define YY_BUFFER_EOF_PENDING 2 |
5242 |
- |
5243 |
- }; |
5244 |
-#endif /* !YY_STRUCT_YY_BUFFER_STATE */ |
5245 |
- |
5246 |
-/* We provide macros for accessing buffer states in case in the |
5247 |
- * future we want to put the buffer states in a more general |
5248 |
- * "scanner state". |
5249 |
- * |
5250 |
- * Returns the top of the stack, or NULL. |
5251 |
- */ |
5252 |
-#define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \ |
5253 |
- ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \ |
5254 |
- : NULL) |
5255 |
-/* Same as previous macro, but useful when we know that the buffer stack is not |
5256 |
- * NULL or when we need an lvalue. For internal use only. |
5257 |
- */ |
5258 |
-#define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] |
5259 |
- |
5260 |
-void yyrestart ( FILE *input_file , yyscan_t yyscanner ); |
5261 |
-void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); |
5262 |
-YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner ); |
5263 |
-void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); |
5264 |
-void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); |
5265 |
-void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); |
5266 |
-void yypop_buffer_state ( yyscan_t yyscanner ); |
5267 |
- |
5268 |
-static void yyensure_buffer_stack ( yyscan_t yyscanner ); |
5269 |
-static void yy_load_buffer_state ( yyscan_t yyscanner ); |
5270 |
-static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file , yyscan_t yyscanner ); |
5271 |
-#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER , yyscanner) |
5272 |
- |
5273 |
-YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner ); |
5274 |
-YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner ); |
5275 |
-YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len , yyscan_t yyscanner ); |
5276 |
- |
5277 |
-void *yyalloc ( yy_size_t , yyscan_t yyscanner ); |
5278 |
-void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner ); |
5279 |
-void yyfree ( void * , yyscan_t yyscanner ); |
5280 |
- |
5281 |
-#define yy_new_buffer yy_create_buffer |
5282 |
-#define yy_set_interactive(is_interactive) \ |
5283 |
- { \ |
5284 |
- if ( ! YY_CURRENT_BUFFER ){ \ |
5285 |
- yyensure_buffer_stack (yyscanner); \ |
5286 |
- YY_CURRENT_BUFFER_LVALUE = \ |
5287 |
- yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \ |
5288 |
- } \ |
5289 |
- YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ |
5290 |
- } |
5291 |
-#define yy_set_bol(at_bol) \ |
5292 |
- { \ |
5293 |
- if ( ! YY_CURRENT_BUFFER ){\ |
5294 |
- yyensure_buffer_stack (yyscanner); \ |
5295 |
- YY_CURRENT_BUFFER_LVALUE = \ |
5296 |
- yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \ |
5297 |
- } \ |
5298 |
- YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ |
5299 |
- } |
5300 |
-#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) |
5301 |
- |
5302 |
-/* Begin user sect3 */ |
5303 |
-typedef flex_uint8_t YY_CHAR; |
5304 |
- |
5305 |
-typedef int yy_state_type; |
5306 |
- |
5307 |
-#define yytext_ptr yytext_r |
5308 |
- |
5309 |
-static yy_state_type yy_get_previous_state ( yyscan_t yyscanner ); |
5310 |
-static yy_state_type yy_try_NUL_trans ( yy_state_type current_state , yyscan_t yyscanner); |
5311 |
-static int yy_get_next_buffer ( yyscan_t yyscanner ); |
5312 |
-static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner ); |
5313 |
- |
5314 |
-/* Done after the current pattern has been matched and before the |
5315 |
- * corresponding action - sets up yytext. |
5316 |
- */ |
5317 |
-#define YY_DO_BEFORE_ACTION \ |
5318 |
- yyg->yytext_ptr = yy_bp; \ |
5319 |
- yyleng = (int) (yy_cp - yy_bp); \ |
5320 |
- yyg->yy_hold_char = *yy_cp; \ |
5321 |
- *yy_cp = '\0'; \ |
5322 |
- yyg->yy_c_buf_p = yy_cp; |
5323 |
-#define YY_NUM_RULES 8 |
5324 |
-#define YY_END_OF_BUFFER 9 |
5325 |
-/* This struct is not used in this scanner, |
5326 |
- but its presence is necessary. */ |
5327 |
-struct yy_trans_info |
5328 |
- { |
5329 |
- flex_int32_t yy_verify; |
5330 |
- flex_int32_t yy_nxt; |
5331 |
- }; |
5332 |
-static const flex_int16_t yy_accept[20] = |
5333 |
- { 0, |
5334 |
- 7, 7, 9, 8, 7, 1, 8, 1, 5, 2, |
5335 |
- 7, 0, 3, 5, 0, 2, 4, 6, 0 |
5336 |
- } ; |
5337 |
- |
5338 |
-static const YY_CHAR yy_ec[256] = |
5339 |
- { 0, |
5340 |
- 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, |
5341 |
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
5342 |
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
5343 |
- 1, 2, 3, 4, 1, 1, 1, 3, 1, 3, |
5344 |
- 3, 3, 3, 1, 5, 6, 3, 7, 7, 7, |
5345 |
- 7, 7, 7, 7, 7, 7, 7, 1, 1, 3, |
5346 |
- 3, 3, 1, 3, 8, 8, 8, 8, 8, 8, |
5347 |
- 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, |
5348 |
- 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, |
5349 |
- 1, 1, 1, 3, 9, 1, 8, 8, 8, 8, |
5350 |
- |
5351 |
- 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, |
5352 |
- 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, |
5353 |
- 8, 8, 1, 3, 1, 1, 1, 1, 1, 1, |
5354 |
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
5355 |
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
5356 |
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
5357 |
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
5358 |
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
5359 |
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
5360 |
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
5361 |
- |
5362 |
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
5363 |
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
5364 |
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
5365 |
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
5366 |
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
5367 |
- 1, 1, 1, 1, 1 |
5368 |
- } ; |
5369 |
- |
5370 |
-static const YY_CHAR yy_meta[10] = |
5371 |
- { 0, |
5372 |
- 1, 1, 1, 1, 1, 1, 2, 2, 2 |
5373 |
- } ; |
5374 |
- |
5375 |
-static const flex_int16_t yy_base[22] = |
5376 |
- { 0, |
5377 |
- 0, 0, 22, 23, 19, 23, 16, 12, 4, 0, |
5378 |
- 16, 13, 23, 0, 9, 0, 23, 8, 23, 11, |
5379 |
- 12 |
5380 |
- } ; |
5381 |
- |
5382 |
-static const flex_int16_t yy_def[22] = |
5383 |
- { 0, |
5384 |
- 19, 1, 19, 19, 19, 19, 20, 19, 19, 21, |
5385 |
- 19, 20, 19, 9, 19, 21, 19, 19, 0, 19, |
5386 |
- 19 |
5387 |
- } ; |
5388 |
- |
5389 |
-static const flex_int16_t yy_nxt[33] = |
5390 |
- { 0, |
5391 |
- 4, 5, 6, 7, 8, 4, 9, 10, 4, 15, |
5392 |
- 14, 12, 12, 16, 18, 18, 17, 11, 14, 13, |
5393 |
- 11, 19, 3, 19, 19, 19, 19, 19, 19, 19, |
5394 |
- 19, 19 |
5395 |
- } ; |
5396 |
- |
5397 |
-static const flex_int16_t yy_chk[33] = |
5398 |
- { 0, |
5399 |
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 9, |
5400 |
- 9, 20, 20, 21, 18, 15, 12, 11, 8, 7, |
5401 |
- 5, 3, 19, 19, 19, 19, 19, 19, 19, 19, |
5402 |
- 19, 19 |
5403 |
- } ; |
5404 |
- |
5405 |
-/* Table of booleans, true if rule could match eol. */ |
5406 |
-static const flex_int32_t yy_rule_can_match_eol[9] = |
5407 |
- { 0, |
5408 |
-0, 0, 0, 1, 0, 0, 0, 0, }; |
5409 |
- |
5410 |
-/* The intent behind this definition is that it'll catch |
5411 |
- * any uses of REJECT which flex missed. |
5412 |
- */ |
5413 |
-#define REJECT reject_used_but_not_detected |
5414 |
-#define yymore() yymore_used_but_not_detected |
5415 |
-#define YY_MORE_ADJ 0 |
5416 |
-#define YY_RESTORE_YY_MORE_OFFSET |
5417 |
-#line 1 "expr_parser.l" |
5418 |
-/* -------------------------------------------------------------------------- */ |
5419 |
-/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */ |
5420 |
-/* */ |
5421 |
-/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ |
5422 |
-/* not use this file except in compliance with the License. You may obtain */ |
5423 |
-/* a copy of the License at */ |
5424 |
-/* */ |
5425 |
-/* http://www.apache.org/licenses/LICENSE-2.0 */ |
5426 |
-/* */ |
5427 |
-/* Unless required by applicable law or agreed to in writing, software */ |
5428 |
-/* distributed under the License is distributed on an "AS IS" BASIS, */ |
5429 |
-/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ |
5430 |
-/* See the License for the specific language governing permissions and */ |
5431 |
-/* limitations under the License. */ |
5432 |
-/* -------------------------------------------------------------------------- */ |
5433 |
-#line 18 "expr_parser.l" |
5434 |
-#include <stdio.h> |
5435 |
-#include <stdlib.h> |
5436 |
- |
5437 |
-#include "expr_bool.h" |
5438 |
-#include "expr_arith.h" |
5439 |
-#include "mem_collector.h" |
5440 |
- |
5441 |
-#define YY_NO_INPUT |
5442 |
- |
5443 |
-#define YY_DECL int expr_lex (YYSTYPE *yylval_param, YYLTYPE *llocp, \ |
5444 |
- mem_collector *mc, yyscan_t yyscanner) |
5445 |
- |
5446 |
-#define YY_USER_ACTION llocp->first_line = yylineno; \ |
5447 |
- llocp->first_column = llocp->last_column; \ |
5448 |
- llocp->last_column += yyleng; |
5449 |
-#line 706 "expr_parser.cc" |
5450 |
-#line 707 "expr_parser.cc" |
5451 |
- |
5452 |
-#define INITIAL 0 |
5453 |
- |
5454 |
-#ifndef YY_NO_UNISTD_H |
5455 |
-/* Special case for "unistd.h", since it is non-ANSI. We include it way |
5456 |
- * down here because we want the user's section 1 to have been scanned first. |
5457 |
- * The user has a chance to override it with an option. |
5458 |
- */ |
5459 |
-#include <unistd.h> |
5460 |
-#endif |
5461 |
- |
5462 |
-#ifndef YY_EXTRA_TYPE |
5463 |
-#define YY_EXTRA_TYPE void * |
5464 |
-#endif |
5465 |
- |
5466 |
-/* Holds the entire state of the reentrant scanner. */ |
5467 |
-struct yyguts_t |
5468 |
- { |
5469 |
- |
5470 |
- /* User-defined. Not touched by flex. */ |
5471 |
- YY_EXTRA_TYPE yyextra_r; |
5472 |
- |
5473 |
- /* The rest are the same as the globals declared in the non-reentrant scanner. */ |
5474 |
- FILE *yyin_r, *yyout_r; |
5475 |
- size_t yy_buffer_stack_top; /**< index of top of stack. */ |
5476 |
- size_t yy_buffer_stack_max; /**< capacity of stack. */ |
5477 |
- YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ |
5478 |
- char yy_hold_char; |
5479 |
- int yy_n_chars; |
5480 |
- int yyleng_r; |
5481 |
- char *yy_c_buf_p; |
5482 |
- int yy_init; |
5483 |
- int yy_start; |
5484 |
- int yy_did_buffer_switch_on_eof; |
5485 |
- int yy_start_stack_ptr; |
5486 |
- int yy_start_stack_depth; |
5487 |
- int *yy_start_stack; |
5488 |
- yy_state_type yy_last_accepting_state; |
5489 |
- char* yy_last_accepting_cpos; |
5490 |
- |
5491 |
- int yylineno_r; |
5492 |
- int yy_flex_debug_r; |
5493 |
- |
5494 |
- char *yytext_r; |
5495 |
- int yy_more_flag; |
5496 |
- int yy_more_len; |
5497 |
- |
5498 |
- YYSTYPE * yylval_r; |
5499 |
- |
5500 |
- }; /* end struct yyguts_t */ |
5501 |
- |
5502 |
-static int yy_init_globals ( yyscan_t yyscanner ); |
5503 |
- |
5504 |
- /* This must go here because YYSTYPE and YYLTYPE are included |
5505 |
- * from bison output in section 1.*/ |
5506 |
- # define yylval yyg->yylval_r |
5507 |
- |
5508 |
-int yylex_init (yyscan_t* scanner); |
5509 |
- |
5510 |
-int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner); |
5511 |
- |
5512 |
-/* Accessor methods to globals. |
5513 |
- These are made visible to non-reentrant scanners for convenience. */ |
5514 |
- |
5515 |
-int yylex_destroy ( yyscan_t yyscanner ); |
5516 |
- |
5517 |
-int yyget_debug ( yyscan_t yyscanner ); |
5518 |
- |
5519 |
-void yyset_debug ( int debug_flag , yyscan_t yyscanner ); |
5520 |
- |
5521 |
-YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner ); |
5522 |
- |
5523 |
-void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner ); |
5524 |
- |
5525 |
-FILE *yyget_in ( yyscan_t yyscanner ); |
5526 |
- |
5527 |
-void yyset_in ( FILE * _in_str , yyscan_t yyscanner ); |
5528 |
- |
5529 |
-FILE *yyget_out ( yyscan_t yyscanner ); |
5530 |
- |
5531 |
-void yyset_out ( FILE * _out_str , yyscan_t yyscanner ); |
5532 |
- |
5533 |
- int yyget_leng ( yyscan_t yyscanner ); |
5534 |
- |
5535 |
-char *yyget_text ( yyscan_t yyscanner ); |
5536 |
- |
5537 |
-int yyget_lineno ( yyscan_t yyscanner ); |
5538 |
- |
5539 |
-void yyset_lineno ( int _line_number , yyscan_t yyscanner ); |
5540 |
- |
5541 |
-int yyget_column ( yyscan_t yyscanner ); |
5542 |
- |
5543 |
-void yyset_column ( int _column_no , yyscan_t yyscanner ); |
5544 |
- |
5545 |
-YYSTYPE * yyget_lval ( yyscan_t yyscanner ); |
5546 |
- |
5547 |
-void yyset_lval ( YYSTYPE * yylval_param , yyscan_t yyscanner ); |
5548 |
- |
5549 |
-/* Macros after this point can all be overridden by user definitions in |
5550 |
- * section 1. |
5551 |
- */ |
5552 |
- |
5553 |
-#ifndef YY_SKIP_YYWRAP |
5554 |
-#ifdef __cplusplus |
5555 |
-extern "C" int yywrap ( yyscan_t yyscanner ); |
5556 |
-#else |
5557 |
-extern int yywrap ( yyscan_t yyscanner ); |
5558 |
-#endif |
5559 |
-#endif |
5560 |
- |
5561 |
-#ifndef YY_NO_UNPUT |
5562 |
- |
5563 |
-#endif |
5564 |
- |
5565 |
-#ifndef yytext_ptr |
5566 |
-static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner); |
5567 |
-#endif |
5568 |
- |
5569 |
-#ifdef YY_NEED_STRLEN |
5570 |
-static int yy_flex_strlen ( const char * , yyscan_t yyscanner); |
5571 |
-#endif |
5572 |
- |
5573 |
-#ifndef YY_NO_INPUT |
5574 |
-#ifdef __cplusplus |
5575 |
-static int yyinput ( yyscan_t yyscanner ); |
5576 |
-#else |
5577 |
-static int input ( yyscan_t yyscanner ); |
5578 |
-#endif |
5579 |
- |
5580 |
-#endif |
5581 |
- |
5582 |
-/* Amount of stuff to slurp up with each read. */ |
5583 |
-#ifndef YY_READ_BUF_SIZE |
5584 |
-#ifdef __ia64__ |
5585 |
-/* On IA-64, the buffer size is 16k, not 8k */ |
5586 |
-#define YY_READ_BUF_SIZE 16384 |
5587 |
-#else |
5588 |
-#define YY_READ_BUF_SIZE 8192 |
5589 |
-#endif /* __ia64__ */ |
5590 |
-#endif |
5591 |
- |
5592 |
-/* Copy whatever the last rule matched to the standard output. */ |
5593 |
-#ifndef ECHO |
5594 |
-/* This used to be an fputs(), but since the string might contain NUL's, |
5595 |
- * we now use fwrite(). |
5596 |
- */ |
5597 |
-#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0) |
5598 |
-#endif |
5599 |
- |
5600 |
-/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, |
5601 |
- * is returned in "result". |
5602 |
- */ |
5603 |
-#ifndef YY_INPUT |
5604 |
-#define YY_INPUT(buf,result,max_size) \ |
5605 |
- if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ |
5606 |
- { \ |
5607 |
- int c = '*'; \ |
5608 |
- int n; \ |
5609 |
- for ( n = 0; n < max_size && \ |
5610 |
- (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ |
5611 |
- buf[n] = (char) c; \ |
5612 |
- if ( c == '\n' ) \ |
5613 |
- buf[n++] = (char) c; \ |
5614 |
- if ( c == EOF && ferror( yyin ) ) \ |
5615 |
- YY_FATAL_ERROR( "input in flex scanner failed" ); \ |
5616 |
- result = n; \ |
5617 |
- } \ |
5618 |
- else \ |
5619 |
- { \ |
5620 |
- errno=0; \ |
5621 |
- while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \ |
5622 |
- { \ |
5623 |
- if( errno != EINTR) \ |
5624 |
- { \ |
5625 |
- YY_FATAL_ERROR( "input in flex scanner failed" ); \ |
5626 |
- break; \ |
5627 |
- } \ |
5628 |
- errno=0; \ |
5629 |
- clearerr(yyin); \ |
5630 |
- } \ |
5631 |
- }\ |
5632 |
-\ |
5633 |
- |
5634 |
-#endif |
5635 |
- |
5636 |
-/* No semi-colon after return; correct usage is to write "yyterminate();" - |
5637 |
- * we don't want an extra ';' after the "return" because that will cause |
5638 |
- * some compilers to complain about unreachable statements. |
5639 |
- */ |
5640 |
-#ifndef yyterminate |
5641 |
-#define yyterminate() return YY_NULL |
5642 |
-#endif |
5643 |
- |
5644 |
-/* Number of entries by which start-condition stack grows. */ |
5645 |
-#ifndef YY_START_STACK_INCR |
5646 |
-#define YY_START_STACK_INCR 25 |
5647 |
-#endif |
5648 |
- |
5649 |
-/* Report a fatal error. */ |
5650 |
-#ifndef YY_FATAL_ERROR |
5651 |
-#define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner) |
5652 |
-#endif |
5653 |
- |
5654 |
-/* end tables serialization structures and prototypes */ |
5655 |
- |
5656 |
-/* Default declaration of generated scanner - a define so the user can |
5657 |
- * easily add parameters. |
5658 |
- */ |
5659 |
-#ifndef YY_DECL |
5660 |
-#define YY_DECL_IS_OURS 1 |
5661 |
- |
5662 |
-extern int yylex \ |
5663 |
- (YYSTYPE * yylval_param , yyscan_t yyscanner); |
5664 |
- |
5665 |
-#define YY_DECL int yylex \ |
5666 |
- (YYSTYPE * yylval_param , yyscan_t yyscanner) |
5667 |
-#endif /* !YY_DECL */ |
5668 |
- |
5669 |
-/* Code executed at the beginning of each rule, after yytext and yyleng |
5670 |
- * have been set up. |
5671 |
- */ |
5672 |
-#ifndef YY_USER_ACTION |
5673 |
-#define YY_USER_ACTION |
5674 |
-#endif |
5675 |
- |
5676 |
-/* Code executed at the end of each rule. */ |
5677 |
-#ifndef YY_BREAK |
5678 |
-#define YY_BREAK /*LINTED*/break; |
5679 |
-#endif |
5680 |
- |
5681 |
-#define YY_RULE_SETUP \ |
5682 |
- YY_USER_ACTION |
5683 |
- |
5684 |
-/** The main scanner function which does all the work. |
5685 |
- */ |
5686 |
-YY_DECL |
5687 |
-{ |
5688 |
- yy_state_type yy_current_state; |
5689 |
- char *yy_cp, *yy_bp; |
5690 |
- int yy_act; |
5691 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
5692 |
- |
5693 |
- yylval = yylval_param; |
5694 |
- |
5695 |
- if ( !yyg->yy_init ) |
5696 |
- { |
5697 |
- yyg->yy_init = 1; |
5698 |
- |
5699 |
-#ifdef YY_USER_INIT |
5700 |
- YY_USER_INIT; |
5701 |
-#endif |
5702 |
- |
5703 |
- if ( ! yyg->yy_start ) |
5704 |
- yyg->yy_start = 1; /* first start state */ |
5705 |
- |
5706 |
- if ( ! yyin ) |
5707 |
- yyin = stdin; |
5708 |
- |
5709 |
- if ( ! yyout ) |
5710 |
- yyout = stdout; |
5711 |
- |
5712 |
- if ( ! YY_CURRENT_BUFFER ) { |
5713 |
- yyensure_buffer_stack (yyscanner); |
5714 |
- YY_CURRENT_BUFFER_LVALUE = |
5715 |
- yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); |
5716 |
- } |
5717 |
- |
5718 |
- yy_load_buffer_state( yyscanner ); |
5719 |
- } |
5720 |
- |
5721 |
- { |
5722 |
-#line 43 "expr_parser.l" |
5723 |
- |
5724 |
-#line 45 "expr_parser.l" |
5725 |
- /* --- Tokens --- */ |
5726 |
- |
5727 |
-#line 984 "expr_parser.cc" |
5728 |
- |
5729 |
- while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ |
5730 |
- { |
5731 |
- yy_cp = yyg->yy_c_buf_p; |
5732 |
- |
5733 |
- /* Support of yytext. */ |
5734 |
- *yy_cp = yyg->yy_hold_char; |
5735 |
- |
5736 |
- /* yy_bp points to the position in yy_ch_buf of the start of |
5737 |
- * the current run. |
5738 |
- */ |
5739 |
- yy_bp = yy_cp; |
5740 |
- |
5741 |
- yy_current_state = yyg->yy_start; |
5742 |
-yy_match: |
5743 |
- do |
5744 |
- { |
5745 |
- YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; |
5746 |
- if ( yy_accept[yy_current_state] ) |
5747 |
- { |
5748 |
- yyg->yy_last_accepting_state = yy_current_state; |
5749 |
- yyg->yy_last_accepting_cpos = yy_cp; |
5750 |
- } |
5751 |
- while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) |
5752 |
- { |
5753 |
- yy_current_state = (int) yy_def[yy_current_state]; |
5754 |
- if ( yy_current_state >= 20 ) |
5755 |
- yy_c = yy_meta[yy_c]; |
5756 |
- } |
5757 |
- yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; |
5758 |
- ++yy_cp; |
5759 |
- } |
5760 |
- while ( yy_base[yy_current_state] != 23 ); |
5761 |
- |
5762 |
-yy_find_action: |
5763 |
- yy_act = yy_accept[yy_current_state]; |
5764 |
- if ( yy_act == 0 ) |
5765 |
- { /* have to back up */ |
5766 |
- yy_cp = yyg->yy_last_accepting_cpos; |
5767 |
- yy_current_state = yyg->yy_last_accepting_state; |
5768 |
- yy_act = yy_accept[yy_current_state]; |
5769 |
- } |
5770 |
- |
5771 |
- YY_DO_BEFORE_ACTION; |
5772 |
- |
5773 |
- if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] ) |
5774 |
- { |
5775 |
- int yyl; |
5776 |
- for ( yyl = 0; yyl < yyleng; ++yyl ) |
5777 |
- if ( yytext[yyl] == '\n' ) |
5778 |
- |
5779 |
- do{ yylineno++; |
5780 |
- yycolumn=0; |
5781 |
- }while(0) |
5782 |
-; |
5783 |
- } |
5784 |
- |
5785 |
-do_action: /* This label is used only to access EOF actions. */ |
5786 |
- |
5787 |
- switch ( yy_act ) |
5788 |
- { /* beginning of action switch */ |
5789 |
- case 0: /* must back up */ |
5790 |
- /* undo the effects of YY_DO_BEFORE_ACTION */ |
5791 |
- *yy_cp = yyg->yy_hold_char; |
5792 |
- yy_cp = yyg->yy_last_accepting_cpos; |
5793 |
- yy_current_state = yyg->yy_last_accepting_state; |
5794 |
- goto yy_find_action; |
5795 |
- |
5796 |
-case 1: |
5797 |
-YY_RULE_SETUP |
5798 |
-#line 47 "expr_parser.l" |
5799 |
-{ return *yytext;} |
5800 |
- YY_BREAK |
5801 |
-/* --- Strings, also quoted form --- */ |
5802 |
-case 2: |
5803 |
-YY_RULE_SETUP |
5804 |
-#line 51 "expr_parser.l" |
5805 |
-{ yylval_param->val_str = mem_collector_strdup(mc,yytext); |
5806 |
- return STRING;} |
5807 |
- YY_BREAK |
5808 |
-case 3: |
5809 |
-YY_RULE_SETUP |
5810 |
-#line 54 "expr_parser.l" |
5811 |
-{ yylval_param->val_str = NULL; |
5812 |
- return STRING;} |
5813 |
- YY_BREAK |
5814 |
-case 4: |
5815 |
-/* rule 4 can match eol */ |
5816 |
-YY_RULE_SETUP |
5817 |
-#line 57 "expr_parser.l" |
5818 |
-{ yylval_param->val_str = mem_collector_strdup(mc,yytext+1); |
5819 |
- yylval_param->val_str[yyleng-2] = '\0'; |
5820 |
- return STRING;} |
5821 |
- YY_BREAK |
5822 |
-/* --- Numbers --- */ |
5823 |
-case 5: |
5824 |
-YY_RULE_SETUP |
5825 |
-#line 63 "expr_parser.l" |
5826 |
-{ yylval_param->val_int = atoi(yytext); |
5827 |
- return INTEGER;} |
5828 |
- YY_BREAK |
5829 |
-case 6: |
5830 |
-YY_RULE_SETUP |
5831 |
-#line 66 "expr_parser.l" |
5832 |
-{ yylval_param->val_float = atof(yytext); |
5833 |
- return FLOAT;} |
5834 |
- YY_BREAK |
5835 |
-/* --- blanks --- */ |
5836 |
-case 7: |
5837 |
-YY_RULE_SETUP |
5838 |
-#line 71 "expr_parser.l" |
5839 |
- |
5840 |
- YY_BREAK |
5841 |
-case 8: |
5842 |
-YY_RULE_SETUP |
5843 |
-#line 73 "expr_parser.l" |
5844 |
-ECHO; |
5845 |
- YY_BREAK |
5846 |
-#line 1103 "expr_parser.cc" |
5847 |
-case YY_STATE_EOF(INITIAL): |
5848 |
- yyterminate(); |
5849 |
- |
5850 |
- case YY_END_OF_BUFFER: |
5851 |
- { |
5852 |
- /* Amount of text matched not including the EOB char. */ |
5853 |
- int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1; |
5854 |
- |
5855 |
- /* Undo the effects of YY_DO_BEFORE_ACTION. */ |
5856 |
- *yy_cp = yyg->yy_hold_char; |
5857 |
- YY_RESTORE_YY_MORE_OFFSET |
5858 |
- |
5859 |
- if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) |
5860 |
- { |
5861 |
- /* We're scanning a new file or input source. It's |
5862 |
- * possible that this happened because the user |
5863 |
- * just pointed yyin at a new source and called |
5864 |
- * yylex(). If so, then we have to assure |
5865 |
- * consistency between YY_CURRENT_BUFFER and our |
5866 |
- * globals. Here is the right place to do so, because |
5867 |
- * this is the first action (other than possibly a |
5868 |
- * back-up) that will match for the new input source. |
5869 |
- */ |
5870 |
- yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; |
5871 |
- YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; |
5872 |
- YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; |
5873 |
- } |
5874 |
- |
5875 |
- /* Note that here we test for yy_c_buf_p "<=" to the position |
5876 |
- * of the first EOB in the buffer, since yy_c_buf_p will |
5877 |
- * already have been incremented past the NUL character |
5878 |
- * (since all states make transitions on EOB to the |
5879 |
- * end-of-buffer state). Contrast this with the test |
5880 |
- * in input(). |
5881 |
- */ |
5882 |
- if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) |
5883 |
- { /* This was really a NUL. */ |
5884 |
- yy_state_type yy_next_state; |
5885 |
- |
5886 |
- yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; |
5887 |
- |
5888 |
- yy_current_state = yy_get_previous_state( yyscanner ); |
5889 |
- |
5890 |
- /* Okay, we're now positioned to make the NUL |
5891 |
- * transition. We couldn't have |
5892 |
- * yy_get_previous_state() go ahead and do it |
5893 |
- * for us because it doesn't know how to deal |
5894 |
- * with the possibility of jamming (and we don't |
5895 |
- * want to build jamming into it because then it |
5896 |
- * will run more slowly). |
5897 |
- */ |
5898 |
- |
5899 |
- yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner); |
5900 |
- |
5901 |
- yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; |
5902 |
- |
5903 |
- if ( yy_next_state ) |
5904 |
- { |
5905 |
- /* Consume the NUL. */ |
5906 |
- yy_cp = ++yyg->yy_c_buf_p; |
5907 |
- yy_current_state = yy_next_state; |
5908 |
- goto yy_match; |
5909 |
- } |
5910 |
- |
5911 |
- else |
5912 |
- { |
5913 |
- yy_cp = yyg->yy_c_buf_p; |
5914 |
- goto yy_find_action; |
5915 |
- } |
5916 |
- } |
5917 |
- |
5918 |
- else switch ( yy_get_next_buffer( yyscanner ) ) |
5919 |
- { |
5920 |
- case EOB_ACT_END_OF_FILE: |
5921 |
- { |
5922 |
- yyg->yy_did_buffer_switch_on_eof = 0; |
5923 |
- |
5924 |
- if ( yywrap( yyscanner ) ) |
5925 |
- { |
5926 |
- /* Note: because we've taken care in |
5927 |
- * yy_get_next_buffer() to have set up |
5928 |
- * yytext, we can now set up |
5929 |
- * yy_c_buf_p so that if some total |
5930 |
- * hoser (like flex itself) wants to |
5931 |
- * call the scanner after we return the |
5932 |
- * YY_NULL, it'll still work - another |
5933 |
- * YY_NULL will get returned. |
5934 |
- */ |
5935 |
- yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ; |
5936 |
- |
5937 |
- yy_act = YY_STATE_EOF(YY_START); |
5938 |
- goto do_action; |
5939 |
- } |
5940 |
- |
5941 |
- else |
5942 |
- { |
5943 |
- if ( ! yyg->yy_did_buffer_switch_on_eof ) |
5944 |
- YY_NEW_FILE; |
5945 |
- } |
5946 |
- break; |
5947 |
- } |
5948 |
- |
5949 |
- case EOB_ACT_CONTINUE_SCAN: |
5950 |
- yyg->yy_c_buf_p = |
5951 |
- yyg->yytext_ptr + yy_amount_of_matched_text; |
5952 |
- |
5953 |
- yy_current_state = yy_get_previous_state( yyscanner ); |
5954 |
- |
5955 |
- yy_cp = yyg->yy_c_buf_p; |
5956 |
- yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; |
5957 |
- goto yy_match; |
5958 |
- |
5959 |
- case EOB_ACT_LAST_MATCH: |
5960 |
- yyg->yy_c_buf_p = |
5961 |
- &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]; |
5962 |
- |
5963 |
- yy_current_state = yy_get_previous_state( yyscanner ); |
5964 |
- |
5965 |
- yy_cp = yyg->yy_c_buf_p; |
5966 |
- yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; |
5967 |
- goto yy_find_action; |
5968 |
- } |
5969 |
- break; |
5970 |
- } |
5971 |
- |
5972 |
- default: |
5973 |
- YY_FATAL_ERROR( |
5974 |
- "fatal flex scanner internal error--no action found" ); |
5975 |
- } /* end of action switch */ |
5976 |
- } /* end of scanning one token */ |
5977 |
- } /* end of user's declarations */ |
5978 |
-} /* end of yylex */ |
5979 |
- |
5980 |
-/* yy_get_next_buffer - try to read in a new buffer |
5981 |
- * |
5982 |
- * Returns a code representing an action: |
5983 |
- * EOB_ACT_LAST_MATCH - |
5984 |
- * EOB_ACT_CONTINUE_SCAN - continue scanning from current position |
5985 |
- * EOB_ACT_END_OF_FILE - end of file |
5986 |
- */ |
5987 |
-static int yy_get_next_buffer (yyscan_t yyscanner) |
5988 |
-{ |
5989 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
5990 |
- char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; |
5991 |
- char *source = yyg->yytext_ptr; |
5992 |
- int number_to_move, i; |
5993 |
- int ret_val; |
5994 |
- |
5995 |
- if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] ) |
5996 |
- YY_FATAL_ERROR( |
5997 |
- "fatal flex scanner internal error--end of buffer missed" ); |
5998 |
- |
5999 |
- if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) |
6000 |
- { /* Don't try to fill the buffer, so this is an EOF. */ |
6001 |
- if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 ) |
6002 |
- { |
6003 |
- /* We matched a single character, the EOB, so |
6004 |
- * treat this as a final EOF. |
6005 |
- */ |
6006 |
- return EOB_ACT_END_OF_FILE; |
6007 |
- } |
6008 |
- |
6009 |
- else |
6010 |
- { |
6011 |
- /* We matched some text prior to the EOB, first |
6012 |
- * process it. |
6013 |
- */ |
6014 |
- return EOB_ACT_LAST_MATCH; |
6015 |
- } |
6016 |
- } |
6017 |
- |
6018 |
- /* Try to read more data. */ |
6019 |
- |
6020 |
- /* First move last chars to start of buffer. */ |
6021 |
- number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr - 1); |
6022 |
- |
6023 |
- for ( i = 0; i < number_to_move; ++i ) |
6024 |
- *(dest++) = *(source++); |
6025 |
- |
6026 |
- if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) |
6027 |
- /* don't do the read, it's not guaranteed to return an EOF, |
6028 |
- * just force an EOF |
6029 |
- */ |
6030 |
- YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0; |
6031 |
- |
6032 |
- else |
6033 |
- { |
6034 |
- int num_to_read = |
6035 |
- YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; |
6036 |
- |
6037 |
- while ( num_to_read <= 0 ) |
6038 |
- { /* Not enough room in the buffer - grow it. */ |
6039 |
- |
6040 |
- /* just a shorter name for the current buffer */ |
6041 |
- YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; |
6042 |
- |
6043 |
- int yy_c_buf_p_offset = |
6044 |
- (int) (yyg->yy_c_buf_p - b->yy_ch_buf); |
6045 |
- |
6046 |
- if ( b->yy_is_our_buffer ) |
6047 |
- { |
6048 |
- int new_size = b->yy_buf_size * 2; |
6049 |
- |
6050 |
- if ( new_size <= 0 ) |
6051 |
- b->yy_buf_size += b->yy_buf_size / 8; |
6052 |
- else |
6053 |
- b->yy_buf_size *= 2; |
6054 |
- |
6055 |
- b->yy_ch_buf = (char *) |
6056 |
- /* Include room in for 2 EOB chars. */ |
6057 |
- yyrealloc( (void *) b->yy_ch_buf, |
6058 |
- (yy_size_t) (b->yy_buf_size + 2) , yyscanner ); |
6059 |
- } |
6060 |
- else |
6061 |
- /* Can't grow it, we don't own it. */ |
6062 |
- b->yy_ch_buf = NULL; |
6063 |
- |
6064 |
- if ( ! b->yy_ch_buf ) |
6065 |
- YY_FATAL_ERROR( |
6066 |
- "fatal error - scanner input buffer overflow" ); |
6067 |
- |
6068 |
- yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; |
6069 |
- |
6070 |
- num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - |
6071 |
- number_to_move - 1; |
6072 |
- |
6073 |
- } |
6074 |
- |
6075 |
- if ( num_to_read > YY_READ_BUF_SIZE ) |
6076 |
- num_to_read = YY_READ_BUF_SIZE; |
6077 |
- |
6078 |
- /* Read in more data. */ |
6079 |
- YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), |
6080 |
- yyg->yy_n_chars, num_to_read ); |
6081 |
- |
6082 |
- YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; |
6083 |
- } |
6084 |
- |
6085 |
- if ( yyg->yy_n_chars == 0 ) |
6086 |
- { |
6087 |
- if ( number_to_move == YY_MORE_ADJ ) |
6088 |
- { |
6089 |
- ret_val = EOB_ACT_END_OF_FILE; |
6090 |
- yyrestart( yyin , yyscanner); |
6091 |
- } |
6092 |
- |
6093 |
- else |
6094 |
- { |
6095 |
- ret_val = EOB_ACT_LAST_MATCH; |
6096 |
- YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = |
6097 |
- YY_BUFFER_EOF_PENDING; |
6098 |
- } |
6099 |
- } |
6100 |
- |
6101 |
- else |
6102 |
- ret_val = EOB_ACT_CONTINUE_SCAN; |
6103 |
- |
6104 |
- if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { |
6105 |
- /* Extend the array by 50%, plus the number we really need. */ |
6106 |
- int new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); |
6107 |
- YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc( |
6108 |
- (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size , yyscanner ); |
6109 |
- if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) |
6110 |
- YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); |
6111 |
- /* "- 2" to take care of EOB's */ |
6112 |
- YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2); |
6113 |
- } |
6114 |
- |
6115 |
- yyg->yy_n_chars += number_to_move; |
6116 |
- YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR; |
6117 |
- YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; |
6118 |
- |
6119 |
- yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; |
6120 |
- |
6121 |
- return ret_val; |
6122 |
-} |
6123 |
- |
6124 |
-/* yy_get_previous_state - get the state just before the EOB char was reached */ |
6125 |
- |
6126 |
- static yy_state_type yy_get_previous_state (yyscan_t yyscanner) |
6127 |
-{ |
6128 |
- yy_state_type yy_current_state; |
6129 |
- char *yy_cp; |
6130 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
6131 |
- |
6132 |
- yy_current_state = yyg->yy_start; |
6133 |
- |
6134 |
- for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp ) |
6135 |
- { |
6136 |
- YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); |
6137 |
- if ( yy_accept[yy_current_state] ) |
6138 |
- { |
6139 |
- yyg->yy_last_accepting_state = yy_current_state; |
6140 |
- yyg->yy_last_accepting_cpos = yy_cp; |
6141 |
- } |
6142 |
- while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) |
6143 |
- { |
6144 |
- yy_current_state = (int) yy_def[yy_current_state]; |
6145 |
- if ( yy_current_state >= 20 ) |
6146 |
- yy_c = yy_meta[yy_c]; |
6147 |
- } |
6148 |
- yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; |
6149 |
- } |
6150 |
- |
6151 |
- return yy_current_state; |
6152 |
-} |
6153 |
- |
6154 |
-/* yy_try_NUL_trans - try to make a transition on the NUL character |
6155 |
- * |
6156 |
- * synopsis |
6157 |
- * next_state = yy_try_NUL_trans( current_state ); |
6158 |
- */ |
6159 |
- static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner) |
6160 |
-{ |
6161 |
- int yy_is_jam; |
6162 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */ |
6163 |
- char *yy_cp = yyg->yy_c_buf_p; |
6164 |
- |
6165 |
- YY_CHAR yy_c = 1; |
6166 |
- if ( yy_accept[yy_current_state] ) |
6167 |
- { |
6168 |
- yyg->yy_last_accepting_state = yy_current_state; |
6169 |
- yyg->yy_last_accepting_cpos = yy_cp; |
6170 |
- } |
6171 |
- while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) |
6172 |
- { |
6173 |
- yy_current_state = (int) yy_def[yy_current_state]; |
6174 |
- if ( yy_current_state >= 20 ) |
6175 |
- yy_c = yy_meta[yy_c]; |
6176 |
- } |
6177 |
- yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; |
6178 |
- yy_is_jam = (yy_current_state == 19); |
6179 |
- |
6180 |
- (void)yyg; |
6181 |
- return yy_is_jam ? 0 : yy_current_state; |
6182 |
-} |
6183 |
- |
6184 |
-#ifndef YY_NO_UNPUT |
6185 |
- |
6186 |
-#endif |
6187 |
- |
6188 |
-#ifndef YY_NO_INPUT |
6189 |
-#ifdef __cplusplus |
6190 |
- static int yyinput (yyscan_t yyscanner) |
6191 |
-#else |
6192 |
- static int input (yyscan_t yyscanner) |
6193 |
-#endif |
6194 |
- |
6195 |
-{ |
6196 |
- int c; |
6197 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
6198 |
- |
6199 |
- *yyg->yy_c_buf_p = yyg->yy_hold_char; |
6200 |
- |
6201 |
- if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) |
6202 |
- { |
6203 |
- /* yy_c_buf_p now points to the character we want to return. |
6204 |
- * If this occurs *before* the EOB characters, then it's a |
6205 |
- * valid NUL; if not, then we've hit the end of the buffer. |
6206 |
- */ |
6207 |
- if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) |
6208 |
- /* This was really a NUL. */ |
6209 |
- *yyg->yy_c_buf_p = '\0'; |
6210 |
- |
6211 |
- else |
6212 |
- { /* need more input */ |
6213 |
- int offset = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr); |
6214 |
- ++yyg->yy_c_buf_p; |
6215 |
- |
6216 |
- switch ( yy_get_next_buffer( yyscanner ) ) |
6217 |
- { |
6218 |
- case EOB_ACT_LAST_MATCH: |
6219 |
- /* This happens because yy_g_n_b() |
6220 |
- * sees that we've accumulated a |
6221 |
- * token and flags that we need to |
6222 |
- * try matching the token before |
6223 |
- * proceeding. But for input(), |
6224 |
- * there's no matching to consider. |
6225 |
- * So convert the EOB_ACT_LAST_MATCH |
6226 |
- * to EOB_ACT_END_OF_FILE. |
6227 |
- */ |
6228 |
- |
6229 |
- /* Reset buffer status. */ |
6230 |
- yyrestart( yyin , yyscanner); |
6231 |
- |
6232 |
- /*FALLTHROUGH*/ |
6233 |
- |
6234 |
- case EOB_ACT_END_OF_FILE: |
6235 |
- { |
6236 |
- if ( yywrap( yyscanner ) ) |
6237 |
- return 0; |
6238 |
- |
6239 |
- if ( ! yyg->yy_did_buffer_switch_on_eof ) |
6240 |
- YY_NEW_FILE; |
6241 |
-#ifdef __cplusplus |
6242 |
- return yyinput(yyscanner); |
6243 |
-#else |
6244 |
- return input(yyscanner); |
6245 |
-#endif |
6246 |
- } |
6247 |
- |
6248 |
- case EOB_ACT_CONTINUE_SCAN: |
6249 |
- yyg->yy_c_buf_p = yyg->yytext_ptr + offset; |
6250 |
- break; |
6251 |
- } |
6252 |
- } |
6253 |
- } |
6254 |
- |
6255 |
- c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */ |
6256 |
- *yyg->yy_c_buf_p = '\0'; /* preserve yytext */ |
6257 |
- yyg->yy_hold_char = *++yyg->yy_c_buf_p; |
6258 |
- |
6259 |
- if ( c == '\n' ) |
6260 |
- |
6261 |
- do{ yylineno++; |
6262 |
- yycolumn=0; |
6263 |
- }while(0) |
6264 |
-; |
6265 |
- |
6266 |
- return c; |
6267 |
-} |
6268 |
-#endif /* ifndef YY_NO_INPUT */ |
6269 |
- |
6270 |
-/** Immediately switch to a different input stream. |
6271 |
- * @param input_file A readable stream. |
6272 |
- * @param yyscanner The scanner object. |
6273 |
- * @note This function does not reset the start condition to @c INITIAL . |
6274 |
- */ |
6275 |
- void yyrestart (FILE * input_file , yyscan_t yyscanner) |
6276 |
-{ |
6277 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
6278 |
- |
6279 |
- if ( ! YY_CURRENT_BUFFER ){ |
6280 |
- yyensure_buffer_stack (yyscanner); |
6281 |
- YY_CURRENT_BUFFER_LVALUE = |
6282 |
- yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); |
6283 |
- } |
6284 |
- |
6285 |
- yy_init_buffer( YY_CURRENT_BUFFER, input_file , yyscanner); |
6286 |
- yy_load_buffer_state( yyscanner ); |
6287 |
-} |
6288 |
- |
6289 |
-/** Switch to a different input buffer. |
6290 |
- * @param new_buffer The new input buffer. |
6291 |
- * @param yyscanner The scanner object. |
6292 |
- */ |
6293 |
- void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) |
6294 |
-{ |
6295 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
6296 |
- |
6297 |
- /* TODO. We should be able to replace this entire function body |
6298 |
- * with |
6299 |
- * yypop_buffer_state(); |
6300 |
- * yypush_buffer_state(new_buffer); |
6301 |
- */ |
6302 |
- yyensure_buffer_stack (yyscanner); |
6303 |
- if ( YY_CURRENT_BUFFER == new_buffer ) |
6304 |
- return; |
6305 |
- |
6306 |
- if ( YY_CURRENT_BUFFER ) |
6307 |
- { |
6308 |
- /* Flush out information for old buffer. */ |
6309 |
- *yyg->yy_c_buf_p = yyg->yy_hold_char; |
6310 |
- YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; |
6311 |
- YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; |
6312 |
- } |
6313 |
- |
6314 |
- YY_CURRENT_BUFFER_LVALUE = new_buffer; |
6315 |
- yy_load_buffer_state( yyscanner ); |
6316 |
- |
6317 |
- /* We don't actually know whether we did this switch during |
6318 |
- * EOF (yywrap()) processing, but the only time this flag |
6319 |
- * is looked at is after yywrap() is called, so it's safe |
6320 |
- * to go ahead and always set it. |
6321 |
- */ |
6322 |
- yyg->yy_did_buffer_switch_on_eof = 1; |
6323 |
-} |
6324 |
- |
6325 |
-static void yy_load_buffer_state (yyscan_t yyscanner) |
6326 |
-{ |
6327 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
6328 |
- yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; |
6329 |
- yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; |
6330 |
- yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; |
6331 |
- yyg->yy_hold_char = *yyg->yy_c_buf_p; |
6332 |
-} |
6333 |
- |
6334 |
-/** Allocate and initialize an input buffer state. |
6335 |
- * @param file A readable stream. |
6336 |
- * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. |
6337 |
- * @param yyscanner The scanner object. |
6338 |
- * @return the allocated buffer state. |
6339 |
- */ |
6340 |
- YY_BUFFER_STATE yy_create_buffer (FILE * file, int size , yyscan_t yyscanner) |
6341 |
-{ |
6342 |
- YY_BUFFER_STATE b; |
6343 |
- |
6344 |
- b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner ); |
6345 |
- if ( ! b ) |
6346 |
- YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); |
6347 |
- |
6348 |
- b->yy_buf_size = size; |
6349 |
- |
6350 |
- /* yy_ch_buf has to be 2 characters longer than the size given because |
6351 |
- * we need to put in 2 end-of-buffer characters. |
6352 |
- */ |
6353 |
- b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) , yyscanner ); |
6354 |
- if ( ! b->yy_ch_buf ) |
6355 |
- YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); |
6356 |
- |
6357 |
- b->yy_is_our_buffer = 1; |
6358 |
- |
6359 |
- yy_init_buffer( b, file , yyscanner); |
6360 |
- |
6361 |
- return b; |
6362 |
-} |
6363 |
- |
6364 |
-/** Destroy the buffer. |
6365 |
- * @param b a buffer created with yy_create_buffer() |
6366 |
- * @param yyscanner The scanner object. |
6367 |
- */ |
6368 |
- void yy_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) |
6369 |
-{ |
6370 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
6371 |
- |
6372 |
- if ( ! b ) |
6373 |
- return; |
6374 |
- |
6375 |
- if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ |
6376 |
- YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; |
6377 |
- |
6378 |
- if ( b->yy_is_our_buffer ) |
6379 |
- yyfree( (void *) b->yy_ch_buf , yyscanner ); |
6380 |
- |
6381 |
- yyfree( (void *) b , yyscanner ); |
6382 |
-} |
6383 |
- |
6384 |
-/* Initializes or reinitializes a buffer. |
6385 |
- * This function is sometimes called more than once on the same buffer, |
6386 |
- * such as during a yyrestart() or at EOF. |
6387 |
- */ |
6388 |
- static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner) |
6389 |
- |
6390 |
-{ |
6391 |
- int oerrno = errno; |
6392 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
6393 |
- |
6394 |
- yy_flush_buffer( b , yyscanner); |
6395 |
- |
6396 |
- b->yy_input_file = file; |
6397 |
- b->yy_fill_buffer = 1; |
6398 |
- |
6399 |
- /* If b is the current buffer, then yy_init_buffer was _probably_ |
6400 |
- * called from yyrestart() or through yy_get_next_buffer. |
6401 |
- * In that case, we don't want to reset the lineno or column. |
6402 |
- */ |
6403 |
- if (b != YY_CURRENT_BUFFER){ |
6404 |
- b->yy_bs_lineno = 1; |
6405 |
- b->yy_bs_column = 0; |
6406 |
- } |
6407 |
- |
6408 |
- b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; |
6409 |
- |
6410 |
- errno = oerrno; |
6411 |
-} |
6412 |
- |
6413 |
-/** Discard all buffered characters. On the next scan, YY_INPUT will be called. |
6414 |
- * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. |
6415 |
- * @param yyscanner The scanner object. |
6416 |
- */ |
6417 |
- void yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) |
6418 |
-{ |
6419 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
6420 |
- if ( ! b ) |
6421 |
- return; |
6422 |
- |
6423 |
- b->yy_n_chars = 0; |
6424 |
- |
6425 |
- /* We always need two end-of-buffer characters. The first causes |
6426 |
- * a transition to the end-of-buffer state. The second causes |
6427 |
- * a jam in that state. |
6428 |
- */ |
6429 |
- b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; |
6430 |
- b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; |
6431 |
- |
6432 |
- b->yy_buf_pos = &b->yy_ch_buf[0]; |
6433 |
- |
6434 |
- b->yy_at_bol = 1; |
6435 |
- b->yy_buffer_status = YY_BUFFER_NEW; |
6436 |
- |
6437 |
- if ( b == YY_CURRENT_BUFFER ) |
6438 |
- yy_load_buffer_state( yyscanner ); |
6439 |
-} |
6440 |
- |
6441 |
-/** Pushes the new state onto the stack. The new state becomes |
6442 |
- * the current state. This function will allocate the stack |
6443 |
- * if necessary. |
6444 |
- * @param new_buffer The new state. |
6445 |
- * @param yyscanner The scanner object. |
6446 |
- */ |
6447 |
-void yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) |
6448 |
-{ |
6449 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
6450 |
- if (new_buffer == NULL) |
6451 |
- return; |
6452 |
- |
6453 |
- yyensure_buffer_stack(yyscanner); |
6454 |
- |
6455 |
- /* This block is copied from yy_switch_to_buffer. */ |
6456 |
- if ( YY_CURRENT_BUFFER ) |
6457 |
- { |
6458 |
- /* Flush out information for old buffer. */ |
6459 |
- *yyg->yy_c_buf_p = yyg->yy_hold_char; |
6460 |
- YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; |
6461 |
- YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; |
6462 |
- } |
6463 |
- |
6464 |
- /* Only push if top exists. Otherwise, replace top. */ |
6465 |
- if (YY_CURRENT_BUFFER) |
6466 |
- yyg->yy_buffer_stack_top++; |
6467 |
- YY_CURRENT_BUFFER_LVALUE = new_buffer; |
6468 |
- |
6469 |
- /* copied from yy_switch_to_buffer. */ |
6470 |
- yy_load_buffer_state( yyscanner ); |
6471 |
- yyg->yy_did_buffer_switch_on_eof = 1; |
6472 |
-} |
6473 |
- |
6474 |
-/** Removes and deletes the top of the stack, if present. |
6475 |
- * The next element becomes the new top. |
6476 |
- * @param yyscanner The scanner object. |
6477 |
- */ |
6478 |
-void yypop_buffer_state (yyscan_t yyscanner) |
6479 |
-{ |
6480 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
6481 |
- if (!YY_CURRENT_BUFFER) |
6482 |
- return; |
6483 |
- |
6484 |
- yy_delete_buffer(YY_CURRENT_BUFFER , yyscanner); |
6485 |
- YY_CURRENT_BUFFER_LVALUE = NULL; |
6486 |
- if (yyg->yy_buffer_stack_top > 0) |
6487 |
- --yyg->yy_buffer_stack_top; |
6488 |
- |
6489 |
- if (YY_CURRENT_BUFFER) { |
6490 |
- yy_load_buffer_state( yyscanner ); |
6491 |
- yyg->yy_did_buffer_switch_on_eof = 1; |
6492 |
- } |
6493 |
-} |
6494 |
- |
6495 |
-/* Allocates the stack if it does not exist. |
6496 |
- * Guarantees space for at least one push. |
6497 |
- */ |
6498 |
-static void yyensure_buffer_stack (yyscan_t yyscanner) |
6499 |
-{ |
6500 |
- yy_size_t num_to_alloc; |
6501 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
6502 |
- |
6503 |
- if (!yyg->yy_buffer_stack) { |
6504 |
- |
6505 |
- /* First allocation is just for 2 elements, since we don't know if this |
6506 |
- * scanner will even need a stack. We use 2 instead of 1 to avoid an |
6507 |
- * immediate realloc on the next call. |
6508 |
- */ |
6509 |
- num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ |
6510 |
- yyg->yy_buffer_stack = (struct yy_buffer_state**)yyalloc |
6511 |
- (num_to_alloc * sizeof(struct yy_buffer_state*) |
6512 |
- , yyscanner); |
6513 |
- if ( ! yyg->yy_buffer_stack ) |
6514 |
- YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); |
6515 |
- |
6516 |
- memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*)); |
6517 |
- |
6518 |
- yyg->yy_buffer_stack_max = num_to_alloc; |
6519 |
- yyg->yy_buffer_stack_top = 0; |
6520 |
- return; |
6521 |
- } |
6522 |
- |
6523 |
- if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){ |
6524 |
- |
6525 |
- /* Increase the buffer to prepare for a possible push. */ |
6526 |
- yy_size_t grow_size = 8 /* arbitrary grow size */; |
6527 |
- |
6528 |
- num_to_alloc = yyg->yy_buffer_stack_max + grow_size; |
6529 |
- yyg->yy_buffer_stack = (struct yy_buffer_state**)yyrealloc |
6530 |
- (yyg->yy_buffer_stack, |
6531 |
- num_to_alloc * sizeof(struct yy_buffer_state*) |
6532 |
- , yyscanner); |
6533 |
- if ( ! yyg->yy_buffer_stack ) |
6534 |
- YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); |
6535 |
- |
6536 |
- /* zero only the new slots.*/ |
6537 |
- memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*)); |
6538 |
- yyg->yy_buffer_stack_max = num_to_alloc; |
6539 |
- } |
6540 |
-} |
6541 |
- |
6542 |
-/** Setup the input buffer state to scan directly from a user-specified character buffer. |
6543 |
- * @param base the character buffer |
6544 |
- * @param size the size in bytes of the character buffer |
6545 |
- * @param yyscanner The scanner object. |
6546 |
- * @return the newly allocated buffer state object. |
6547 |
- */ |
6548 |
-YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) |
6549 |
-{ |
6550 |
- YY_BUFFER_STATE b; |
6551 |
- |
6552 |
- if ( size < 2 || |
6553 |
- base[size-2] != YY_END_OF_BUFFER_CHAR || |
6554 |
- base[size-1] != YY_END_OF_BUFFER_CHAR ) |
6555 |
- /* They forgot to leave room for the EOB's. */ |
6556 |
- return NULL; |
6557 |
- |
6558 |
- b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner ); |
6559 |
- if ( ! b ) |
6560 |
- YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); |
6561 |
- |
6562 |
- b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */ |
6563 |
- b->yy_buf_pos = b->yy_ch_buf = base; |
6564 |
- b->yy_is_our_buffer = 0; |
6565 |
- b->yy_input_file = NULL; |
6566 |
- b->yy_n_chars = b->yy_buf_size; |
6567 |
- b->yy_is_interactive = 0; |
6568 |
- b->yy_at_bol = 1; |
6569 |
- b->yy_fill_buffer = 0; |
6570 |
- b->yy_buffer_status = YY_BUFFER_NEW; |
6571 |
- |
6572 |
- yy_switch_to_buffer( b , yyscanner ); |
6573 |
- |
6574 |
- return b; |
6575 |
-} |
6576 |
- |
6577 |
-/** Setup the input buffer state to scan a string. The next call to yylex() will |
6578 |
- * scan from a @e copy of @a str. |
6579 |
- * @param yystr a NUL-terminated string to scan |
6580 |
- * @param yyscanner The scanner object. |
6581 |
- * @return the newly allocated buffer state object. |
6582 |
- * @note If you want to scan bytes that may contain NUL values, then use |
6583 |
- * yy_scan_bytes() instead. |
6584 |
- */ |
6585 |
-YY_BUFFER_STATE yy_scan_string (const char * yystr , yyscan_t yyscanner) |
6586 |
-{ |
6587 |
- |
6588 |
- return yy_scan_bytes( yystr, (int) strlen(yystr) , yyscanner); |
6589 |
-} |
6590 |
- |
6591 |
-/** Setup the input buffer state to scan the given bytes. The next call to yylex() will |
6592 |
- * scan from a @e copy of @a bytes. |
6593 |
- * @param yybytes the byte buffer to scan |
6594 |
- * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. |
6595 |
- * @param yyscanner The scanner object. |
6596 |
- * @return the newly allocated buffer state object. |
6597 |
- */ |
6598 |
-YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len , yyscan_t yyscanner) |
6599 |
-{ |
6600 |
- YY_BUFFER_STATE b; |
6601 |
- char *buf; |
6602 |
- yy_size_t n; |
6603 |
- int i; |
6604 |
- |
6605 |
- /* Get memory for full buffer, including space for trailing EOB's. */ |
6606 |
- n = (yy_size_t) (_yybytes_len + 2); |
6607 |
- buf = (char *) yyalloc( n , yyscanner ); |
6608 |
- if ( ! buf ) |
6609 |
- YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); |
6610 |
- |
6611 |
- for ( i = 0; i < _yybytes_len; ++i ) |
6612 |
- buf[i] = yybytes[i]; |
6613 |
- |
6614 |
- buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; |
6615 |
- |
6616 |
- b = yy_scan_buffer( buf, n , yyscanner); |
6617 |
- if ( ! b ) |
6618 |
- YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); |
6619 |
- |
6620 |
- /* It's okay to grow etc. this buffer, and we should throw it |
6621 |
- * away when we're done. |
6622 |
- */ |
6623 |
- b->yy_is_our_buffer = 1; |
6624 |
- |
6625 |
- return b; |
6626 |
-} |
6627 |
- |
6628 |
-#ifndef YY_EXIT_FAILURE |
6629 |
-#define YY_EXIT_FAILURE 2 |
6630 |
-#endif |
6631 |
- |
6632 |
-static void yynoreturn yy_fatal_error (const char* msg , yyscan_t yyscanner) |
6633 |
-{ |
6634 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
6635 |
- (void)yyg; |
6636 |
- fprintf( stderr, "%s\n", msg ); |
6637 |
- exit( YY_EXIT_FAILURE ); |
6638 |
-} |
6639 |
- |
6640 |
-/* Redefine yyless() so it works in section 3 code. */ |
6641 |
- |
6642 |
-#undef yyless |
6643 |
-#define yyless(n) \ |
6644 |
- do \ |
6645 |
- { \ |
6646 |
- /* Undo effects of setting up yytext. */ \ |
6647 |
- int yyless_macro_arg = (n); \ |
6648 |
- YY_LESS_LINENO(yyless_macro_arg);\ |
6649 |
- yytext[yyleng] = yyg->yy_hold_char; \ |
6650 |
- yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ |
6651 |
- yyg->yy_hold_char = *yyg->yy_c_buf_p; \ |
6652 |
- *yyg->yy_c_buf_p = '\0'; \ |
6653 |
- yyleng = yyless_macro_arg; \ |
6654 |
- } \ |
6655 |
- while ( 0 ) |
6656 |
- |
6657 |
-/* Accessor methods (get/set functions) to struct members. */ |
6658 |
- |
6659 |
-/** Get the user-defined data for this scanner. |
6660 |
- * @param yyscanner The scanner object. |
6661 |
- */ |
6662 |
-YY_EXTRA_TYPE yyget_extra (yyscan_t yyscanner) |
6663 |
-{ |
6664 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
6665 |
- return yyextra; |
6666 |
-} |
6667 |
- |
6668 |
-/** Get the current line number. |
6669 |
- * @param yyscanner The scanner object. |
6670 |
- */ |
6671 |
-int yyget_lineno (yyscan_t yyscanner) |
6672 |
-{ |
6673 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
6674 |
- |
6675 |
- if (! YY_CURRENT_BUFFER) |
6676 |
- return 0; |
6677 |
- |
6678 |
- return yylineno; |
6679 |
-} |
6680 |
- |
6681 |
-/** Get the current column number. |
6682 |
- * @param yyscanner The scanner object. |
6683 |
- */ |
6684 |
-int yyget_column (yyscan_t yyscanner) |
6685 |
-{ |
6686 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
6687 |
- |
6688 |
- if (! YY_CURRENT_BUFFER) |
6689 |
- return 0; |
6690 |
- |
6691 |
- return yycolumn; |
6692 |
-} |
6693 |
- |
6694 |
-/** Get the input stream. |
6695 |
- * @param yyscanner The scanner object. |
6696 |
- */ |
6697 |
-FILE *yyget_in (yyscan_t yyscanner) |
6698 |
-{ |
6699 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
6700 |
- return yyin; |
6701 |
-} |
6702 |
- |
6703 |
-/** Get the output stream. |
6704 |
- * @param yyscanner The scanner object. |
6705 |
- */ |
6706 |
-FILE *yyget_out (yyscan_t yyscanner) |
6707 |
-{ |
6708 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
6709 |
- return yyout; |
6710 |
-} |
6711 |
- |
6712 |
-/** Get the length of the current token. |
6713 |
- * @param yyscanner The scanner object. |
6714 |
- */ |
6715 |
-int yyget_leng (yyscan_t yyscanner) |
6716 |
-{ |
6717 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
6718 |
- return yyleng; |
6719 |
-} |
6720 |
- |
6721 |
-/** Get the current token. |
6722 |
- * @param yyscanner The scanner object. |
6723 |
- */ |
6724 |
- |
6725 |
-char *yyget_text (yyscan_t yyscanner) |
6726 |
-{ |
6727 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
6728 |
- return yytext; |
6729 |
-} |
6730 |
- |
6731 |
-/** Set the user-defined data. This data is never touched by the scanner. |
6732 |
- * @param user_defined The data to be associated with this scanner. |
6733 |
- * @param yyscanner The scanner object. |
6734 |
- */ |
6735 |
-void yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner) |
6736 |
-{ |
6737 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
6738 |
- yyextra = user_defined ; |
6739 |
-} |
6740 |
- |
6741 |
-/** Set the current line number. |
6742 |
- * @param _line_number line number |
6743 |
- * @param yyscanner The scanner object. |
6744 |
- */ |
6745 |
-void yyset_lineno (int _line_number , yyscan_t yyscanner) |
6746 |
-{ |
6747 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
6748 |
- |
6749 |
- /* lineno is only valid if an input buffer exists. */ |
6750 |
- if (! YY_CURRENT_BUFFER ) |
6751 |
- YY_FATAL_ERROR( "yyset_lineno called with no buffer" ); |
6752 |
- |
6753 |
- yylineno = _line_number; |
6754 |
-} |
6755 |
- |
6756 |
-/** Set the current column. |
6757 |
- * @param _column_no column number |
6758 |
- * @param yyscanner The scanner object. |
6759 |
- */ |
6760 |
-void yyset_column (int _column_no , yyscan_t yyscanner) |
6761 |
-{ |
6762 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
6763 |
- |
6764 |
- /* column is only valid if an input buffer exists. */ |
6765 |
- if (! YY_CURRENT_BUFFER ) |
6766 |
- YY_FATAL_ERROR( "yyset_column called with no buffer" ); |
6767 |
- |
6768 |
- yycolumn = _column_no; |
6769 |
-} |
6770 |
- |
6771 |
-/** Set the input stream. This does not discard the current |
6772 |
- * input buffer. |
6773 |
- * @param _in_str A readable stream. |
6774 |
- * @param yyscanner The scanner object. |
6775 |
- * @see yy_switch_to_buffer |
6776 |
- */ |
6777 |
-void yyset_in (FILE * _in_str , yyscan_t yyscanner) |
6778 |
-{ |
6779 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
6780 |
- yyin = _in_str ; |
6781 |
-} |
6782 |
- |
6783 |
-void yyset_out (FILE * _out_str , yyscan_t yyscanner) |
6784 |
-{ |
6785 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
6786 |
- yyout = _out_str ; |
6787 |
-} |
6788 |
- |
6789 |
-int yyget_debug (yyscan_t yyscanner) |
6790 |
-{ |
6791 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
6792 |
- return yy_flex_debug; |
6793 |
-} |
6794 |
- |
6795 |
-void yyset_debug (int _bdebug , yyscan_t yyscanner) |
6796 |
-{ |
6797 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
6798 |
- yy_flex_debug = _bdebug ; |
6799 |
-} |
6800 |
- |
6801 |
-/* Accessor methods for yylval and yylloc */ |
6802 |
- |
6803 |
-YYSTYPE * yyget_lval (yyscan_t yyscanner) |
6804 |
-{ |
6805 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
6806 |
- return yylval; |
6807 |
-} |
6808 |
- |
6809 |
-void yyset_lval (YYSTYPE * yylval_param , yyscan_t yyscanner) |
6810 |
-{ |
6811 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
6812 |
- yylval = yylval_param; |
6813 |
-} |
6814 |
- |
6815 |
-/* User-visible API */ |
6816 |
- |
6817 |
-/* yylex_init is special because it creates the scanner itself, so it is |
6818 |
- * the ONLY reentrant function that doesn't take the scanner as the last argument. |
6819 |
- * That's why we explicitly handle the declaration, instead of using our macros. |
6820 |
- */ |
6821 |
-int yylex_init(yyscan_t* ptr_yy_globals) |
6822 |
-{ |
6823 |
- if (ptr_yy_globals == NULL){ |
6824 |
- errno = EINVAL; |
6825 |
- return 1; |
6826 |
- } |
6827 |
- |
6828 |
- *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), NULL ); |
6829 |
- |
6830 |
- if (*ptr_yy_globals == NULL){ |
6831 |
- errno = ENOMEM; |
6832 |
- return 1; |
6833 |
- } |
6834 |
- |
6835 |
- /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ |
6836 |
- memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); |
6837 |
- |
6838 |
- return yy_init_globals ( *ptr_yy_globals ); |
6839 |
-} |
6840 |
- |
6841 |
-/* yylex_init_extra has the same functionality as yylex_init, but follows the |
6842 |
- * convention of taking the scanner as the last argument. Note however, that |
6843 |
- * this is a *pointer* to a scanner, as it will be allocated by this call (and |
6844 |
- * is the reason, too, why this function also must handle its own declaration). |
6845 |
- * The user defined value in the first argument will be available to yyalloc in |
6846 |
- * the yyextra field. |
6847 |
- */ |
6848 |
-int yylex_init_extra( YY_EXTRA_TYPE yy_user_defined, yyscan_t* ptr_yy_globals ) |
6849 |
-{ |
6850 |
- struct yyguts_t dummy_yyguts; |
6851 |
- |
6852 |
- yyset_extra (yy_user_defined, &dummy_yyguts); |
6853 |
- |
6854 |
- if (ptr_yy_globals == NULL){ |
6855 |
- errno = EINVAL; |
6856 |
- return 1; |
6857 |
- } |
6858 |
- |
6859 |
- *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts ); |
6860 |
- |
6861 |
- if (*ptr_yy_globals == NULL){ |
6862 |
- errno = ENOMEM; |
6863 |
- return 1; |
6864 |
- } |
6865 |
- |
6866 |
- /* By setting to 0xAA, we expose bugs in |
6867 |
- yy_init_globals. Leave at 0x00 for releases. */ |
6868 |
- memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); |
6869 |
- |
6870 |
- yyset_extra (yy_user_defined, *ptr_yy_globals); |
6871 |
- |
6872 |
- return yy_init_globals ( *ptr_yy_globals ); |
6873 |
-} |
6874 |
- |
6875 |
-static int yy_init_globals (yyscan_t yyscanner) |
6876 |
-{ |
6877 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
6878 |
- /* Initialization is the same as for the non-reentrant scanner. |
6879 |
- * This function is called from yylex_destroy(), so don't allocate here. |
6880 |
- */ |
6881 |
- |
6882 |
- yyg->yy_buffer_stack = NULL; |
6883 |
- yyg->yy_buffer_stack_top = 0; |
6884 |
- yyg->yy_buffer_stack_max = 0; |
6885 |
- yyg->yy_c_buf_p = NULL; |
6886 |
- yyg->yy_init = 0; |
6887 |
- yyg->yy_start = 0; |
6888 |
- |
6889 |
- yyg->yy_start_stack_ptr = 0; |
6890 |
- yyg->yy_start_stack_depth = 0; |
6891 |
- yyg->yy_start_stack = NULL; |
6892 |
- |
6893 |
-/* Defined in main.c */ |
6894 |
-#ifdef YY_STDINIT |
6895 |
- yyin = stdin; |
6896 |
- yyout = stdout; |
6897 |
-#else |
6898 |
- yyin = NULL; |
6899 |
- yyout = NULL; |
6900 |
-#endif |
6901 |
- |
6902 |
- /* For future reference: Set errno on error, since we are called by |
6903 |
- * yylex_init() |
6904 |
- */ |
6905 |
- return 0; |
6906 |
-} |
6907 |
- |
6908 |
-/* yylex_destroy is for both reentrant and non-reentrant scanners. */ |
6909 |
-int yylex_destroy (yyscan_t yyscanner) |
6910 |
-{ |
6911 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
6912 |
- |
6913 |
- /* Pop the buffer stack, destroying each element. */ |
6914 |
- while(YY_CURRENT_BUFFER){ |
6915 |
- yy_delete_buffer( YY_CURRENT_BUFFER , yyscanner ); |
6916 |
- YY_CURRENT_BUFFER_LVALUE = NULL; |
6917 |
- yypop_buffer_state(yyscanner); |
6918 |
- } |
6919 |
- |
6920 |
- /* Destroy the stack itself. */ |
6921 |
- yyfree(yyg->yy_buffer_stack , yyscanner); |
6922 |
- yyg->yy_buffer_stack = NULL; |
6923 |
- |
6924 |
- /* Destroy the start condition stack. */ |
6925 |
- yyfree( yyg->yy_start_stack , yyscanner ); |
6926 |
- yyg->yy_start_stack = NULL; |
6927 |
- |
6928 |
- /* Reset the globals. This is important in a non-reentrant scanner so the next time |
6929 |
- * yylex() is called, initialization will occur. */ |
6930 |
- yy_init_globals( yyscanner); |
6931 |
- |
6932 |
- /* Destroy the main struct (reentrant only). */ |
6933 |
- yyfree ( yyscanner , yyscanner ); |
6934 |
- yyscanner = NULL; |
6935 |
- return 0; |
6936 |
-} |
6937 |
- |
6938 |
-/* |
6939 |
- * Internal utility routines. |
6940 |
- */ |
6941 |
- |
6942 |
-#ifndef yytext_ptr |
6943 |
-static void yy_flex_strncpy (char* s1, const char * s2, int n , yyscan_t yyscanner) |
6944 |
-{ |
6945 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
6946 |
- (void)yyg; |
6947 |
- |
6948 |
- int i; |
6949 |
- for ( i = 0; i < n; ++i ) |
6950 |
- s1[i] = s2[i]; |
6951 |
-} |
6952 |
-#endif |
6953 |
- |
6954 |
-#ifdef YY_NEED_STRLEN |
6955 |
-static int yy_flex_strlen (const char * s , yyscan_t yyscanner) |
6956 |
-{ |
6957 |
- int n; |
6958 |
- for ( n = 0; s[n]; ++n ) |
6959 |
- ; |
6960 |
- |
6961 |
- return n; |
6962 |
-} |
6963 |
-#endif |
6964 |
- |
6965 |
-void *yyalloc (yy_size_t size , yyscan_t yyscanner) |
6966 |
-{ |
6967 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
6968 |
- (void)yyg; |
6969 |
- return malloc(size); |
6970 |
-} |
6971 |
- |
6972 |
-void *yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner) |
6973 |
-{ |
6974 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
6975 |
- (void)yyg; |
6976 |
- |
6977 |
- /* The cast to (char *) in the following accommodates both |
6978 |
- * implementations that use char* generic pointers, and those |
6979 |
- * that use void* generic pointers. It works with the latter |
6980 |
- * because both ANSI C and C++ allow castless assignment from |
6981 |
- * any pointer type to void*, and deal with argument conversions |
6982 |
- * as though doing an assignment. |
6983 |
- */ |
6984 |
- return realloc(ptr, size); |
6985 |
-} |
6986 |
- |
6987 |
-void yyfree (void * ptr , yyscan_t yyscanner) |
6988 |
-{ |
6989 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
6990 |
- (void)yyg; |
6991 |
- free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ |
6992 |
-} |
6993 |
- |
6994 |
-#define YYTABLES_NAME "yytables" |
6995 |
- |
6996 |
-#line 73 "expr_parser.l" |
6997 |
- |
6998 |
- |
6999 |
-int expr_wrap(yyscan_t scanner) |
7000 |
-{ |
7001 |
- return 1; |
7002 |
-} |
7003 |
- |
7004 |
|
7005 |
diff --git a/app-emulation/opennebula/files/opennebula-5.10.1/parsers/expr_parser.h b/app-emulation/opennebula/files/opennebula-5.10.1/parsers/expr_parser.h |
7006 |
deleted file mode 100644 |
7007 |
index dcb26ba..0000000 |
7008 |
--- a/app-emulation/opennebula/files/opennebula-5.10.1/parsers/expr_parser.h |
7009 |
+++ /dev/null |
7010 |
@@ -1,717 +0,0 @@ |
7011 |
-#ifndef expr_HEADER_H |
7012 |
-#define expr_HEADER_H 1 |
7013 |
-#define expr_IN_HEADER 1 |
7014 |
- |
7015 |
-#line 5 "expr_parser.h" |
7016 |
- |
7017 |
-#line 7 "expr_parser.h" |
7018 |
- |
7019 |
-#define YY_INT_ALIGNED short int |
7020 |
- |
7021 |
-/* A lexical scanner generated by flex */ |
7022 |
- |
7023 |
-#define FLEX_SCANNER |
7024 |
-#define YY_FLEX_MAJOR_VERSION 2 |
7025 |
-#define YY_FLEX_MINOR_VERSION 6 |
7026 |
-#define YY_FLEX_SUBMINOR_VERSION 4 |
7027 |
-#if YY_FLEX_SUBMINOR_VERSION > 0 |
7028 |
-#define FLEX_BETA |
7029 |
-#endif |
7030 |
- |
7031 |
-#ifdef yy_create_buffer |
7032 |
-#define expr__create_buffer_ALREADY_DEFINED |
7033 |
-#else |
7034 |
-#define yy_create_buffer expr__create_buffer |
7035 |
-#endif |
7036 |
- |
7037 |
-#ifdef yy_delete_buffer |
7038 |
-#define expr__delete_buffer_ALREADY_DEFINED |
7039 |
-#else |
7040 |
-#define yy_delete_buffer expr__delete_buffer |
7041 |
-#endif |
7042 |
- |
7043 |
-#ifdef yy_scan_buffer |
7044 |
-#define expr__scan_buffer_ALREADY_DEFINED |
7045 |
-#else |
7046 |
-#define yy_scan_buffer expr__scan_buffer |
7047 |
-#endif |
7048 |
- |
7049 |
-#ifdef yy_scan_string |
7050 |
-#define expr__scan_string_ALREADY_DEFINED |
7051 |
-#else |
7052 |
-#define yy_scan_string expr__scan_string |
7053 |
-#endif |
7054 |
- |
7055 |
-#ifdef yy_scan_bytes |
7056 |
-#define expr__scan_bytes_ALREADY_DEFINED |
7057 |
-#else |
7058 |
-#define yy_scan_bytes expr__scan_bytes |
7059 |
-#endif |
7060 |
- |
7061 |
-#ifdef yy_init_buffer |
7062 |
-#define expr__init_buffer_ALREADY_DEFINED |
7063 |
-#else |
7064 |
-#define yy_init_buffer expr__init_buffer |
7065 |
-#endif |
7066 |
- |
7067 |
-#ifdef yy_flush_buffer |
7068 |
-#define expr__flush_buffer_ALREADY_DEFINED |
7069 |
-#else |
7070 |
-#define yy_flush_buffer expr__flush_buffer |
7071 |
-#endif |
7072 |
- |
7073 |
-#ifdef yy_load_buffer_state |
7074 |
-#define expr__load_buffer_state_ALREADY_DEFINED |
7075 |
-#else |
7076 |
-#define yy_load_buffer_state expr__load_buffer_state |
7077 |
-#endif |
7078 |
- |
7079 |
-#ifdef yy_switch_to_buffer |
7080 |
-#define expr__switch_to_buffer_ALREADY_DEFINED |
7081 |
-#else |
7082 |
-#define yy_switch_to_buffer expr__switch_to_buffer |
7083 |
-#endif |
7084 |
- |
7085 |
-#ifdef yypush_buffer_state |
7086 |
-#define expr_push_buffer_state_ALREADY_DEFINED |
7087 |
-#else |
7088 |
-#define yypush_buffer_state expr_push_buffer_state |
7089 |
-#endif |
7090 |
- |
7091 |
-#ifdef yypop_buffer_state |
7092 |
-#define expr_pop_buffer_state_ALREADY_DEFINED |
7093 |
-#else |
7094 |
-#define yypop_buffer_state expr_pop_buffer_state |
7095 |
-#endif |
7096 |
- |
7097 |
-#ifdef yyensure_buffer_stack |
7098 |
-#define expr_ensure_buffer_stack_ALREADY_DEFINED |
7099 |
-#else |
7100 |
-#define yyensure_buffer_stack expr_ensure_buffer_stack |
7101 |
-#endif |
7102 |
- |
7103 |
-#ifdef yylex |
7104 |
-#define expr_lex_ALREADY_DEFINED |
7105 |
-#else |
7106 |
-#define yylex expr_lex |
7107 |
-#endif |
7108 |
- |
7109 |
-#ifdef yyrestart |
7110 |
-#define expr_restart_ALREADY_DEFINED |
7111 |
-#else |
7112 |
-#define yyrestart expr_restart |
7113 |
-#endif |
7114 |
- |
7115 |
-#ifdef yylex_init |
7116 |
-#define expr_lex_init_ALREADY_DEFINED |
7117 |
-#else |
7118 |
-#define yylex_init expr_lex_init |
7119 |
-#endif |
7120 |
- |
7121 |
-#ifdef yylex_init_extra |
7122 |
-#define expr_lex_init_extra_ALREADY_DEFINED |
7123 |
-#else |
7124 |
-#define yylex_init_extra expr_lex_init_extra |
7125 |
-#endif |
7126 |
- |
7127 |
-#ifdef yylex_destroy |
7128 |
-#define expr_lex_destroy_ALREADY_DEFINED |
7129 |
-#else |
7130 |
-#define yylex_destroy expr_lex_destroy |
7131 |
-#endif |
7132 |
- |
7133 |
-#ifdef yyget_debug |
7134 |
-#define expr_get_debug_ALREADY_DEFINED |
7135 |
-#else |
7136 |
-#define yyget_debug expr_get_debug |
7137 |
-#endif |
7138 |
- |
7139 |
-#ifdef yyset_debug |
7140 |
-#define expr_set_debug_ALREADY_DEFINED |
7141 |
-#else |
7142 |
-#define yyset_debug expr_set_debug |
7143 |
-#endif |
7144 |
- |
7145 |
-#ifdef yyget_extra |
7146 |
-#define expr_get_extra_ALREADY_DEFINED |
7147 |
-#else |
7148 |
-#define yyget_extra expr_get_extra |
7149 |
-#endif |
7150 |
- |
7151 |
-#ifdef yyset_extra |
7152 |
-#define expr_set_extra_ALREADY_DEFINED |
7153 |
-#else |
7154 |
-#define yyset_extra expr_set_extra |
7155 |
-#endif |
7156 |
- |
7157 |
-#ifdef yyget_in |
7158 |
-#define expr_get_in_ALREADY_DEFINED |
7159 |
-#else |
7160 |
-#define yyget_in expr_get_in |
7161 |
-#endif |
7162 |
- |
7163 |
-#ifdef yyset_in |
7164 |
-#define expr_set_in_ALREADY_DEFINED |
7165 |
-#else |
7166 |
-#define yyset_in expr_set_in |
7167 |
-#endif |
7168 |
- |
7169 |
-#ifdef yyget_out |
7170 |
-#define expr_get_out_ALREADY_DEFINED |
7171 |
-#else |
7172 |
-#define yyget_out expr_get_out |
7173 |
-#endif |
7174 |
- |
7175 |
-#ifdef yyset_out |
7176 |
-#define expr_set_out_ALREADY_DEFINED |
7177 |
-#else |
7178 |
-#define yyset_out expr_set_out |
7179 |
-#endif |
7180 |
- |
7181 |
-#ifdef yyget_leng |
7182 |
-#define expr_get_leng_ALREADY_DEFINED |
7183 |
-#else |
7184 |
-#define yyget_leng expr_get_leng |
7185 |
-#endif |
7186 |
- |
7187 |
-#ifdef yyget_text |
7188 |
-#define expr_get_text_ALREADY_DEFINED |
7189 |
-#else |
7190 |
-#define yyget_text expr_get_text |
7191 |
-#endif |
7192 |
- |
7193 |
-#ifdef yyget_lineno |
7194 |
-#define expr_get_lineno_ALREADY_DEFINED |
7195 |
-#else |
7196 |
-#define yyget_lineno expr_get_lineno |
7197 |
-#endif |
7198 |
- |
7199 |
-#ifdef yyset_lineno |
7200 |
-#define expr_set_lineno_ALREADY_DEFINED |
7201 |
-#else |
7202 |
-#define yyset_lineno expr_set_lineno |
7203 |
-#endif |
7204 |
- |
7205 |
-#ifdef yyget_column |
7206 |
-#define expr_get_column_ALREADY_DEFINED |
7207 |
-#else |
7208 |
-#define yyget_column expr_get_column |
7209 |
-#endif |
7210 |
- |
7211 |
-#ifdef yyset_column |
7212 |
-#define expr_set_column_ALREADY_DEFINED |
7213 |
-#else |
7214 |
-#define yyset_column expr_set_column |
7215 |
-#endif |
7216 |
- |
7217 |
-#ifdef yywrap |
7218 |
-#define expr_wrap_ALREADY_DEFINED |
7219 |
-#else |
7220 |
-#define yywrap expr_wrap |
7221 |
-#endif |
7222 |
- |
7223 |
-#ifdef yyget_lval |
7224 |
-#define expr_get_lval_ALREADY_DEFINED |
7225 |
-#else |
7226 |
-#define yyget_lval expr_get_lval |
7227 |
-#endif |
7228 |
- |
7229 |
-#ifdef yyset_lval |
7230 |
-#define expr_set_lval_ALREADY_DEFINED |
7231 |
-#else |
7232 |
-#define yyset_lval expr_set_lval |
7233 |
-#endif |
7234 |
- |
7235 |
-#ifdef yyalloc |
7236 |
-#define expr_alloc_ALREADY_DEFINED |
7237 |
-#else |
7238 |
-#define yyalloc expr_alloc |
7239 |
-#endif |
7240 |
- |
7241 |
-#ifdef yyrealloc |
7242 |
-#define expr_realloc_ALREADY_DEFINED |
7243 |
-#else |
7244 |
-#define yyrealloc expr_realloc |
7245 |
-#endif |
7246 |
- |
7247 |
-#ifdef yyfree |
7248 |
-#define expr_free_ALREADY_DEFINED |
7249 |
-#else |
7250 |
-#define yyfree expr_free |
7251 |
-#endif |
7252 |
- |
7253 |
-/* First, we deal with platform-specific or compiler-specific issues. */ |
7254 |
- |
7255 |
-/* begin standard C headers. */ |
7256 |
-#include <stdio.h> |
7257 |
-#include <string.h> |
7258 |
-#include <errno.h> |
7259 |
-#include <stdlib.h> |
7260 |
- |
7261 |
-/* end standard C headers. */ |
7262 |
- |
7263 |
-/* flex integer type definitions */ |
7264 |
- |
7265 |
-#ifndef FLEXINT_H |
7266 |
-#define FLEXINT_H |
7267 |
- |
7268 |
-/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */ |
7269 |
- |
7270 |
-#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L |
7271 |
- |
7272 |
-/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, |
7273 |
- * if you want the limit (max/min) macros for int types. |
7274 |
- */ |
7275 |
-#ifndef __STDC_LIMIT_MACROS |
7276 |
-#define __STDC_LIMIT_MACROS 1 |
7277 |
-#endif |
7278 |
- |
7279 |
-#include <inttypes.h> |
7280 |
-typedef int8_t flex_int8_t; |
7281 |
-typedef uint8_t flex_uint8_t; |
7282 |
-typedef int16_t flex_int16_t; |
7283 |
-typedef uint16_t flex_uint16_t; |
7284 |
-typedef int32_t flex_int32_t; |
7285 |
-typedef uint32_t flex_uint32_t; |
7286 |
-#else |
7287 |
-typedef signed char flex_int8_t; |
7288 |
-typedef short int flex_int16_t; |
7289 |
-typedef int flex_int32_t; |
7290 |
-typedef unsigned char flex_uint8_t; |
7291 |
-typedef unsigned short int flex_uint16_t; |
7292 |
-typedef unsigned int flex_uint32_t; |
7293 |
- |
7294 |
-/* Limits of integral types. */ |
7295 |
-#ifndef INT8_MIN |
7296 |
-#define INT8_MIN (-128) |
7297 |
-#endif |
7298 |
-#ifndef INT16_MIN |
7299 |
-#define INT16_MIN (-32767-1) |
7300 |
-#endif |
7301 |
-#ifndef INT32_MIN |
7302 |
-#define INT32_MIN (-2147483647-1) |
7303 |
-#endif |
7304 |
-#ifndef INT8_MAX |
7305 |
-#define INT8_MAX (127) |
7306 |
-#endif |
7307 |
-#ifndef INT16_MAX |
7308 |
-#define INT16_MAX (32767) |
7309 |
-#endif |
7310 |
-#ifndef INT32_MAX |
7311 |
-#define INT32_MAX (2147483647) |
7312 |
-#endif |
7313 |
-#ifndef UINT8_MAX |
7314 |
-#define UINT8_MAX (255U) |
7315 |
-#endif |
7316 |
-#ifndef UINT16_MAX |
7317 |
-#define UINT16_MAX (65535U) |
7318 |
-#endif |
7319 |
-#ifndef UINT32_MAX |
7320 |
-#define UINT32_MAX (4294967295U) |
7321 |
-#endif |
7322 |
- |
7323 |
-#ifndef SIZE_MAX |
7324 |
-#define SIZE_MAX (~(size_t)0) |
7325 |
-#endif |
7326 |
- |
7327 |
-#endif /* ! C99 */ |
7328 |
- |
7329 |
-#endif /* ! FLEXINT_H */ |
7330 |
- |
7331 |
-/* begin standard C++ headers. */ |
7332 |
- |
7333 |
-/* TODO: this is always defined, so inline it */ |
7334 |
-#define yyconst const |
7335 |
- |
7336 |
-#if defined(__GNUC__) && __GNUC__ >= 3 |
7337 |
-#define yynoreturn __attribute__((__noreturn__)) |
7338 |
-#else |
7339 |
-#define yynoreturn |
7340 |
-#endif |
7341 |
- |
7342 |
-/* An opaque pointer. */ |
7343 |
-#ifndef YY_TYPEDEF_YY_SCANNER_T |
7344 |
-#define YY_TYPEDEF_YY_SCANNER_T |
7345 |
-typedef void* yyscan_t; |
7346 |
-#endif |
7347 |
- |
7348 |
-/* For convenience, these vars (plus the bison vars far below) |
7349 |
- are macros in the reentrant scanner. */ |
7350 |
-#define yyin yyg->yyin_r |
7351 |
-#define yyout yyg->yyout_r |
7352 |
-#define yyextra yyg->yyextra_r |
7353 |
-#define yyleng yyg->yyleng_r |
7354 |
-#define yytext yyg->yytext_r |
7355 |
-#define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno) |
7356 |
-#define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column) |
7357 |
-#define yy_flex_debug yyg->yy_flex_debug_r |
7358 |
- |
7359 |
-/* Size of default input buffer. */ |
7360 |
-#ifndef YY_BUF_SIZE |
7361 |
-#ifdef __ia64__ |
7362 |
-/* On IA-64, the buffer size is 16k, not 8k. |
7363 |
- * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. |
7364 |
- * Ditto for the __ia64__ case accordingly. |
7365 |
- */ |
7366 |
-#define YY_BUF_SIZE 32768 |
7367 |
-#else |
7368 |
-#define YY_BUF_SIZE 16384 |
7369 |
-#endif /* __ia64__ */ |
7370 |
-#endif |
7371 |
- |
7372 |
-#ifndef YY_TYPEDEF_YY_BUFFER_STATE |
7373 |
-#define YY_TYPEDEF_YY_BUFFER_STATE |
7374 |
-typedef struct yy_buffer_state *YY_BUFFER_STATE; |
7375 |
-#endif |
7376 |
- |
7377 |
-#ifndef YY_TYPEDEF_YY_SIZE_T |
7378 |
-#define YY_TYPEDEF_YY_SIZE_T |
7379 |
-typedef size_t yy_size_t; |
7380 |
-#endif |
7381 |
- |
7382 |
-#ifndef YY_STRUCT_YY_BUFFER_STATE |
7383 |
-#define YY_STRUCT_YY_BUFFER_STATE |
7384 |
-struct yy_buffer_state |
7385 |
- { |
7386 |
- FILE *yy_input_file; |
7387 |
- |
7388 |
- char *yy_ch_buf; /* input buffer */ |
7389 |
- char *yy_buf_pos; /* current position in input buffer */ |
7390 |
- |
7391 |
- /* Size of input buffer in bytes, not including room for EOB |
7392 |
- * characters. |
7393 |
- */ |
7394 |
- int yy_buf_size; |
7395 |
- |
7396 |
- /* Number of characters read into yy_ch_buf, not including EOB |
7397 |
- * characters. |
7398 |
- */ |
7399 |
- int yy_n_chars; |
7400 |
- |
7401 |
- /* Whether we "own" the buffer - i.e., we know we created it, |
7402 |
- * and can realloc() it to grow it, and should free() it to |
7403 |
- * delete it. |
7404 |
- */ |
7405 |
- int yy_is_our_buffer; |
7406 |
- |
7407 |
- /* Whether this is an "interactive" input source; if so, and |
7408 |
- * if we're using stdio for input, then we want to use getc() |
7409 |
- * instead of fread(), to make sure we stop fetching input after |
7410 |
- * each newline. |
7411 |
- */ |
7412 |
- int yy_is_interactive; |
7413 |
- |
7414 |
- /* Whether we're considered to be at the beginning of a line. |
7415 |
- * If so, '^' rules will be active on the next match, otherwise |
7416 |
- * not. |
7417 |
- */ |
7418 |
- int yy_at_bol; |
7419 |
- |
7420 |
- int yy_bs_lineno; /**< The line count. */ |
7421 |
- int yy_bs_column; /**< The column count. */ |
7422 |
- |
7423 |
- /* Whether to try to fill the input buffer when we reach the |
7424 |
- * end of it. |
7425 |
- */ |
7426 |
- int yy_fill_buffer; |
7427 |
- |
7428 |
- int yy_buffer_status; |
7429 |
- |
7430 |
- }; |
7431 |
-#endif /* !YY_STRUCT_YY_BUFFER_STATE */ |
7432 |
- |
7433 |
-void yyrestart ( FILE *input_file , yyscan_t yyscanner ); |
7434 |
-void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); |
7435 |
-YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner ); |
7436 |
-void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); |
7437 |
-void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); |
7438 |
-void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); |
7439 |
-void yypop_buffer_state ( yyscan_t yyscanner ); |
7440 |
- |
7441 |
-YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner ); |
7442 |
-YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner ); |
7443 |
-YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len , yyscan_t yyscanner ); |
7444 |
- |
7445 |
-void *yyalloc ( yy_size_t , yyscan_t yyscanner ); |
7446 |
-void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner ); |
7447 |
-void yyfree ( void * , yyscan_t yyscanner ); |
7448 |
- |
7449 |
-/* Begin user sect3 */ |
7450 |
- |
7451 |
-#define yytext_ptr yytext_r |
7452 |
- |
7453 |
-#ifdef YY_HEADER_EXPORT_START_CONDITIONS |
7454 |
-#define INITIAL 0 |
7455 |
- |
7456 |
-#endif |
7457 |
- |
7458 |
-#ifndef YY_NO_UNISTD_H |
7459 |
-/* Special case for "unistd.h", since it is non-ANSI. We include it way |
7460 |
- * down here because we want the user's section 1 to have been scanned first. |
7461 |
- * The user has a chance to override it with an option. |
7462 |
- */ |
7463 |
-#include <unistd.h> |
7464 |
-#endif |
7465 |
- |
7466 |
-#ifndef YY_EXTRA_TYPE |
7467 |
-#define YY_EXTRA_TYPE void * |
7468 |
-#endif |
7469 |
- |
7470 |
-int yylex_init (yyscan_t* scanner); |
7471 |
- |
7472 |
-int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner); |
7473 |
- |
7474 |
-/* Accessor methods to globals. |
7475 |
- These are made visible to non-reentrant scanners for convenience. */ |
7476 |
- |
7477 |
-int yylex_destroy ( yyscan_t yyscanner ); |
7478 |
- |
7479 |
-int yyget_debug ( yyscan_t yyscanner ); |
7480 |
- |
7481 |
-void yyset_debug ( int debug_flag , yyscan_t yyscanner ); |
7482 |
- |
7483 |
-YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner ); |
7484 |
- |
7485 |
-void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner ); |
7486 |
- |
7487 |
-FILE *yyget_in ( yyscan_t yyscanner ); |
7488 |
- |
7489 |
-void yyset_in ( FILE * _in_str , yyscan_t yyscanner ); |
7490 |
- |
7491 |
-FILE *yyget_out ( yyscan_t yyscanner ); |
7492 |
- |
7493 |
-void yyset_out ( FILE * _out_str , yyscan_t yyscanner ); |
7494 |
- |
7495 |
- int yyget_leng ( yyscan_t yyscanner ); |
7496 |
- |
7497 |
-char *yyget_text ( yyscan_t yyscanner ); |
7498 |
- |
7499 |
-int yyget_lineno ( yyscan_t yyscanner ); |
7500 |
- |
7501 |
-void yyset_lineno ( int _line_number , yyscan_t yyscanner ); |
7502 |
- |
7503 |
-int yyget_column ( yyscan_t yyscanner ); |
7504 |
- |
7505 |
-void yyset_column ( int _column_no , yyscan_t yyscanner ); |
7506 |
- |
7507 |
-YYSTYPE * yyget_lval ( yyscan_t yyscanner ); |
7508 |
- |
7509 |
-void yyset_lval ( YYSTYPE * yylval_param , yyscan_t yyscanner ); |
7510 |
- |
7511 |
-/* Macros after this point can all be overridden by user definitions in |
7512 |
- * section 1. |
7513 |
- */ |
7514 |
- |
7515 |
-#ifndef YY_SKIP_YYWRAP |
7516 |
-#ifdef __cplusplus |
7517 |
-extern "C" int yywrap ( yyscan_t yyscanner ); |
7518 |
-#else |
7519 |
-extern int yywrap ( yyscan_t yyscanner ); |
7520 |
-#endif |
7521 |
-#endif |
7522 |
- |
7523 |
-#ifndef yytext_ptr |
7524 |
-static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner); |
7525 |
-#endif |
7526 |
- |
7527 |
-#ifdef YY_NEED_STRLEN |
7528 |
-static int yy_flex_strlen ( const char * , yyscan_t yyscanner); |
7529 |
-#endif |
7530 |
- |
7531 |
-#ifndef YY_NO_INPUT |
7532 |
- |
7533 |
-#endif |
7534 |
- |
7535 |
-/* Amount of stuff to slurp up with each read. */ |
7536 |
-#ifndef YY_READ_BUF_SIZE |
7537 |
-#ifdef __ia64__ |
7538 |
-/* On IA-64, the buffer size is 16k, not 8k */ |
7539 |
-#define YY_READ_BUF_SIZE 16384 |
7540 |
-#else |
7541 |
-#define YY_READ_BUF_SIZE 8192 |
7542 |
-#endif /* __ia64__ */ |
7543 |
-#endif |
7544 |
- |
7545 |
-/* Number of entries by which start-condition stack grows. */ |
7546 |
-#ifndef YY_START_STACK_INCR |
7547 |
-#define YY_START_STACK_INCR 25 |
7548 |
-#endif |
7549 |
- |
7550 |
-/* Default declaration of generated scanner - a define so the user can |
7551 |
- * easily add parameters. |
7552 |
- */ |
7553 |
-#ifndef YY_DECL |
7554 |
-#define YY_DECL_IS_OURS 1 |
7555 |
- |
7556 |
-extern int yylex \ |
7557 |
- (YYSTYPE * yylval_param , yyscan_t yyscanner); |
7558 |
- |
7559 |
-#define YY_DECL int yylex \ |
7560 |
- (YYSTYPE * yylval_param , yyscan_t yyscanner) |
7561 |
-#endif /* !YY_DECL */ |
7562 |
- |
7563 |
-/* yy_get_previous_state - get the state just before the EOB char was reached */ |
7564 |
- |
7565 |
-#undef YY_NEW_FILE |
7566 |
-#undef YY_FLUSH_BUFFER |
7567 |
-#undef yy_set_bol |
7568 |
-#undef yy_new_buffer |
7569 |
-#undef yy_set_interactive |
7570 |
-#undef YY_DO_BEFORE_ACTION |
7571 |
- |
7572 |
-#ifdef YY_DECL_IS_OURS |
7573 |
-#undef YY_DECL_IS_OURS |
7574 |
-#undef YY_DECL |
7575 |
-#endif |
7576 |
- |
7577 |
-#ifndef expr__create_buffer_ALREADY_DEFINED |
7578 |
-#undef yy_create_buffer |
7579 |
-#endif |
7580 |
-#ifndef expr__delete_buffer_ALREADY_DEFINED |
7581 |
-#undef yy_delete_buffer |
7582 |
-#endif |
7583 |
-#ifndef expr__scan_buffer_ALREADY_DEFINED |
7584 |
-#undef yy_scan_buffer |
7585 |
-#endif |
7586 |
-#ifndef expr__scan_string_ALREADY_DEFINED |
7587 |
-#undef yy_scan_string |
7588 |
-#endif |
7589 |
-#ifndef expr__scan_bytes_ALREADY_DEFINED |
7590 |
-#undef yy_scan_bytes |
7591 |
-#endif |
7592 |
-#ifndef expr__init_buffer_ALREADY_DEFINED |
7593 |
-#undef yy_init_buffer |
7594 |
-#endif |
7595 |
-#ifndef expr__flush_buffer_ALREADY_DEFINED |
7596 |
-#undef yy_flush_buffer |
7597 |
-#endif |
7598 |
-#ifndef expr__load_buffer_state_ALREADY_DEFINED |
7599 |
-#undef yy_load_buffer_state |
7600 |
-#endif |
7601 |
-#ifndef expr__switch_to_buffer_ALREADY_DEFINED |
7602 |
-#undef yy_switch_to_buffer |
7603 |
-#endif |
7604 |
-#ifndef expr_push_buffer_state_ALREADY_DEFINED |
7605 |
-#undef yypush_buffer_state |
7606 |
-#endif |
7607 |
-#ifndef expr_pop_buffer_state_ALREADY_DEFINED |
7608 |
-#undef yypop_buffer_state |
7609 |
-#endif |
7610 |
-#ifndef expr_ensure_buffer_stack_ALREADY_DEFINED |
7611 |
-#undef yyensure_buffer_stack |
7612 |
-#endif |
7613 |
-#ifndef expr_lex_ALREADY_DEFINED |
7614 |
-#undef yylex |
7615 |
-#endif |
7616 |
-#ifndef expr_restart_ALREADY_DEFINED |
7617 |
-#undef yyrestart |
7618 |
-#endif |
7619 |
-#ifndef expr_lex_init_ALREADY_DEFINED |
7620 |
-#undef yylex_init |
7621 |
-#endif |
7622 |
-#ifndef expr_lex_init_extra_ALREADY_DEFINED |
7623 |
-#undef yylex_init_extra |
7624 |
-#endif |
7625 |
-#ifndef expr_lex_destroy_ALREADY_DEFINED |
7626 |
-#undef yylex_destroy |
7627 |
-#endif |
7628 |
-#ifndef expr_get_debug_ALREADY_DEFINED |
7629 |
-#undef yyget_debug |
7630 |
-#endif |
7631 |
-#ifndef expr_set_debug_ALREADY_DEFINED |
7632 |
-#undef yyset_debug |
7633 |
-#endif |
7634 |
-#ifndef expr_get_extra_ALREADY_DEFINED |
7635 |
-#undef yyget_extra |
7636 |
-#endif |
7637 |
-#ifndef expr_set_extra_ALREADY_DEFINED |
7638 |
-#undef yyset_extra |
7639 |
-#endif |
7640 |
-#ifndef expr_get_in_ALREADY_DEFINED |
7641 |
-#undef yyget_in |
7642 |
-#endif |
7643 |
-#ifndef expr_set_in_ALREADY_DEFINED |
7644 |
-#undef yyset_in |
7645 |
-#endif |
7646 |
-#ifndef expr_get_out_ALREADY_DEFINED |
7647 |
-#undef yyget_out |
7648 |
-#endif |
7649 |
-#ifndef expr_set_out_ALREADY_DEFINED |
7650 |
-#undef yyset_out |
7651 |
-#endif |
7652 |
-#ifndef expr_get_leng_ALREADY_DEFINED |
7653 |
-#undef yyget_leng |
7654 |
-#endif |
7655 |
-#ifndef expr_get_text_ALREADY_DEFINED |
7656 |
-#undef yyget_text |
7657 |
-#endif |
7658 |
-#ifndef expr_get_lineno_ALREADY_DEFINED |
7659 |
-#undef yyget_lineno |
7660 |
-#endif |
7661 |
-#ifndef expr_set_lineno_ALREADY_DEFINED |
7662 |
-#undef yyset_lineno |
7663 |
-#endif |
7664 |
-#ifndef expr_get_column_ALREADY_DEFINED |
7665 |
-#undef yyget_column |
7666 |
-#endif |
7667 |
-#ifndef expr_set_column_ALREADY_DEFINED |
7668 |
-#undef yyset_column |
7669 |
-#endif |
7670 |
-#ifndef expr_wrap_ALREADY_DEFINED |
7671 |
-#undef yywrap |
7672 |
-#endif |
7673 |
-#ifndef expr_get_lval_ALREADY_DEFINED |
7674 |
-#undef yyget_lval |
7675 |
-#endif |
7676 |
-#ifndef expr_set_lval_ALREADY_DEFINED |
7677 |
-#undef yyset_lval |
7678 |
-#endif |
7679 |
-#ifndef expr_get_lloc_ALREADY_DEFINED |
7680 |
-#undef yyget_lloc |
7681 |
-#endif |
7682 |
-#ifndef expr_set_lloc_ALREADY_DEFINED |
7683 |
-#undef yyset_lloc |
7684 |
-#endif |
7685 |
-#ifndef expr_alloc_ALREADY_DEFINED |
7686 |
-#undef yyalloc |
7687 |
-#endif |
7688 |
-#ifndef expr_realloc_ALREADY_DEFINED |
7689 |
-#undef yyrealloc |
7690 |
-#endif |
7691 |
-#ifndef expr_free_ALREADY_DEFINED |
7692 |
-#undef yyfree |
7693 |
-#endif |
7694 |
-#ifndef expr_text_ALREADY_DEFINED |
7695 |
-#undef yytext |
7696 |
-#endif |
7697 |
-#ifndef expr_leng_ALREADY_DEFINED |
7698 |
-#undef yyleng |
7699 |
-#endif |
7700 |
-#ifndef expr_in_ALREADY_DEFINED |
7701 |
-#undef yyin |
7702 |
-#endif |
7703 |
-#ifndef expr_out_ALREADY_DEFINED |
7704 |
-#undef yyout |
7705 |
-#endif |
7706 |
-#ifndef expr__flex_debug_ALREADY_DEFINED |
7707 |
-#undef yy_flex_debug |
7708 |
-#endif |
7709 |
-#ifndef expr_lineno_ALREADY_DEFINED |
7710 |
-#undef yylineno |
7711 |
-#endif |
7712 |
-#ifndef expr_tables_fload_ALREADY_DEFINED |
7713 |
-#undef yytables_fload |
7714 |
-#endif |
7715 |
-#ifndef expr_tables_destroy_ALREADY_DEFINED |
7716 |
-#undef yytables_destroy |
7717 |
-#endif |
7718 |
-#ifndef expr_TABLES_NAME_ALREADY_DEFINED |
7719 |
-#undef yyTABLES_NAME |
7720 |
-#endif |
7721 |
- |
7722 |
-#line 73 "expr_parser.l" |
7723 |
- |
7724 |
- |
7725 |
-#line 715 "expr_parser.h" |
7726 |
-#undef expr_IN_HEADER |
7727 |
-#endif /* expr_HEADER_H */ |
7728 |
|
7729 |
diff --git a/app-emulation/opennebula/files/opennebula-5.10.1/parsers/expr_parser.l b/app-emulation/opennebula/files/opennebula-5.10.1/parsers/expr_parser.l |
7730 |
deleted file mode 100644 |
7731 |
index 0c69a2c..0000000 |
7732 |
--- a/app-emulation/opennebula/files/opennebula-5.10.1/parsers/expr_parser.l |
7733 |
+++ /dev/null |
7734 |
@@ -1,77 +0,0 @@ |
7735 |
-/* -------------------------------------------------------------------------- */ |
7736 |
-/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */ |
7737 |
-/* */ |
7738 |
-/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ |
7739 |
-/* not use this file except in compliance with the License. You may obtain */ |
7740 |
-/* a copy of the License at */ |
7741 |
-/* */ |
7742 |
-/* http://www.apache.org/licenses/LICENSE-2.0 */ |
7743 |
-/* */ |
7744 |
-/* Unless required by applicable law or agreed to in writing, software */ |
7745 |
-/* distributed under the License is distributed on an "AS IS" BASIS, */ |
7746 |
-/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ |
7747 |
-/* See the License for the specific language governing permissions and */ |
7748 |
-/* limitations under the License. */ |
7749 |
-/* -------------------------------------------------------------------------- */ |
7750 |
- |
7751 |
-%{ |
7752 |
-#include <stdio.h> |
7753 |
-#include <stdlib.h> |
7754 |
- |
7755 |
-#include "expr_bool.h" |
7756 |
-#include "expr_arith.h" |
7757 |
-#include "mem_collector.h" |
7758 |
- |
7759 |
-#define YY_NO_INPUT |
7760 |
- |
7761 |
-#define YY_DECL int expr_lex (YYSTYPE *yylval_param, YYLTYPE *llocp, \ |
7762 |
- mem_collector *mc, yyscan_t yyscanner) |
7763 |
- |
7764 |
-#define YY_USER_ACTION llocp->first_line = yylineno; \ |
7765 |
- llocp->first_column = llocp->last_column; \ |
7766 |
- llocp->last_column += yyleng; |
7767 |
-%} |
7768 |
- |
7769 |
-%option nounput |
7770 |
-%option prefix="expr_" |
7771 |
-%option outfile="expr_parser.cc" |
7772 |
-%option header-file="expr_parser.h" |
7773 |
-%option reentrant |
7774 |
-%option bison-bridge |
7775 |
-%option yylineno |
7776 |
- |
7777 |
-%% |
7778 |
- /* --- Tokens --- */ |
7779 |
- |
7780 |
-[@!&|=><()\*\+/\^-] { return *yytext;} |
7781 |
- |
7782 |
- /* --- Strings, also quoted form --- */ |
7783 |
- |
7784 |
-[A-Za-z][0-9A-Za-z_]* { yylval_param->val_str = mem_collector_strdup(mc,yytext); |
7785 |
- return STRING;} |
7786 |
- |
7787 |
-\"\" { yylval_param->val_str = NULL; |
7788 |
- return STRING;} |
7789 |
- |
7790 |
-\"[^\"]*\" { yylval_param->val_str = mem_collector_strdup(mc,yytext+1); |
7791 |
- yylval_param->val_str[yyleng-2] = '\0'; |
7792 |
- return STRING;} |
7793 |
- |
7794 |
- /* --- Numbers --- */ |
7795 |
- |
7796 |
--?[0-9]+ { yylval_param->val_int = atoi(yytext); |
7797 |
- return INTEGER;} |
7798 |
- |
7799 |
--?[0-9]+\.[0-9]+ { yylval_param->val_float = atof(yytext); |
7800 |
- return FLOAT;} |
7801 |
- |
7802 |
- /* --- blanks --- */ |
7803 |
- |
7804 |
-[[:blank:]]* |
7805 |
- |
7806 |
-%% |
7807 |
- |
7808 |
-int expr_wrap(yyscan_t scanner) |
7809 |
-{ |
7810 |
- return 1; |
7811 |
-} |
7812 |
|
7813 |
diff --git a/app-emulation/opennebula/files/opennebula-5.10.1/parsers/mem_collector.cc b/app-emulation/opennebula/files/opennebula-5.10.1/parsers/mem_collector.cc |
7814 |
deleted file mode 100644 |
7815 |
index 4573d17..0000000 |
7816 |
--- a/app-emulation/opennebula/files/opennebula-5.10.1/parsers/mem_collector.cc |
7817 |
+++ /dev/null |
7818 |
@@ -1,90 +0,0 @@ |
7819 |
-/* -------------------------------------------------------------------------- */ |
7820 |
-/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */ |
7821 |
-/* */ |
7822 |
-/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ |
7823 |
-/* not use this file except in compliance with the License. You may obtain */ |
7824 |
-/* a copy of the License at */ |
7825 |
-/* */ |
7826 |
-/* http://www.apache.org/licenses/LICENSE-2.0 */ |
7827 |
-/* */ |
7828 |
-/* Unless required by applicable law or agreed to in writing, software */ |
7829 |
-/* distributed under the License is distributed on an "AS IS" BASIS, */ |
7830 |
-/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ |
7831 |
-/* See the License for the specific language governing permissions and */ |
7832 |
-/* limitations under the License. */ |
7833 |
-/* -------------------------------------------------------------------------- */ |
7834 |
- |
7835 |
-#include <stdlib.h> |
7836 |
-#include <string.h> |
7837 |
- |
7838 |
-#include "mem_collector.h" |
7839 |
- |
7840 |
-/* -------------------------------------------------------------------------- */ |
7841 |
-/* -------------------------------------------------------------------------- */ |
7842 |
- |
7843 |
-void mem_collector_init(mem_collector * mc) |
7844 |
-{ |
7845 |
- int i; |
7846 |
- |
7847 |
- mc->str_buffer = (char **) malloc (sizeof(char*) * MEM_COLLECTOR_CHUNK); |
7848 |
- mc->size = MEM_COLLECTOR_CHUNK; |
7849 |
- mc->next = 0; |
7850 |
- |
7851 |
- for (i=0; i< mc->size ; i++) |
7852 |
- { |
7853 |
- mc->str_buffer[i] = 0; |
7854 |
- } |
7855 |
-} |
7856 |
- |
7857 |
-/* -------------------------------------------------------------------------- */ |
7858 |
-/* -------------------------------------------------------------------------- */ |
7859 |
- |
7860 |
-void mem_collector_cleanup(mem_collector * mc) |
7861 |
-{ |
7862 |
- int i; |
7863 |
- |
7864 |
- for (i=0; i< mc->size ; i++) |
7865 |
- { |
7866 |
- if ( mc->str_buffer[i] != 0 ) |
7867 |
- { |
7868 |
- free(mc->str_buffer[i]); |
7869 |
- } |
7870 |
- else /* No str's left in the pool */ |
7871 |
- { |
7872 |
- break; |
7873 |
- } |
7874 |
- } |
7875 |
- |
7876 |
- free(mc->str_buffer); |
7877 |
-} |
7878 |
- |
7879 |
-/* -------------------------------------------------------------------------- */ |
7880 |
-/* -------------------------------------------------------------------------- */ |
7881 |
- |
7882 |
-char * mem_collector_strdup(mem_collector *mc, const char * str) |
7883 |
-{ |
7884 |
- int i, old_size; |
7885 |
- char * new_str; |
7886 |
- |
7887 |
- if ( mc->next == mc->size ) |
7888 |
- { |
7889 |
- old_size = mc->size; |
7890 |
- mc->size = mc->size + MEM_COLLECTOR_CHUNK; |
7891 |
- |
7892 |
- mc->str_buffer = (char **) realloc(mc->str_buffer, |
7893 |
- sizeof(char*) * mc->size); |
7894 |
- |
7895 |
- for ( i = old_size ; i < mc->size ; i++) |
7896 |
- { |
7897 |
- mc->str_buffer[i] = 0; |
7898 |
- } |
7899 |
- } |
7900 |
- |
7901 |
- new_str = strdup(str); |
7902 |
- mc->str_buffer[mc->next++] = new_str; |
7903 |
- |
7904 |
- return new_str; |
7905 |
-} |
7906 |
- |
7907 |
-/* -------------------------------------------------------------------------- */ |
7908 |
-/* -------------------------------------------------------------------------- */ |
7909 |
|
7910 |
diff --git a/app-emulation/opennebula/files/opennebula-5.10.1/parsers/template_parser.cc b/app-emulation/opennebula/files/opennebula-5.10.1/parsers/template_parser.cc |
7911 |
deleted file mode 100644 |
7912 |
index 21fbea5..0000000 |
7913 |
--- a/app-emulation/opennebula/files/opennebula-5.10.1/parsers/template_parser.cc |
7914 |
+++ /dev/null |
7915 |
@@ -1,2363 +0,0 @@ |
7916 |
-#line 1 "template_parser.cc" |
7917 |
- |
7918 |
-#line 3 "template_parser.cc" |
7919 |
- |
7920 |
-#define YY_INT_ALIGNED short int |
7921 |
- |
7922 |
-/* A lexical scanner generated by flex */ |
7923 |
- |
7924 |
-#define FLEX_SCANNER |
7925 |
-#define YY_FLEX_MAJOR_VERSION 2 |
7926 |
-#define YY_FLEX_MINOR_VERSION 6 |
7927 |
-#define YY_FLEX_SUBMINOR_VERSION 4 |
7928 |
-#if YY_FLEX_SUBMINOR_VERSION > 0 |
7929 |
-#define FLEX_BETA |
7930 |
-#endif |
7931 |
- |
7932 |
-#ifdef yy_create_buffer |
7933 |
-#define template__create_buffer_ALREADY_DEFINED |
7934 |
-#else |
7935 |
-#define yy_create_buffer template__create_buffer |
7936 |
-#endif |
7937 |
- |
7938 |
-#ifdef yy_delete_buffer |
7939 |
-#define template__delete_buffer_ALREADY_DEFINED |
7940 |
-#else |
7941 |
-#define yy_delete_buffer template__delete_buffer |
7942 |
-#endif |
7943 |
- |
7944 |
-#ifdef yy_scan_buffer |
7945 |
-#define template__scan_buffer_ALREADY_DEFINED |
7946 |
-#else |
7947 |
-#define yy_scan_buffer template__scan_buffer |
7948 |
-#endif |
7949 |
- |
7950 |
-#ifdef yy_scan_string |
7951 |
-#define template__scan_string_ALREADY_DEFINED |
7952 |
-#else |
7953 |
-#define yy_scan_string template__scan_string |
7954 |
-#endif |
7955 |
- |
7956 |
-#ifdef yy_scan_bytes |
7957 |
-#define template__scan_bytes_ALREADY_DEFINED |
7958 |
-#else |
7959 |
-#define yy_scan_bytes template__scan_bytes |
7960 |
-#endif |
7961 |
- |
7962 |
-#ifdef yy_init_buffer |
7963 |
-#define template__init_buffer_ALREADY_DEFINED |
7964 |
-#else |
7965 |
-#define yy_init_buffer template__init_buffer |
7966 |
-#endif |
7967 |
- |
7968 |
-#ifdef yy_flush_buffer |
7969 |
-#define template__flush_buffer_ALREADY_DEFINED |
7970 |
-#else |
7971 |
-#define yy_flush_buffer template__flush_buffer |
7972 |
-#endif |
7973 |
- |
7974 |
-#ifdef yy_load_buffer_state |
7975 |
-#define template__load_buffer_state_ALREADY_DEFINED |
7976 |
-#else |
7977 |
-#define yy_load_buffer_state template__load_buffer_state |
7978 |
-#endif |
7979 |
- |
7980 |
-#ifdef yy_switch_to_buffer |
7981 |
-#define template__switch_to_buffer_ALREADY_DEFINED |
7982 |
-#else |
7983 |
-#define yy_switch_to_buffer template__switch_to_buffer |
7984 |
-#endif |
7985 |
- |
7986 |
-#ifdef yypush_buffer_state |
7987 |
-#define template_push_buffer_state_ALREADY_DEFINED |
7988 |
-#else |
7989 |
-#define yypush_buffer_state template_push_buffer_state |
7990 |
-#endif |
7991 |
- |
7992 |
-#ifdef yypop_buffer_state |
7993 |
-#define template_pop_buffer_state_ALREADY_DEFINED |
7994 |
-#else |
7995 |
-#define yypop_buffer_state template_pop_buffer_state |
7996 |
-#endif |
7997 |
- |
7998 |
-#ifdef yyensure_buffer_stack |
7999 |
-#define template_ensure_buffer_stack_ALREADY_DEFINED |
8000 |
-#else |
8001 |
-#define yyensure_buffer_stack template_ensure_buffer_stack |
8002 |
-#endif |
8003 |
- |
8004 |
-#ifdef yylex |
8005 |
-#define template_lex_ALREADY_DEFINED |
8006 |
-#else |
8007 |
-#define yylex template_lex |
8008 |
-#endif |
8009 |
- |
8010 |
-#ifdef yyrestart |
8011 |
-#define template_restart_ALREADY_DEFINED |
8012 |
-#else |
8013 |
-#define yyrestart template_restart |
8014 |
-#endif |
8015 |
- |
8016 |
-#ifdef yylex_init |
8017 |
-#define template_lex_init_ALREADY_DEFINED |
8018 |
-#else |
8019 |
-#define yylex_init template_lex_init |
8020 |
-#endif |
8021 |
- |
8022 |
-#ifdef yylex_init_extra |
8023 |
-#define template_lex_init_extra_ALREADY_DEFINED |
8024 |
-#else |
8025 |
-#define yylex_init_extra template_lex_init_extra |
8026 |
-#endif |
8027 |
- |
8028 |
-#ifdef yylex_destroy |
8029 |
-#define template_lex_destroy_ALREADY_DEFINED |
8030 |
-#else |
8031 |
-#define yylex_destroy template_lex_destroy |
8032 |
-#endif |
8033 |
- |
8034 |
-#ifdef yyget_debug |
8035 |
-#define template_get_debug_ALREADY_DEFINED |
8036 |
-#else |
8037 |
-#define yyget_debug template_get_debug |
8038 |
-#endif |
8039 |
- |
8040 |
-#ifdef yyset_debug |
8041 |
-#define template_set_debug_ALREADY_DEFINED |
8042 |
-#else |
8043 |
-#define yyset_debug template_set_debug |
8044 |
-#endif |
8045 |
- |
8046 |
-#ifdef yyget_extra |
8047 |
-#define template_get_extra_ALREADY_DEFINED |
8048 |
-#else |
8049 |
-#define yyget_extra template_get_extra |
8050 |
-#endif |
8051 |
- |
8052 |
-#ifdef yyset_extra |
8053 |
-#define template_set_extra_ALREADY_DEFINED |
8054 |
-#else |
8055 |
-#define yyset_extra template_set_extra |
8056 |
-#endif |
8057 |
- |
8058 |
-#ifdef yyget_in |
8059 |
-#define template_get_in_ALREADY_DEFINED |
8060 |
-#else |
8061 |
-#define yyget_in template_get_in |
8062 |
-#endif |
8063 |
- |
8064 |
-#ifdef yyset_in |
8065 |
-#define template_set_in_ALREADY_DEFINED |
8066 |
-#else |
8067 |
-#define yyset_in template_set_in |
8068 |
-#endif |
8069 |
- |
8070 |
-#ifdef yyget_out |
8071 |
-#define template_get_out_ALREADY_DEFINED |
8072 |
-#else |
8073 |
-#define yyget_out template_get_out |
8074 |
-#endif |
8075 |
- |
8076 |
-#ifdef yyset_out |
8077 |
-#define template_set_out_ALREADY_DEFINED |
8078 |
-#else |
8079 |
-#define yyset_out template_set_out |
8080 |
-#endif |
8081 |
- |
8082 |
-#ifdef yyget_leng |
8083 |
-#define template_get_leng_ALREADY_DEFINED |
8084 |
-#else |
8085 |
-#define yyget_leng template_get_leng |
8086 |
-#endif |
8087 |
- |
8088 |
-#ifdef yyget_text |
8089 |
-#define template_get_text_ALREADY_DEFINED |
8090 |
-#else |
8091 |
-#define yyget_text template_get_text |
8092 |
-#endif |
8093 |
- |
8094 |
-#ifdef yyget_lineno |
8095 |
-#define template_get_lineno_ALREADY_DEFINED |
8096 |
-#else |
8097 |
-#define yyget_lineno template_get_lineno |
8098 |
-#endif |
8099 |
- |
8100 |
-#ifdef yyset_lineno |
8101 |
-#define template_set_lineno_ALREADY_DEFINED |
8102 |
-#else |
8103 |
-#define yyset_lineno template_set_lineno |
8104 |
-#endif |
8105 |
- |
8106 |
-#ifdef yyget_column |
8107 |
-#define template_get_column_ALREADY_DEFINED |
8108 |
-#else |
8109 |
-#define yyget_column template_get_column |
8110 |
-#endif |
8111 |
- |
8112 |
-#ifdef yyset_column |
8113 |
-#define template_set_column_ALREADY_DEFINED |
8114 |
-#else |
8115 |
-#define yyset_column template_set_column |
8116 |
-#endif |
8117 |
- |
8118 |
-#ifdef yywrap |
8119 |
-#define template_wrap_ALREADY_DEFINED |
8120 |
-#else |
8121 |
-#define yywrap template_wrap |
8122 |
-#endif |
8123 |
- |
8124 |
-#ifdef yyget_lval |
8125 |
-#define template_get_lval_ALREADY_DEFINED |
8126 |
-#else |
8127 |
-#define yyget_lval template_get_lval |
8128 |
-#endif |
8129 |
- |
8130 |
-#ifdef yyset_lval |
8131 |
-#define template_set_lval_ALREADY_DEFINED |
8132 |
-#else |
8133 |
-#define yyset_lval template_set_lval |
8134 |
-#endif |
8135 |
- |
8136 |
-#ifdef yyalloc |
8137 |
-#define template_alloc_ALREADY_DEFINED |
8138 |
-#else |
8139 |
-#define yyalloc template_alloc |
8140 |
-#endif |
8141 |
- |
8142 |
-#ifdef yyrealloc |
8143 |
-#define template_realloc_ALREADY_DEFINED |
8144 |
-#else |
8145 |
-#define yyrealloc template_realloc |
8146 |
-#endif |
8147 |
- |
8148 |
-#ifdef yyfree |
8149 |
-#define template_free_ALREADY_DEFINED |
8150 |
-#else |
8151 |
-#define yyfree template_free |
8152 |
-#endif |
8153 |
- |
8154 |
-/* First, we deal with platform-specific or compiler-specific issues. */ |
8155 |
- |
8156 |
-/* begin standard C headers. */ |
8157 |
-#include <stdio.h> |
8158 |
-#include <string.h> |
8159 |
-#include <errno.h> |
8160 |
-#include <stdlib.h> |
8161 |
- |
8162 |
-/* end standard C headers. */ |
8163 |
- |
8164 |
-/* flex integer type definitions */ |
8165 |
- |
8166 |
-#ifndef FLEXINT_H |
8167 |
-#define FLEXINT_H |
8168 |
- |
8169 |
-/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */ |
8170 |
- |
8171 |
-#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L |
8172 |
- |
8173 |
-/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, |
8174 |
- * if you want the limit (max/min) macros for int types. |
8175 |
- */ |
8176 |
-#ifndef __STDC_LIMIT_MACROS |
8177 |
-#define __STDC_LIMIT_MACROS 1 |
8178 |
-#endif |
8179 |
- |
8180 |
-#include <inttypes.h> |
8181 |
-typedef int8_t flex_int8_t; |
8182 |
-typedef uint8_t flex_uint8_t; |
8183 |
-typedef int16_t flex_int16_t; |
8184 |
-typedef uint16_t flex_uint16_t; |
8185 |
-typedef int32_t flex_int32_t; |
8186 |
-typedef uint32_t flex_uint32_t; |
8187 |
-#else |
8188 |
-typedef signed char flex_int8_t; |
8189 |
-typedef short int flex_int16_t; |
8190 |
-typedef int flex_int32_t; |
8191 |
-typedef unsigned char flex_uint8_t; |
8192 |
-typedef unsigned short int flex_uint16_t; |
8193 |
-typedef unsigned int flex_uint32_t; |
8194 |
- |
8195 |
-/* Limits of integral types. */ |
8196 |
-#ifndef INT8_MIN |
8197 |
-#define INT8_MIN (-128) |
8198 |
-#endif |
8199 |
-#ifndef INT16_MIN |
8200 |
-#define INT16_MIN (-32767-1) |
8201 |
-#endif |
8202 |
-#ifndef INT32_MIN |
8203 |
-#define INT32_MIN (-2147483647-1) |
8204 |
-#endif |
8205 |
-#ifndef INT8_MAX |
8206 |
-#define INT8_MAX (127) |
8207 |
-#endif |
8208 |
-#ifndef INT16_MAX |
8209 |
-#define INT16_MAX (32767) |
8210 |
-#endif |
8211 |
-#ifndef INT32_MAX |
8212 |
-#define INT32_MAX (2147483647) |
8213 |
-#endif |
8214 |
-#ifndef UINT8_MAX |
8215 |
-#define UINT8_MAX (255U) |
8216 |
-#endif |
8217 |
-#ifndef UINT16_MAX |
8218 |
-#define UINT16_MAX (65535U) |
8219 |
-#endif |
8220 |
-#ifndef UINT32_MAX |
8221 |
-#define UINT32_MAX (4294967295U) |
8222 |
-#endif |
8223 |
- |
8224 |
-#ifndef SIZE_MAX |
8225 |
-#define SIZE_MAX (~(size_t)0) |
8226 |
-#endif |
8227 |
- |
8228 |
-#endif /* ! C99 */ |
8229 |
- |
8230 |
-#endif /* ! FLEXINT_H */ |
8231 |
- |
8232 |
-/* begin standard C++ headers. */ |
8233 |
- |
8234 |
-/* TODO: this is always defined, so inline it */ |
8235 |
-#define yyconst const |
8236 |
- |
8237 |
-#if defined(__GNUC__) && __GNUC__ >= 3 |
8238 |
-#define yynoreturn __attribute__((__noreturn__)) |
8239 |
-#else |
8240 |
-#define yynoreturn |
8241 |
-#endif |
8242 |
- |
8243 |
-/* Returned upon end-of-file. */ |
8244 |
-#define YY_NULL 0 |
8245 |
- |
8246 |
-/* Promotes a possibly negative, possibly signed char to an |
8247 |
- * integer in range [0..255] for use as an array index. |
8248 |
- */ |
8249 |
-#define YY_SC_TO_UI(c) ((YY_CHAR) (c)) |
8250 |
- |
8251 |
-/* An opaque pointer. */ |
8252 |
-#ifndef YY_TYPEDEF_YY_SCANNER_T |
8253 |
-#define YY_TYPEDEF_YY_SCANNER_T |
8254 |
-typedef void* yyscan_t; |
8255 |
-#endif |
8256 |
- |
8257 |
-/* For convenience, these vars (plus the bison vars far below) |
8258 |
- are macros in the reentrant scanner. */ |
8259 |
-#define yyin yyg->yyin_r |
8260 |
-#define yyout yyg->yyout_r |
8261 |
-#define yyextra yyg->yyextra_r |
8262 |
-#define yyleng yyg->yyleng_r |
8263 |
-#define yytext yyg->yytext_r |
8264 |
-#define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno) |
8265 |
-#define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column) |
8266 |
-#define yy_flex_debug yyg->yy_flex_debug_r |
8267 |
- |
8268 |
-/* Enter a start condition. This macro really ought to take a parameter, |
8269 |
- * but we do it the disgusting crufty way forced on us by the ()-less |
8270 |
- * definition of BEGIN. |
8271 |
- */ |
8272 |
-#define BEGIN yyg->yy_start = 1 + 2 * |
8273 |
-/* Translate the current start state into a value that can be later handed |
8274 |
- * to BEGIN to return to the state. The YYSTATE alias is for lex |
8275 |
- * compatibility. |
8276 |
- */ |
8277 |
-#define YY_START ((yyg->yy_start - 1) / 2) |
8278 |
-#define YYSTATE YY_START |
8279 |
-/* Action number for EOF rule of a given start state. */ |
8280 |
-#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) |
8281 |
-/* Special action meaning "start processing a new file". */ |
8282 |
-#define YY_NEW_FILE yyrestart( yyin , yyscanner ) |
8283 |
-#define YY_END_OF_BUFFER_CHAR 0 |
8284 |
- |
8285 |
-/* Size of default input buffer. */ |
8286 |
-#ifndef YY_BUF_SIZE |
8287 |
-#ifdef __ia64__ |
8288 |
-/* On IA-64, the buffer size is 16k, not 8k. |
8289 |
- * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. |
8290 |
- * Ditto for the __ia64__ case accordingly. |
8291 |
- */ |
8292 |
-#define YY_BUF_SIZE 32768 |
8293 |
-#else |
8294 |
-#define YY_BUF_SIZE 16384 |
8295 |
-#endif /* __ia64__ */ |
8296 |
-#endif |
8297 |
- |
8298 |
-/* The state buf must be large enough to hold one state per character in the main buffer. |
8299 |
- */ |
8300 |
-#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) |
8301 |
- |
8302 |
-#ifndef YY_TYPEDEF_YY_BUFFER_STATE |
8303 |
-#define YY_TYPEDEF_YY_BUFFER_STATE |
8304 |
-typedef struct yy_buffer_state *YY_BUFFER_STATE; |
8305 |
-#endif |
8306 |
- |
8307 |
-#ifndef YY_TYPEDEF_YY_SIZE_T |
8308 |
-#define YY_TYPEDEF_YY_SIZE_T |
8309 |
-typedef size_t yy_size_t; |
8310 |
-#endif |
8311 |
- |
8312 |
-#define EOB_ACT_CONTINUE_SCAN 0 |
8313 |
-#define EOB_ACT_END_OF_FILE 1 |
8314 |
-#define EOB_ACT_LAST_MATCH 2 |
8315 |
- |
8316 |
- /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires |
8317 |
- * access to the local variable yy_act. Since yyless() is a macro, it would break |
8318 |
- * existing scanners that call yyless() from OUTSIDE yylex. |
8319 |
- * One obvious solution it to make yy_act a global. I tried that, and saw |
8320 |
- * a 5% performance hit in a non-yylineno scanner, because yy_act is |
8321 |
- * normally declared as a register variable-- so it is not worth it. |
8322 |
- */ |
8323 |
- #define YY_LESS_LINENO(n) \ |
8324 |
- do { \ |
8325 |
- int yyl;\ |
8326 |
- for ( yyl = n; yyl < yyleng; ++yyl )\ |
8327 |
- if ( yytext[yyl] == '\n' )\ |
8328 |
- --yylineno;\ |
8329 |
- }while(0) |
8330 |
- #define YY_LINENO_REWIND_TO(dst) \ |
8331 |
- do {\ |
8332 |
- const char *p;\ |
8333 |
- for ( p = yy_cp-1; p >= (dst); --p)\ |
8334 |
- if ( *p == '\n' )\ |
8335 |
- --yylineno;\ |
8336 |
- }while(0) |
8337 |
- |
8338 |
-/* Return all but the first "n" matched characters back to the input stream. */ |
8339 |
-#define yyless(n) \ |
8340 |
- do \ |
8341 |
- { \ |
8342 |
- /* Undo effects of setting up yytext. */ \ |
8343 |
- int yyless_macro_arg = (n); \ |
8344 |
- YY_LESS_LINENO(yyless_macro_arg);\ |
8345 |
- *yy_cp = yyg->yy_hold_char; \ |
8346 |
- YY_RESTORE_YY_MORE_OFFSET \ |
8347 |
- yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ |
8348 |
- YY_DO_BEFORE_ACTION; /* set up yytext again */ \ |
8349 |
- } \ |
8350 |
- while ( 0 ) |
8351 |
-#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner ) |
8352 |
- |
8353 |
-#ifndef YY_STRUCT_YY_BUFFER_STATE |
8354 |
-#define YY_STRUCT_YY_BUFFER_STATE |
8355 |
-struct yy_buffer_state |
8356 |
- { |
8357 |
- FILE *yy_input_file; |
8358 |
- |
8359 |
- char *yy_ch_buf; /* input buffer */ |
8360 |
- char *yy_buf_pos; /* current position in input buffer */ |
8361 |
- |
8362 |
- /* Size of input buffer in bytes, not including room for EOB |
8363 |
- * characters. |
8364 |
- */ |
8365 |
- int yy_buf_size; |
8366 |
- |
8367 |
- /* Number of characters read into yy_ch_buf, not including EOB |
8368 |
- * characters. |
8369 |
- */ |
8370 |
- int yy_n_chars; |
8371 |
- |
8372 |
- /* Whether we "own" the buffer - i.e., we know we created it, |
8373 |
- * and can realloc() it to grow it, and should free() it to |
8374 |
- * delete it. |
8375 |
- */ |
8376 |
- int yy_is_our_buffer; |
8377 |
- |
8378 |
- /* Whether this is an "interactive" input source; if so, and |
8379 |
- * if we're using stdio for input, then we want to use getc() |
8380 |
- * instead of fread(), to make sure we stop fetching input after |
8381 |
- * each newline. |
8382 |
- */ |
8383 |
- int yy_is_interactive; |
8384 |
- |
8385 |
- /* Whether we're considered to be at the beginning of a line. |
8386 |
- * If so, '^' rules will be active on the next match, otherwise |
8387 |
- * not. |
8388 |
- */ |
8389 |
- int yy_at_bol; |
8390 |
- |
8391 |
- int yy_bs_lineno; /**< The line count. */ |
8392 |
- int yy_bs_column; /**< The column count. */ |
8393 |
- |
8394 |
- /* Whether to try to fill the input buffer when we reach the |
8395 |
- * end of it. |
8396 |
- */ |
8397 |
- int yy_fill_buffer; |
8398 |
- |
8399 |
- int yy_buffer_status; |
8400 |
- |
8401 |
-#define YY_BUFFER_NEW 0 |
8402 |
-#define YY_BUFFER_NORMAL 1 |
8403 |
- /* When an EOF's been seen but there's still some text to process |
8404 |
- * then we mark the buffer as YY_EOF_PENDING, to indicate that we |
8405 |
- * shouldn't try reading from the input source any more. We might |
8406 |
- * still have a bunch of tokens to match, though, because of |
8407 |
- * possible backing-up. |
8408 |
- * |
8409 |
- * When we actually see the EOF, we change the status to "new" |
8410 |
- * (via yyrestart()), so that the user can continue scanning by |
8411 |
- * just pointing yyin at a new input file. |
8412 |
- */ |
8413 |
-#define YY_BUFFER_EOF_PENDING 2 |
8414 |
- |
8415 |
- }; |
8416 |
-#endif /* !YY_STRUCT_YY_BUFFER_STATE */ |
8417 |
- |
8418 |
-/* We provide macros for accessing buffer states in case in the |
8419 |
- * future we want to put the buffer states in a more general |
8420 |
- * "scanner state". |
8421 |
- * |
8422 |
- * Returns the top of the stack, or NULL. |
8423 |
- */ |
8424 |
-#define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \ |
8425 |
- ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \ |
8426 |
- : NULL) |
8427 |
-/* Same as previous macro, but useful when we know that the buffer stack is not |
8428 |
- * NULL or when we need an lvalue. For internal use only. |
8429 |
- */ |
8430 |
-#define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] |
8431 |
- |
8432 |
-void yyrestart ( FILE *input_file , yyscan_t yyscanner ); |
8433 |
-void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); |
8434 |
-YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner ); |
8435 |
-void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); |
8436 |
-void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); |
8437 |
-void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); |
8438 |
-void yypop_buffer_state ( yyscan_t yyscanner ); |
8439 |
- |
8440 |
-static void yyensure_buffer_stack ( yyscan_t yyscanner ); |
8441 |
-static void yy_load_buffer_state ( yyscan_t yyscanner ); |
8442 |
-static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file , yyscan_t yyscanner ); |
8443 |
-#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER , yyscanner) |
8444 |
- |
8445 |
-YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner ); |
8446 |
-YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner ); |
8447 |
-YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len , yyscan_t yyscanner ); |
8448 |
- |
8449 |
-void *yyalloc ( yy_size_t , yyscan_t yyscanner ); |
8450 |
-void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner ); |
8451 |
-void yyfree ( void * , yyscan_t yyscanner ); |
8452 |
- |
8453 |
-#define yy_new_buffer yy_create_buffer |
8454 |
-#define yy_set_interactive(is_interactive) \ |
8455 |
- { \ |
8456 |
- if ( ! YY_CURRENT_BUFFER ){ \ |
8457 |
- yyensure_buffer_stack (yyscanner); \ |
8458 |
- YY_CURRENT_BUFFER_LVALUE = \ |
8459 |
- yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \ |
8460 |
- } \ |
8461 |
- YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ |
8462 |
- } |
8463 |
-#define yy_set_bol(at_bol) \ |
8464 |
- { \ |
8465 |
- if ( ! YY_CURRENT_BUFFER ){\ |
8466 |
- yyensure_buffer_stack (yyscanner); \ |
8467 |
- YY_CURRENT_BUFFER_LVALUE = \ |
8468 |
- yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \ |
8469 |
- } \ |
8470 |
- YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ |
8471 |
- } |
8472 |
-#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) |
8473 |
- |
8474 |
-/* Begin user sect3 */ |
8475 |
-typedef flex_uint8_t YY_CHAR; |
8476 |
- |
8477 |
-typedef int yy_state_type; |
8478 |
- |
8479 |
-#define yytext_ptr yytext_r |
8480 |
- |
8481 |
-static yy_state_type yy_get_previous_state ( yyscan_t yyscanner ); |
8482 |
-static yy_state_type yy_try_NUL_trans ( yy_state_type current_state , yyscan_t yyscanner); |
8483 |
-static int yy_get_next_buffer ( yyscan_t yyscanner ); |
8484 |
-static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner ); |
8485 |
- |
8486 |
-/* Done after the current pattern has been matched and before the |
8487 |
- * corresponding action - sets up yytext. |
8488 |
- */ |
8489 |
-#define YY_DO_BEFORE_ACTION \ |
8490 |
- yyg->yytext_ptr = yy_bp; \ |
8491 |
- yyleng = (int) (yy_cp - yy_bp); \ |
8492 |
- yyg->yy_hold_char = *yy_cp; \ |
8493 |
- *yy_cp = '\0'; \ |
8494 |
- yyg->yy_c_buf_p = yy_cp; |
8495 |
-#define YY_NUM_RULES 12 |
8496 |
-#define YY_END_OF_BUFFER 13 |
8497 |
-/* This struct is not used in this scanner, |
8498 |
- but its presence is necessary. */ |
8499 |
-struct yy_trans_info |
8500 |
- { |
8501 |
- flex_int32_t yy_verify; |
8502 |
- flex_int32_t yy_nxt; |
8503 |
- }; |
8504 |
-static const flex_int16_t yy_accept[69] = |
8505 |
- { 0, |
8506 |
- 0, 0, 0, 0, 13, 12, 2, 2, 12, 6, |
8507 |
- 3, 4, 7, 11, 12, 11, 12, 8, 12, 2, |
8508 |
- 2, 0, 6, 4, 7, 0, 1, 6, 3, 4, |
8509 |
- 5, 7, 11, 0, 0, 0, 8, 11, 0, 0, |
8510 |
- 10, 11, 0, 8, 8, 0, 10, 0, 10, 0, |
8511 |
- 10, 0, 9, 10, 10, 9, 9, 9, 9, 9, |
8512 |
- 9, 9, 9, 9, 9, 9, 9, 0 |
8513 |
- } ; |
8514 |
- |
8515 |
-static const YY_CHAR yy_ec[256] = |
8516 |
- { 0, |
8517 |
- 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, |
8518 |
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
8519 |
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
8520 |
- 1, 2, 1, 4, 5, 1, 1, 1, 1, 1, |
8521 |
- 1, 1, 1, 6, 1, 1, 1, 7, 7, 7, |
8522 |
- 7, 7, 7, 7, 7, 7, 7, 1, 1, 1, |
8523 |
- 8, 9, 1, 1, 7, 7, 7, 7, 7, 7, |
8524 |
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, |
8525 |
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, |
8526 |
- 10, 11, 12, 1, 7, 1, 7, 7, 7, 7, |
8527 |
- |
8528 |
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, |
8529 |
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, |
8530 |
- 7, 7, 1, 1, 1, 1, 1, 1, 1, 1, |
8531 |
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
8532 |
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
8533 |
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
8534 |
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
8535 |
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
8536 |
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
8537 |
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
8538 |
- |
8539 |
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
8540 |
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
8541 |
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
8542 |
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
8543 |
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
8544 |
- 1, 1, 1, 1, 1 |
8545 |
- } ; |
8546 |
- |
8547 |
-static const YY_CHAR yy_meta[13] = |
8548 |
- { 0, |
8549 |
- 1, 2, 3, 1, 1, 1, 1, 1, 1, 1, |
8550 |
- 1, 1 |
8551 |
- } ; |
8552 |
- |
8553 |
-static const flex_int16_t yy_base[77] = |
8554 |
- { 0, |
8555 |
- 0, 0, 12, 0, 70, 196, 23, 34, 65, 0, |
8556 |
- 60, 45, 0, 48, 59, 71, 54, 82, 53, 0, |
8557 |
- 0, 61, 0, 0, 0, 60, 196, 0, 55, 0, |
8558 |
- 196, 0, 0, 39, 33, 93, 0, 0, 105, 113, |
8559 |
- 0, 40, 31, 0, 0, 116, 30, 37, 196, 125, |
8560 |
- 0, 128, 27, 0, 137, 146, 26, 22, 156, 21, |
8561 |
- 28, 18, 160, 0, 164, 15, 0, 196, 176, 178, |
8562 |
- 180, 183, 185, 187, 190, 192 |
8563 |
- } ; |
8564 |
- |
8565 |
-static const flex_int16_t yy_def[77] = |
8566 |
- { 0, |
8567 |
- 68, 1, 68, 3, 68, 68, 68, 68, 69, 70, |
8568 |
- 68, 68, 71, 68, 72, 68, 72, 72, 72, 7, |
8569 |
- 8, 69, 70, 12, 71, 69, 68, 70, 68, 12, |
8570 |
- 68, 71, 14, 72, 72, 72, 18, 16, 16, 73, |
8571 |
- 14, 16, 39, 18, 74, 72, 72, 39, 68, 73, |
8572 |
- 16, 39, 75, 39, 73, 76, 75, 75, 76, 75, |
8573 |
- 59, 59, 75, 59, 59, 75, 59, 0, 68, 68, |
8574 |
- 68, 68, 68, 68, 68, 68 |
8575 |
- } ; |
8576 |
- |
8577 |
-static const flex_int16_t yy_nxt[209] = |
8578 |
- { 0, |
8579 |
- 6, 7, 8, 6, 9, 10, 11, 12, 6, 6, |
8580 |
- 6, 13, 14, 15, 6, 16, 17, 17, 14, 17, |
8581 |
- 14, 18, 14, 19, 20, 21, 58, 22, 23, 65, |
8582 |
- 24, 64, 58, 63, 25, 21, 21, 58, 58, 23, |
8583 |
- 54, 35, 52, 51, 46, 25, 30, 31, 33, 34, |
8584 |
- 35, 33, 34, 34, 33, 34, 33, 34, 33, 35, |
8585 |
- 36, 29, 27, 27, 46, 35, 29, 27, 37, 68, |
8586 |
- 35, 38, 39, 40, 41, 39, 39, 38, 39, 38, |
8587 |
- 39, 42, 43, 44, 45, 68, 68, 68, 68, 68, |
8588 |
- 68, 68, 68, 35, 36, 68, 68, 68, 68, 68, |
8589 |
- |
8590 |
- 68, 68, 37, 68, 35, 39, 68, 68, 47, 68, |
8591 |
- 68, 39, 68, 39, 68, 48, 49, 68, 68, 68, |
8592 |
- 68, 68, 68, 50, 53, 68, 68, 46, 55, 68, |
8593 |
- 68, 68, 68, 68, 68, 50, 56, 68, 68, 52, |
8594 |
- 49, 68, 68, 68, 68, 68, 68, 50, 40, 60, |
8595 |
- 68, 68, 68, 68, 68, 68, 61, 62, 40, 60, |
8596 |
- 68, 68, 68, 68, 68, 68, 61, 62, 66, 68, |
8597 |
- 68, 63, 67, 68, 68, 65, 26, 26, 26, 28, |
8598 |
- 28, 32, 32, 34, 34, 40, 40, 40, 45, 45, |
8599 |
- 57, 57, 59, 59, 59, 5, 68, 68, 68, 68, |
8600 |
- |
8601 |
- 68, 68, 68, 68, 68, 68, 68, 68 |
8602 |
- } ; |
8603 |
- |
8604 |
-static const flex_int16_t yy_chk[209] = |
8605 |
- { 0, |
8606 |
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
8607 |
- 1, 1, 3, 3, 3, 3, 3, 3, 3, 3, |
8608 |
- 3, 3, 3, 3, 7, 7, 66, 7, 7, 62, |
8609 |
- 7, 61, 60, 58, 7, 8, 8, 57, 53, 8, |
8610 |
- 48, 47, 43, 42, 35, 8, 12, 12, 14, 14, |
8611 |
- 34, 14, 14, 14, 14, 14, 14, 14, 14, 14, |
8612 |
- 15, 29, 26, 22, 19, 17, 11, 9, 15, 5, |
8613 |
- 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, |
8614 |
- 16, 16, 16, 18, 18, 0, 0, 0, 0, 0, |
8615 |
- 0, 0, 0, 18, 36, 0, 0, 0, 0, 0, |
8616 |
- |
8617 |
- 0, 0, 36, 0, 36, 39, 0, 0, 39, 0, |
8618 |
- 0, 39, 0, 39, 0, 39, 40, 0, 0, 0, |
8619 |
- 0, 0, 0, 40, 46, 0, 0, 46, 50, 0, |
8620 |
- 0, 0, 0, 0, 0, 50, 52, 0, 0, 52, |
8621 |
- 55, 0, 0, 0, 0, 0, 0, 55, 56, 56, |
8622 |
- 0, 0, 0, 0, 0, 0, 56, 56, 59, 59, |
8623 |
- 0, 0, 0, 0, 0, 0, 59, 59, 63, 0, |
8624 |
- 0, 63, 65, 0, 0, 65, 69, 69, 69, 70, |
8625 |
- 70, 71, 71, 72, 72, 73, 73, 73, 74, 74, |
8626 |
- 75, 75, 76, 76, 76, 68, 68, 68, 68, 68, |
8627 |
- |
8628 |
- 68, 68, 68, 68, 68, 68, 68, 68 |
8629 |
- } ; |
8630 |
- |
8631 |
-/* Table of booleans, true if rule could match eol. */ |
8632 |
-static const flex_int32_t yy_rule_can_match_eol[13] = |
8633 |
- { 0, |
8634 |
-1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, }; |
8635 |
- |
8636 |
-/* The intent behind this definition is that it'll catch |
8637 |
- * any uses of REJECT which flex missed. |
8638 |
- */ |
8639 |
-#define REJECT reject_used_but_not_detected |
8640 |
-#define yymore() yymore_used_but_not_detected |
8641 |
-#define YY_MORE_ADJ 0 |
8642 |
-#define YY_RESTORE_YY_MORE_OFFSET |
8643 |
-#line 1 "template_parser.l" |
8644 |
-/* -------------------------------------------------------------------------- */ |
8645 |
-/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */ |
8646 |
-/* */ |
8647 |
-/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ |
8648 |
-/* not use this file except in compliance with the License. You may obtain */ |
8649 |
-/* a copy of the License at */ |
8650 |
-/* */ |
8651 |
-/* http://www.apache.org/licenses/LICENSE-2.0 */ |
8652 |
-/* */ |
8653 |
-/* Unless required by applicable law or agreed to in writing, software */ |
8654 |
-/* distributed under the License is distributed on an "AS IS" BASIS, */ |
8655 |
-/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ |
8656 |
-/* See the License for the specific language governing permissions and */ |
8657 |
-/* limitations under the License. */ |
8658 |
-/* -------------------------------------------------------------------------- */ |
8659 |
-#line 18 "template_parser.l" |
8660 |
-#include <stdio.h> |
8661 |
-#include <stdlib.h> |
8662 |
-#include <string.h> |
8663 |
-#include <pthread.h> |
8664 |
- |
8665 |
-#include "template_syntax.h" |
8666 |
-#include "mem_collector.h" |
8667 |
- |
8668 |
-#define YY_NO_INPUT |
8669 |
- |
8670 |
-#define YY_DECL int template_lex (YYSTYPE *yylval_param, YYLTYPE *llocp, \ |
8671 |
- mem_collector *mc, yyscan_t yyscanner) |
8672 |
- |
8673 |
-#define YY_USER_ACTION llocp->first_line = yylineno; \ |
8674 |
- llocp->first_column = llocp->last_column; \ |
8675 |
- llocp->last_column += yyleng; |
8676 |
-#line 761 "template_parser.cc" |
8677 |
- |
8678 |
-#line 763 "template_parser.cc" |
8679 |
- |
8680 |
-#define INITIAL 0 |
8681 |
-#define VALUE 1 |
8682 |
- |
8683 |
-#ifndef YY_NO_UNISTD_H |
8684 |
-/* Special case for "unistd.h", since it is non-ANSI. We include it way |
8685 |
- * down here because we want the user's section 1 to have been scanned first. |
8686 |
- * The user has a chance to override it with an option. |
8687 |
- */ |
8688 |
-#include <unistd.h> |
8689 |
-#endif |
8690 |
- |
8691 |
-#ifndef YY_EXTRA_TYPE |
8692 |
-#define YY_EXTRA_TYPE void * |
8693 |
-#endif |
8694 |
- |
8695 |
-/* Holds the entire state of the reentrant scanner. */ |
8696 |
-struct yyguts_t |
8697 |
- { |
8698 |
- |
8699 |
- /* User-defined. Not touched by flex. */ |
8700 |
- YY_EXTRA_TYPE yyextra_r; |
8701 |
- |
8702 |
- /* The rest are the same as the globals declared in the non-reentrant scanner. */ |
8703 |
- FILE *yyin_r, *yyout_r; |
8704 |
- size_t yy_buffer_stack_top; /**< index of top of stack. */ |
8705 |
- size_t yy_buffer_stack_max; /**< capacity of stack. */ |
8706 |
- YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ |
8707 |
- char yy_hold_char; |
8708 |
- int yy_n_chars; |
8709 |
- int yyleng_r; |
8710 |
- char *yy_c_buf_p; |
8711 |
- int yy_init; |
8712 |
- int yy_start; |
8713 |
- int yy_did_buffer_switch_on_eof; |
8714 |
- int yy_start_stack_ptr; |
8715 |
- int yy_start_stack_depth; |
8716 |
- int *yy_start_stack; |
8717 |
- yy_state_type yy_last_accepting_state; |
8718 |
- char* yy_last_accepting_cpos; |
8719 |
- |
8720 |
- int yylineno_r; |
8721 |
- int yy_flex_debug_r; |
8722 |
- |
8723 |
- char *yytext_r; |
8724 |
- int yy_more_flag; |
8725 |
- int yy_more_len; |
8726 |
- |
8727 |
- YYSTYPE * yylval_r; |
8728 |
- |
8729 |
- }; /* end struct yyguts_t */ |
8730 |
- |
8731 |
-static int yy_init_globals ( yyscan_t yyscanner ); |
8732 |
- |
8733 |
- /* This must go here because YYSTYPE and YYLTYPE are included |
8734 |
- * from bison output in section 1.*/ |
8735 |
- # define yylval yyg->yylval_r |
8736 |
- |
8737 |
-int yylex_init (yyscan_t* scanner); |
8738 |
- |
8739 |
-int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner); |
8740 |
- |
8741 |
-/* Accessor methods to globals. |
8742 |
- These are made visible to non-reentrant scanners for convenience. */ |
8743 |
- |
8744 |
-int yylex_destroy ( yyscan_t yyscanner ); |
8745 |
- |
8746 |
-int yyget_debug ( yyscan_t yyscanner ); |
8747 |
- |
8748 |
-void yyset_debug ( int debug_flag , yyscan_t yyscanner ); |
8749 |
- |
8750 |
-YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner ); |
8751 |
- |
8752 |
-void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner ); |
8753 |
- |
8754 |
-FILE *yyget_in ( yyscan_t yyscanner ); |
8755 |
- |
8756 |
-void yyset_in ( FILE * _in_str , yyscan_t yyscanner ); |
8757 |
- |
8758 |
-FILE *yyget_out ( yyscan_t yyscanner ); |
8759 |
- |
8760 |
-void yyset_out ( FILE * _out_str , yyscan_t yyscanner ); |
8761 |
- |
8762 |
- int yyget_leng ( yyscan_t yyscanner ); |
8763 |
- |
8764 |
-char *yyget_text ( yyscan_t yyscanner ); |
8765 |
- |
8766 |
-int yyget_lineno ( yyscan_t yyscanner ); |
8767 |
- |
8768 |
-void yyset_lineno ( int _line_number , yyscan_t yyscanner ); |
8769 |
- |
8770 |
-int yyget_column ( yyscan_t yyscanner ); |
8771 |
- |
8772 |
-void yyset_column ( int _column_no , yyscan_t yyscanner ); |
8773 |
- |
8774 |
-YYSTYPE * yyget_lval ( yyscan_t yyscanner ); |
8775 |
- |
8776 |
-void yyset_lval ( YYSTYPE * yylval_param , yyscan_t yyscanner ); |
8777 |
- |
8778 |
-/* Macros after this point can all be overridden by user definitions in |
8779 |
- * section 1. |
8780 |
- */ |
8781 |
- |
8782 |
-#ifndef YY_SKIP_YYWRAP |
8783 |
-#ifdef __cplusplus |
8784 |
-extern "C" int yywrap ( yyscan_t yyscanner ); |
8785 |
-#else |
8786 |
-extern int yywrap ( yyscan_t yyscanner ); |
8787 |
-#endif |
8788 |
-#endif |
8789 |
- |
8790 |
-#ifndef YY_NO_UNPUT |
8791 |
- |
8792 |
-#endif |
8793 |
- |
8794 |
-#ifndef yytext_ptr |
8795 |
-static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner); |
8796 |
-#endif |
8797 |
- |
8798 |
-#ifdef YY_NEED_STRLEN |
8799 |
-static int yy_flex_strlen ( const char * , yyscan_t yyscanner); |
8800 |
-#endif |
8801 |
- |
8802 |
-#ifndef YY_NO_INPUT |
8803 |
-#ifdef __cplusplus |
8804 |
-static int yyinput ( yyscan_t yyscanner ); |
8805 |
-#else |
8806 |
-static int input ( yyscan_t yyscanner ); |
8807 |
-#endif |
8808 |
- |
8809 |
-#endif |
8810 |
- |
8811 |
-/* Amount of stuff to slurp up with each read. */ |
8812 |
-#ifndef YY_READ_BUF_SIZE |
8813 |
-#ifdef __ia64__ |
8814 |
-/* On IA-64, the buffer size is 16k, not 8k */ |
8815 |
-#define YY_READ_BUF_SIZE 16384 |
8816 |
-#else |
8817 |
-#define YY_READ_BUF_SIZE 8192 |
8818 |
-#endif /* __ia64__ */ |
8819 |
-#endif |
8820 |
- |
8821 |
-/* Copy whatever the last rule matched to the standard output. */ |
8822 |
-#ifndef ECHO |
8823 |
-/* This used to be an fputs(), but since the string might contain NUL's, |
8824 |
- * we now use fwrite(). |
8825 |
- */ |
8826 |
-#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0) |
8827 |
-#endif |
8828 |
- |
8829 |
-/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, |
8830 |
- * is returned in "result". |
8831 |
- */ |
8832 |
-#ifndef YY_INPUT |
8833 |
-#define YY_INPUT(buf,result,max_size) \ |
8834 |
- if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ |
8835 |
- { \ |
8836 |
- int c = '*'; \ |
8837 |
- int n; \ |
8838 |
- for ( n = 0; n < max_size && \ |
8839 |
- (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ |
8840 |
- buf[n] = (char) c; \ |
8841 |
- if ( c == '\n' ) \ |
8842 |
- buf[n++] = (char) c; \ |
8843 |
- if ( c == EOF && ferror( yyin ) ) \ |
8844 |
- YY_FATAL_ERROR( "input in flex scanner failed" ); \ |
8845 |
- result = n; \ |
8846 |
- } \ |
8847 |
- else \ |
8848 |
- { \ |
8849 |
- errno=0; \ |
8850 |
- while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \ |
8851 |
- { \ |
8852 |
- if( errno != EINTR) \ |
8853 |
- { \ |
8854 |
- YY_FATAL_ERROR( "input in flex scanner failed" ); \ |
8855 |
- break; \ |
8856 |
- } \ |
8857 |
- errno=0; \ |
8858 |
- clearerr(yyin); \ |
8859 |
- } \ |
8860 |
- }\ |
8861 |
-\ |
8862 |
- |
8863 |
-#endif |
8864 |
- |
8865 |
-/* No semi-colon after return; correct usage is to write "yyterminate();" - |
8866 |
- * we don't want an extra ';' after the "return" because that will cause |
8867 |
- * some compilers to complain about unreachable statements. |
8868 |
- */ |
8869 |
-#ifndef yyterminate |
8870 |
-#define yyterminate() return YY_NULL |
8871 |
-#endif |
8872 |
- |
8873 |
-/* Number of entries by which start-condition stack grows. */ |
8874 |
-#ifndef YY_START_STACK_INCR |
8875 |
-#define YY_START_STACK_INCR 25 |
8876 |
-#endif |
8877 |
- |
8878 |
-/* Report a fatal error. */ |
8879 |
-#ifndef YY_FATAL_ERROR |
8880 |
-#define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner) |
8881 |
-#endif |
8882 |
- |
8883 |
-/* end tables serialization structures and prototypes */ |
8884 |
- |
8885 |
-/* Default declaration of generated scanner - a define so the user can |
8886 |
- * easily add parameters. |
8887 |
- */ |
8888 |
-#ifndef YY_DECL |
8889 |
-#define YY_DECL_IS_OURS 1 |
8890 |
- |
8891 |
-extern int yylex \ |
8892 |
- (YYSTYPE * yylval_param , yyscan_t yyscanner); |
8893 |
- |
8894 |
-#define YY_DECL int yylex \ |
8895 |
- (YYSTYPE * yylval_param , yyscan_t yyscanner) |
8896 |
-#endif /* !YY_DECL */ |
8897 |
- |
8898 |
-/* Code executed at the beginning of each rule, after yytext and yyleng |
8899 |
- * have been set up. |
8900 |
- */ |
8901 |
-#ifndef YY_USER_ACTION |
8902 |
-#define YY_USER_ACTION |
8903 |
-#endif |
8904 |
- |
8905 |
-/* Code executed at the end of each rule. */ |
8906 |
-#ifndef YY_BREAK |
8907 |
-#define YY_BREAK /*LINTED*/break; |
8908 |
-#endif |
8909 |
- |
8910 |
-#define YY_RULE_SETUP \ |
8911 |
- YY_USER_ACTION |
8912 |
- |
8913 |
-/** The main scanner function which does all the work. |
8914 |
- */ |
8915 |
-YY_DECL |
8916 |
-{ |
8917 |
- yy_state_type yy_current_state; |
8918 |
- char *yy_cp, *yy_bp; |
8919 |
- int yy_act; |
8920 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
8921 |
- |
8922 |
- yylval = yylval_param; |
8923 |
- |
8924 |
- if ( !yyg->yy_init ) |
8925 |
- { |
8926 |
- yyg->yy_init = 1; |
8927 |
- |
8928 |
-#ifdef YY_USER_INIT |
8929 |
- YY_USER_INIT; |
8930 |
-#endif |
8931 |
- |
8932 |
- if ( ! yyg->yy_start ) |
8933 |
- yyg->yy_start = 1; /* first start state */ |
8934 |
- |
8935 |
- if ( ! yyin ) |
8936 |
- yyin = stdin; |
8937 |
- |
8938 |
- if ( ! yyout ) |
8939 |
- yyout = stdout; |
8940 |
- |
8941 |
- if ( ! YY_CURRENT_BUFFER ) { |
8942 |
- yyensure_buffer_stack (yyscanner); |
8943 |
- YY_CURRENT_BUFFER_LVALUE = |
8944 |
- yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); |
8945 |
- } |
8946 |
- |
8947 |
- yy_load_buffer_state( yyscanner ); |
8948 |
- } |
8949 |
- |
8950 |
- { |
8951 |
-#line 49 "template_parser.l" |
8952 |
- |
8953 |
- |
8954 |
-#line 52 "template_parser.l" |
8955 |
- /* ------------------------------------------------------------------------- */ |
8956 |
- /* Comments (lines with an starting #), and empty lines */ |
8957 |
- /* ------------------------------------------------------------------------- */ |
8958 |
-#line 1043 "template_parser.cc" |
8959 |
- |
8960 |
- while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ |
8961 |
- { |
8962 |
- yy_cp = yyg->yy_c_buf_p; |
8963 |
- |
8964 |
- /* Support of yytext. */ |
8965 |
- *yy_cp = yyg->yy_hold_char; |
8966 |
- |
8967 |
- /* yy_bp points to the position in yy_ch_buf of the start of |
8968 |
- * the current run. |
8969 |
- */ |
8970 |
- yy_bp = yy_cp; |
8971 |
- |
8972 |
- yy_current_state = yyg->yy_start; |
8973 |
-yy_match: |
8974 |
- do |
8975 |
- { |
8976 |
- YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; |
8977 |
- if ( yy_accept[yy_current_state] ) |
8978 |
- { |
8979 |
- yyg->yy_last_accepting_state = yy_current_state; |
8980 |
- yyg->yy_last_accepting_cpos = yy_cp; |
8981 |
- } |
8982 |
- while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) |
8983 |
- { |
8984 |
- yy_current_state = (int) yy_def[yy_current_state]; |
8985 |
- if ( yy_current_state >= 69 ) |
8986 |
- yy_c = yy_meta[yy_c]; |
8987 |
- } |
8988 |
- yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; |
8989 |
- ++yy_cp; |
8990 |
- } |
8991 |
- while ( yy_base[yy_current_state] != 196 ); |
8992 |
- |
8993 |
-yy_find_action: |
8994 |
- yy_act = yy_accept[yy_current_state]; |
8995 |
- if ( yy_act == 0 ) |
8996 |
- { /* have to back up */ |
8997 |
- yy_cp = yyg->yy_last_accepting_cpos; |
8998 |
- yy_current_state = yyg->yy_last_accepting_state; |
8999 |
- yy_act = yy_accept[yy_current_state]; |
9000 |
- } |
9001 |
- |
9002 |
- YY_DO_BEFORE_ACTION; |
9003 |
- |
9004 |
- if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] ) |
9005 |
- { |
9006 |
- int yyl; |
9007 |
- for ( yyl = 0; yyl < yyleng; ++yyl ) |
9008 |
- if ( yytext[yyl] == '\n' ) |
9009 |
- |
9010 |
- do{ yylineno++; |
9011 |
- yycolumn=0; |
9012 |
- }while(0) |
9013 |
-; |
9014 |
- } |
9015 |
- |
9016 |
-do_action: /* This label is used only to access EOF actions. */ |
9017 |
- |
9018 |
- switch ( yy_act ) |
9019 |
- { /* beginning of action switch */ |
9020 |
- case 0: /* must back up */ |
9021 |
- /* undo the effects of YY_DO_BEFORE_ACTION */ |
9022 |
- *yy_cp = yyg->yy_hold_char; |
9023 |
- yy_cp = yyg->yy_last_accepting_cpos; |
9024 |
- yy_current_state = yyg->yy_last_accepting_state; |
9025 |
- goto yy_find_action; |
9026 |
- |
9027 |
-case 1: |
9028 |
-/* rule 1 can match eol */ |
9029 |
-YY_RULE_SETUP |
9030 |
-#line 55 "template_parser.l" |
9031 |
-; |
9032 |
- YY_BREAK |
9033 |
-case 2: |
9034 |
-/* rule 2 can match eol */ |
9035 |
-YY_RULE_SETUP |
9036 |
-#line 56 "template_parser.l" |
9037 |
-; |
9038 |
- YY_BREAK |
9039 |
-/* ------------------------------------------------------------------------- */ |
9040 |
-/* Variable: Alpha numeric charatcers and '_' */ |
9041 |
-/* ------------------------------------------------------------------------- */ |
9042 |
-case 3: |
9043 |
-YY_RULE_SETUP |
9044 |
-#line 61 "template_parser.l" |
9045 |
-{ yylval_param->val_str = mem_collector_strdup(mc,yytext); |
9046 |
- return VARIABLE; } |
9047 |
- YY_BREAK |
9048 |
-/* ------------------------------------------------------------------------ */ |
9049 |
-/* TOKENS */ |
9050 |
-/* Single attribute (VARIABLE = VALUE, also empty VAIABLE=) */ |
9051 |
-/* Vector attributes (VARIABLE = [ ATTR1 = VAL1, ATTR2 = VAL2 ]) */ |
9052 |
-/* ------------------------------------------------------------------------ */ |
9053 |
-case 4: |
9054 |
-YY_RULE_SETUP |
9055 |
-#line 69 "template_parser.l" |
9056 |
-{ BEGIN VALUE; return EQUAL;} |
9057 |
- YY_BREAK |
9058 |
-case 5: |
9059 |
-/* rule 5 can match eol */ |
9060 |
-YY_RULE_SETUP |
9061 |
-#line 71 "template_parser.l" |
9062 |
-{ return EQUAL_EMPTY;} |
9063 |
- YY_BREAK |
9064 |
-case 6: |
9065 |
-/* rule 6 can match eol */ |
9066 |
-YY_RULE_SETUP |
9067 |
-#line 73 "template_parser.l" |
9068 |
-{ return COMMA;} |
9069 |
- YY_BREAK |
9070 |
-case 7: |
9071 |
-/* rule 7 can match eol */ |
9072 |
-YY_RULE_SETUP |
9073 |
-#line 75 "template_parser.l" |
9074 |
-{ return CBRACKET;} |
9075 |
- YY_BREAK |
9076 |
-case 8: |
9077 |
-/* rule 8 can match eol */ |
9078 |
-YY_RULE_SETUP |
9079 |
-#line 77 "template_parser.l" |
9080 |
-{ BEGIN(INITIAL); return OBRACKET;} |
9081 |
- YY_BREAK |
9082 |
-/* ------------------------------------------------------------------------ */ |
9083 |
-/* Attribute values */ |
9084 |
-/* - String in double quoted form */ |
9085 |
-/* - Anything but =,][# and blanks */ |
9086 |
-/* ------------------------------------------------------------------------ */ |
9087 |
-case 9: |
9088 |
-YY_RULE_SETUP |
9089 |
-#line 85 "template_parser.l" |
9090 |
-{ |
9091 |
- BEGIN(INITIAL); |
9092 |
- return CCDATA; |
9093 |
-} |
9094 |
- YY_BREAK |
9095 |
-case 10: |
9096 |
-/* rule 10 can match eol */ |
9097 |
-YY_RULE_SETUP |
9098 |
-#line 90 "template_parser.l" |
9099 |
-{ |
9100 |
- yylval_param->val_str = mem_collector_strdup(mc,yytext+1); |
9101 |
- yylval_param->val_str[yyleng-2] = '\0'; |
9102 |
- BEGIN(INITIAL); |
9103 |
- return STRING; |
9104 |
-} |
9105 |
- YY_BREAK |
9106 |
-case 11: |
9107 |
-YY_RULE_SETUP |
9108 |
-#line 97 "template_parser.l" |
9109 |
-{ |
9110 |
- yylval_param->val_str = mem_collector_strdup(mc,yytext); |
9111 |
- BEGIN(INITIAL); |
9112 |
- return STRING; |
9113 |
-} |
9114 |
- YY_BREAK |
9115 |
-case 12: |
9116 |
-YY_RULE_SETUP |
9117 |
-#line 103 "template_parser.l" |
9118 |
-ECHO; |
9119 |
- YY_BREAK |
9120 |
-#line 1205 "template_parser.cc" |
9121 |
-case YY_STATE_EOF(INITIAL): |
9122 |
-case YY_STATE_EOF(VALUE): |
9123 |
- yyterminate(); |
9124 |
- |
9125 |
- case YY_END_OF_BUFFER: |
9126 |
- { |
9127 |
- /* Amount of text matched not including the EOB char. */ |
9128 |
- int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1; |
9129 |
- |
9130 |
- /* Undo the effects of YY_DO_BEFORE_ACTION. */ |
9131 |
- *yy_cp = yyg->yy_hold_char; |
9132 |
- YY_RESTORE_YY_MORE_OFFSET |
9133 |
- |
9134 |
- if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) |
9135 |
- { |
9136 |
- /* We're scanning a new file or input source. It's |
9137 |
- * possible that this happened because the user |
9138 |
- * just pointed yyin at a new source and called |
9139 |
- * yylex(). If so, then we have to assure |
9140 |
- * consistency between YY_CURRENT_BUFFER and our |
9141 |
- * globals. Here is the right place to do so, because |
9142 |
- * this is the first action (other than possibly a |
9143 |
- * back-up) that will match for the new input source. |
9144 |
- */ |
9145 |
- yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; |
9146 |
- YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; |
9147 |
- YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; |
9148 |
- } |
9149 |
- |
9150 |
- /* Note that here we test for yy_c_buf_p "<=" to the position |
9151 |
- * of the first EOB in the buffer, since yy_c_buf_p will |
9152 |
- * already have been incremented past the NUL character |
9153 |
- * (since all states make transitions on EOB to the |
9154 |
- * end-of-buffer state). Contrast this with the test |
9155 |
- * in input(). |
9156 |
- */ |
9157 |
- if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) |
9158 |
- { /* This was really a NUL. */ |
9159 |
- yy_state_type yy_next_state; |
9160 |
- |
9161 |
- yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; |
9162 |
- |
9163 |
- yy_current_state = yy_get_previous_state( yyscanner ); |
9164 |
- |
9165 |
- /* Okay, we're now positioned to make the NUL |
9166 |
- * transition. We couldn't have |
9167 |
- * yy_get_previous_state() go ahead and do it |
9168 |
- * for us because it doesn't know how to deal |
9169 |
- * with the possibility of jamming (and we don't |
9170 |
- * want to build jamming into it because then it |
9171 |
- * will run more slowly). |
9172 |
- */ |
9173 |
- |
9174 |
- yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner); |
9175 |
- |
9176 |
- yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; |
9177 |
- |
9178 |
- if ( yy_next_state ) |
9179 |
- { |
9180 |
- /* Consume the NUL. */ |
9181 |
- yy_cp = ++yyg->yy_c_buf_p; |
9182 |
- yy_current_state = yy_next_state; |
9183 |
- goto yy_match; |
9184 |
- } |
9185 |
- |
9186 |
- else |
9187 |
- { |
9188 |
- yy_cp = yyg->yy_c_buf_p; |
9189 |
- goto yy_find_action; |
9190 |
- } |
9191 |
- } |
9192 |
- |
9193 |
- else switch ( yy_get_next_buffer( yyscanner ) ) |
9194 |
- { |
9195 |
- case EOB_ACT_END_OF_FILE: |
9196 |
- { |
9197 |
- yyg->yy_did_buffer_switch_on_eof = 0; |
9198 |
- |
9199 |
- if ( yywrap( yyscanner ) ) |
9200 |
- { |
9201 |
- /* Note: because we've taken care in |
9202 |
- * yy_get_next_buffer() to have set up |
9203 |
- * yytext, we can now set up |
9204 |
- * yy_c_buf_p so that if some total |
9205 |
- * hoser (like flex itself) wants to |
9206 |
- * call the scanner after we return the |
9207 |
- * YY_NULL, it'll still work - another |
9208 |
- * YY_NULL will get returned. |
9209 |
- */ |
9210 |
- yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ; |
9211 |
- |
9212 |
- yy_act = YY_STATE_EOF(YY_START); |
9213 |
- goto do_action; |
9214 |
- } |
9215 |
- |
9216 |
- else |
9217 |
- { |
9218 |
- if ( ! yyg->yy_did_buffer_switch_on_eof ) |
9219 |
- YY_NEW_FILE; |
9220 |
- } |
9221 |
- break; |
9222 |
- } |
9223 |
- |
9224 |
- case EOB_ACT_CONTINUE_SCAN: |
9225 |
- yyg->yy_c_buf_p = |
9226 |
- yyg->yytext_ptr + yy_amount_of_matched_text; |
9227 |
- |
9228 |
- yy_current_state = yy_get_previous_state( yyscanner ); |
9229 |
- |
9230 |
- yy_cp = yyg->yy_c_buf_p; |
9231 |
- yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; |
9232 |
- goto yy_match; |
9233 |
- |
9234 |
- case EOB_ACT_LAST_MATCH: |
9235 |
- yyg->yy_c_buf_p = |
9236 |
- &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]; |
9237 |
- |
9238 |
- yy_current_state = yy_get_previous_state( yyscanner ); |
9239 |
- |
9240 |
- yy_cp = yyg->yy_c_buf_p; |
9241 |
- yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; |
9242 |
- goto yy_find_action; |
9243 |
- } |
9244 |
- break; |
9245 |
- } |
9246 |
- |
9247 |
- default: |
9248 |
- YY_FATAL_ERROR( |
9249 |
- "fatal flex scanner internal error--no action found" ); |
9250 |
- } /* end of action switch */ |
9251 |
- } /* end of scanning one token */ |
9252 |
- } /* end of user's declarations */ |
9253 |
-} /* end of yylex */ |
9254 |
- |
9255 |
-/* yy_get_next_buffer - try to read in a new buffer |
9256 |
- * |
9257 |
- * Returns a code representing an action: |
9258 |
- * EOB_ACT_LAST_MATCH - |
9259 |
- * EOB_ACT_CONTINUE_SCAN - continue scanning from current position |
9260 |
- * EOB_ACT_END_OF_FILE - end of file |
9261 |
- */ |
9262 |
-static int yy_get_next_buffer (yyscan_t yyscanner) |
9263 |
-{ |
9264 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
9265 |
- char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; |
9266 |
- char *source = yyg->yytext_ptr; |
9267 |
- int number_to_move, i; |
9268 |
- int ret_val; |
9269 |
- |
9270 |
- if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] ) |
9271 |
- YY_FATAL_ERROR( |
9272 |
- "fatal flex scanner internal error--end of buffer missed" ); |
9273 |
- |
9274 |
- if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) |
9275 |
- { /* Don't try to fill the buffer, so this is an EOF. */ |
9276 |
- if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 ) |
9277 |
- { |
9278 |
- /* We matched a single character, the EOB, so |
9279 |
- * treat this as a final EOF. |
9280 |
- */ |
9281 |
- return EOB_ACT_END_OF_FILE; |
9282 |
- } |
9283 |
- |
9284 |
- else |
9285 |
- { |
9286 |
- /* We matched some text prior to the EOB, first |
9287 |
- * process it. |
9288 |
- */ |
9289 |
- return EOB_ACT_LAST_MATCH; |
9290 |
- } |
9291 |
- } |
9292 |
- |
9293 |
- /* Try to read more data. */ |
9294 |
- |
9295 |
- /* First move last chars to start of buffer. */ |
9296 |
- number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr - 1); |
9297 |
- |
9298 |
- for ( i = 0; i < number_to_move; ++i ) |
9299 |
- *(dest++) = *(source++); |
9300 |
- |
9301 |
- if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) |
9302 |
- /* don't do the read, it's not guaranteed to return an EOF, |
9303 |
- * just force an EOF |
9304 |
- */ |
9305 |
- YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0; |
9306 |
- |
9307 |
- else |
9308 |
- { |
9309 |
- int num_to_read = |
9310 |
- YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; |
9311 |
- |
9312 |
- while ( num_to_read <= 0 ) |
9313 |
- { /* Not enough room in the buffer - grow it. */ |
9314 |
- |
9315 |
- /* just a shorter name for the current buffer */ |
9316 |
- YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; |
9317 |
- |
9318 |
- int yy_c_buf_p_offset = |
9319 |
- (int) (yyg->yy_c_buf_p - b->yy_ch_buf); |
9320 |
- |
9321 |
- if ( b->yy_is_our_buffer ) |
9322 |
- { |
9323 |
- int new_size = b->yy_buf_size * 2; |
9324 |
- |
9325 |
- if ( new_size <= 0 ) |
9326 |
- b->yy_buf_size += b->yy_buf_size / 8; |
9327 |
- else |
9328 |
- b->yy_buf_size *= 2; |
9329 |
- |
9330 |
- b->yy_ch_buf = (char *) |
9331 |
- /* Include room in for 2 EOB chars. */ |
9332 |
- yyrealloc( (void *) b->yy_ch_buf, |
9333 |
- (yy_size_t) (b->yy_buf_size + 2) , yyscanner ); |
9334 |
- } |
9335 |
- else |
9336 |
- /* Can't grow it, we don't own it. */ |
9337 |
- b->yy_ch_buf = NULL; |
9338 |
- |
9339 |
- if ( ! b->yy_ch_buf ) |
9340 |
- YY_FATAL_ERROR( |
9341 |
- "fatal error - scanner input buffer overflow" ); |
9342 |
- |
9343 |
- yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; |
9344 |
- |
9345 |
- num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - |
9346 |
- number_to_move - 1; |
9347 |
- |
9348 |
- } |
9349 |
- |
9350 |
- if ( num_to_read > YY_READ_BUF_SIZE ) |
9351 |
- num_to_read = YY_READ_BUF_SIZE; |
9352 |
- |
9353 |
- /* Read in more data. */ |
9354 |
- YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), |
9355 |
- yyg->yy_n_chars, num_to_read ); |
9356 |
- |
9357 |
- YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; |
9358 |
- } |
9359 |
- |
9360 |
- if ( yyg->yy_n_chars == 0 ) |
9361 |
- { |
9362 |
- if ( number_to_move == YY_MORE_ADJ ) |
9363 |
- { |
9364 |
- ret_val = EOB_ACT_END_OF_FILE; |
9365 |
- yyrestart( yyin , yyscanner); |
9366 |
- } |
9367 |
- |
9368 |
- else |
9369 |
- { |
9370 |
- ret_val = EOB_ACT_LAST_MATCH; |
9371 |
- YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = |
9372 |
- YY_BUFFER_EOF_PENDING; |
9373 |
- } |
9374 |
- } |
9375 |
- |
9376 |
- else |
9377 |
- ret_val = EOB_ACT_CONTINUE_SCAN; |
9378 |
- |
9379 |
- if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { |
9380 |
- /* Extend the array by 50%, plus the number we really need. */ |
9381 |
- int new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); |
9382 |
- YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc( |
9383 |
- (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size , yyscanner ); |
9384 |
- if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) |
9385 |
- YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); |
9386 |
- /* "- 2" to take care of EOB's */ |
9387 |
- YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2); |
9388 |
- } |
9389 |
- |
9390 |
- yyg->yy_n_chars += number_to_move; |
9391 |
- YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR; |
9392 |
- YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; |
9393 |
- |
9394 |
- yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; |
9395 |
- |
9396 |
- return ret_val; |
9397 |
-} |
9398 |
- |
9399 |
-/* yy_get_previous_state - get the state just before the EOB char was reached */ |
9400 |
- |
9401 |
- static yy_state_type yy_get_previous_state (yyscan_t yyscanner) |
9402 |
-{ |
9403 |
- yy_state_type yy_current_state; |
9404 |
- char *yy_cp; |
9405 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
9406 |
- |
9407 |
- yy_current_state = yyg->yy_start; |
9408 |
- |
9409 |
- for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp ) |
9410 |
- { |
9411 |
- YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); |
9412 |
- if ( yy_accept[yy_current_state] ) |
9413 |
- { |
9414 |
- yyg->yy_last_accepting_state = yy_current_state; |
9415 |
- yyg->yy_last_accepting_cpos = yy_cp; |
9416 |
- } |
9417 |
- while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) |
9418 |
- { |
9419 |
- yy_current_state = (int) yy_def[yy_current_state]; |
9420 |
- if ( yy_current_state >= 69 ) |
9421 |
- yy_c = yy_meta[yy_c]; |
9422 |
- } |
9423 |
- yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; |
9424 |
- } |
9425 |
- |
9426 |
- return yy_current_state; |
9427 |
-} |
9428 |
- |
9429 |
-/* yy_try_NUL_trans - try to make a transition on the NUL character |
9430 |
- * |
9431 |
- * synopsis |
9432 |
- * next_state = yy_try_NUL_trans( current_state ); |
9433 |
- */ |
9434 |
- static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner) |
9435 |
-{ |
9436 |
- int yy_is_jam; |
9437 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */ |
9438 |
- char *yy_cp = yyg->yy_c_buf_p; |
9439 |
- |
9440 |
- YY_CHAR yy_c = 1; |
9441 |
- if ( yy_accept[yy_current_state] ) |
9442 |
- { |
9443 |
- yyg->yy_last_accepting_state = yy_current_state; |
9444 |
- yyg->yy_last_accepting_cpos = yy_cp; |
9445 |
- } |
9446 |
- while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) |
9447 |
- { |
9448 |
- yy_current_state = (int) yy_def[yy_current_state]; |
9449 |
- if ( yy_current_state >= 69 ) |
9450 |
- yy_c = yy_meta[yy_c]; |
9451 |
- } |
9452 |
- yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; |
9453 |
- yy_is_jam = (yy_current_state == 68); |
9454 |
- |
9455 |
- (void)yyg; |
9456 |
- return yy_is_jam ? 0 : yy_current_state; |
9457 |
-} |
9458 |
- |
9459 |
-#ifndef YY_NO_UNPUT |
9460 |
- |
9461 |
-#endif |
9462 |
- |
9463 |
-#ifndef YY_NO_INPUT |
9464 |
-#ifdef __cplusplus |
9465 |
- static int yyinput (yyscan_t yyscanner) |
9466 |
-#else |
9467 |
- static int input (yyscan_t yyscanner) |
9468 |
-#endif |
9469 |
- |
9470 |
-{ |
9471 |
- int c; |
9472 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
9473 |
- |
9474 |
- *yyg->yy_c_buf_p = yyg->yy_hold_char; |
9475 |
- |
9476 |
- if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) |
9477 |
- { |
9478 |
- /* yy_c_buf_p now points to the character we want to return. |
9479 |
- * If this occurs *before* the EOB characters, then it's a |
9480 |
- * valid NUL; if not, then we've hit the end of the buffer. |
9481 |
- */ |
9482 |
- if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) |
9483 |
- /* This was really a NUL. */ |
9484 |
- *yyg->yy_c_buf_p = '\0'; |
9485 |
- |
9486 |
- else |
9487 |
- { /* need more input */ |
9488 |
- int offset = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr); |
9489 |
- ++yyg->yy_c_buf_p; |
9490 |
- |
9491 |
- switch ( yy_get_next_buffer( yyscanner ) ) |
9492 |
- { |
9493 |
- case EOB_ACT_LAST_MATCH: |
9494 |
- /* This happens because yy_g_n_b() |
9495 |
- * sees that we've accumulated a |
9496 |
- * token and flags that we need to |
9497 |
- * try matching the token before |
9498 |
- * proceeding. But for input(), |
9499 |
- * there's no matching to consider. |
9500 |
- * So convert the EOB_ACT_LAST_MATCH |
9501 |
- * to EOB_ACT_END_OF_FILE. |
9502 |
- */ |
9503 |
- |
9504 |
- /* Reset buffer status. */ |
9505 |
- yyrestart( yyin , yyscanner); |
9506 |
- |
9507 |
- /*FALLTHROUGH*/ |
9508 |
- |
9509 |
- case EOB_ACT_END_OF_FILE: |
9510 |
- { |
9511 |
- if ( yywrap( yyscanner ) ) |
9512 |
- return 0; |
9513 |
- |
9514 |
- if ( ! yyg->yy_did_buffer_switch_on_eof ) |
9515 |
- YY_NEW_FILE; |
9516 |
-#ifdef __cplusplus |
9517 |
- return yyinput(yyscanner); |
9518 |
-#else |
9519 |
- return input(yyscanner); |
9520 |
-#endif |
9521 |
- } |
9522 |
- |
9523 |
- case EOB_ACT_CONTINUE_SCAN: |
9524 |
- yyg->yy_c_buf_p = yyg->yytext_ptr + offset; |
9525 |
- break; |
9526 |
- } |
9527 |
- } |
9528 |
- } |
9529 |
- |
9530 |
- c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */ |
9531 |
- *yyg->yy_c_buf_p = '\0'; /* preserve yytext */ |
9532 |
- yyg->yy_hold_char = *++yyg->yy_c_buf_p; |
9533 |
- |
9534 |
- if ( c == '\n' ) |
9535 |
- |
9536 |
- do{ yylineno++; |
9537 |
- yycolumn=0; |
9538 |
- }while(0) |
9539 |
-; |
9540 |
- |
9541 |
- return c; |
9542 |
-} |
9543 |
-#endif /* ifndef YY_NO_INPUT */ |
9544 |
- |
9545 |
-/** Immediately switch to a different input stream. |
9546 |
- * @param input_file A readable stream. |
9547 |
- * @param yyscanner The scanner object. |
9548 |
- * @note This function does not reset the start condition to @c INITIAL . |
9549 |
- */ |
9550 |
- void yyrestart (FILE * input_file , yyscan_t yyscanner) |
9551 |
-{ |
9552 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
9553 |
- |
9554 |
- if ( ! YY_CURRENT_BUFFER ){ |
9555 |
- yyensure_buffer_stack (yyscanner); |
9556 |
- YY_CURRENT_BUFFER_LVALUE = |
9557 |
- yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); |
9558 |
- } |
9559 |
- |
9560 |
- yy_init_buffer( YY_CURRENT_BUFFER, input_file , yyscanner); |
9561 |
- yy_load_buffer_state( yyscanner ); |
9562 |
-} |
9563 |
- |
9564 |
-/** Switch to a different input buffer. |
9565 |
- * @param new_buffer The new input buffer. |
9566 |
- * @param yyscanner The scanner object. |
9567 |
- */ |
9568 |
- void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) |
9569 |
-{ |
9570 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
9571 |
- |
9572 |
- /* TODO. We should be able to replace this entire function body |
9573 |
- * with |
9574 |
- * yypop_buffer_state(); |
9575 |
- * yypush_buffer_state(new_buffer); |
9576 |
- */ |
9577 |
- yyensure_buffer_stack (yyscanner); |
9578 |
- if ( YY_CURRENT_BUFFER == new_buffer ) |
9579 |
- return; |
9580 |
- |
9581 |
- if ( YY_CURRENT_BUFFER ) |
9582 |
- { |
9583 |
- /* Flush out information for old buffer. */ |
9584 |
- *yyg->yy_c_buf_p = yyg->yy_hold_char; |
9585 |
- YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; |
9586 |
- YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; |
9587 |
- } |
9588 |
- |
9589 |
- YY_CURRENT_BUFFER_LVALUE = new_buffer; |
9590 |
- yy_load_buffer_state( yyscanner ); |
9591 |
- |
9592 |
- /* We don't actually know whether we did this switch during |
9593 |
- * EOF (yywrap()) processing, but the only time this flag |
9594 |
- * is looked at is after yywrap() is called, so it's safe |
9595 |
- * to go ahead and always set it. |
9596 |
- */ |
9597 |
- yyg->yy_did_buffer_switch_on_eof = 1; |
9598 |
-} |
9599 |
- |
9600 |
-static void yy_load_buffer_state (yyscan_t yyscanner) |
9601 |
-{ |
9602 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
9603 |
- yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; |
9604 |
- yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; |
9605 |
- yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; |
9606 |
- yyg->yy_hold_char = *yyg->yy_c_buf_p; |
9607 |
-} |
9608 |
- |
9609 |
-/** Allocate and initialize an input buffer state. |
9610 |
- * @param file A readable stream. |
9611 |
- * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. |
9612 |
- * @param yyscanner The scanner object. |
9613 |
- * @return the allocated buffer state. |
9614 |
- */ |
9615 |
- YY_BUFFER_STATE yy_create_buffer (FILE * file, int size , yyscan_t yyscanner) |
9616 |
-{ |
9617 |
- YY_BUFFER_STATE b; |
9618 |
- |
9619 |
- b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner ); |
9620 |
- if ( ! b ) |
9621 |
- YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); |
9622 |
- |
9623 |
- b->yy_buf_size = size; |
9624 |
- |
9625 |
- /* yy_ch_buf has to be 2 characters longer than the size given because |
9626 |
- * we need to put in 2 end-of-buffer characters. |
9627 |
- */ |
9628 |
- b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) , yyscanner ); |
9629 |
- if ( ! b->yy_ch_buf ) |
9630 |
- YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); |
9631 |
- |
9632 |
- b->yy_is_our_buffer = 1; |
9633 |
- |
9634 |
- yy_init_buffer( b, file , yyscanner); |
9635 |
- |
9636 |
- return b; |
9637 |
-} |
9638 |
- |
9639 |
-/** Destroy the buffer. |
9640 |
- * @param b a buffer created with yy_create_buffer() |
9641 |
- * @param yyscanner The scanner object. |
9642 |
- */ |
9643 |
- void yy_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) |
9644 |
-{ |
9645 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
9646 |
- |
9647 |
- if ( ! b ) |
9648 |
- return; |
9649 |
- |
9650 |
- if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ |
9651 |
- YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; |
9652 |
- |
9653 |
- if ( b->yy_is_our_buffer ) |
9654 |
- yyfree( (void *) b->yy_ch_buf , yyscanner ); |
9655 |
- |
9656 |
- yyfree( (void *) b , yyscanner ); |
9657 |
-} |
9658 |
- |
9659 |
-/* Initializes or reinitializes a buffer. |
9660 |
- * This function is sometimes called more than once on the same buffer, |
9661 |
- * such as during a yyrestart() or at EOF. |
9662 |
- */ |
9663 |
- static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner) |
9664 |
- |
9665 |
-{ |
9666 |
- int oerrno = errno; |
9667 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
9668 |
- |
9669 |
- yy_flush_buffer( b , yyscanner); |
9670 |
- |
9671 |
- b->yy_input_file = file; |
9672 |
- b->yy_fill_buffer = 1; |
9673 |
- |
9674 |
- /* If b is the current buffer, then yy_init_buffer was _probably_ |
9675 |
- * called from yyrestart() or through yy_get_next_buffer. |
9676 |
- * In that case, we don't want to reset the lineno or column. |
9677 |
- */ |
9678 |
- if (b != YY_CURRENT_BUFFER){ |
9679 |
- b->yy_bs_lineno = 1; |
9680 |
- b->yy_bs_column = 0; |
9681 |
- } |
9682 |
- |
9683 |
- b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; |
9684 |
- |
9685 |
- errno = oerrno; |
9686 |
-} |
9687 |
- |
9688 |
-/** Discard all buffered characters. On the next scan, YY_INPUT will be called. |
9689 |
- * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. |
9690 |
- * @param yyscanner The scanner object. |
9691 |
- */ |
9692 |
- void yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) |
9693 |
-{ |
9694 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
9695 |
- if ( ! b ) |
9696 |
- return; |
9697 |
- |
9698 |
- b->yy_n_chars = 0; |
9699 |
- |
9700 |
- /* We always need two end-of-buffer characters. The first causes |
9701 |
- * a transition to the end-of-buffer state. The second causes |
9702 |
- * a jam in that state. |
9703 |
- */ |
9704 |
- b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; |
9705 |
- b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; |
9706 |
- |
9707 |
- b->yy_buf_pos = &b->yy_ch_buf[0]; |
9708 |
- |
9709 |
- b->yy_at_bol = 1; |
9710 |
- b->yy_buffer_status = YY_BUFFER_NEW; |
9711 |
- |
9712 |
- if ( b == YY_CURRENT_BUFFER ) |
9713 |
- yy_load_buffer_state( yyscanner ); |
9714 |
-} |
9715 |
- |
9716 |
-/** Pushes the new state onto the stack. The new state becomes |
9717 |
- * the current state. This function will allocate the stack |
9718 |
- * if necessary. |
9719 |
- * @param new_buffer The new state. |
9720 |
- * @param yyscanner The scanner object. |
9721 |
- */ |
9722 |
-void yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) |
9723 |
-{ |
9724 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
9725 |
- if (new_buffer == NULL) |
9726 |
- return; |
9727 |
- |
9728 |
- yyensure_buffer_stack(yyscanner); |
9729 |
- |
9730 |
- /* This block is copied from yy_switch_to_buffer. */ |
9731 |
- if ( YY_CURRENT_BUFFER ) |
9732 |
- { |
9733 |
- /* Flush out information for old buffer. */ |
9734 |
- *yyg->yy_c_buf_p = yyg->yy_hold_char; |
9735 |
- YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; |
9736 |
- YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; |
9737 |
- } |
9738 |
- |
9739 |
- /* Only push if top exists. Otherwise, replace top. */ |
9740 |
- if (YY_CURRENT_BUFFER) |
9741 |
- yyg->yy_buffer_stack_top++; |
9742 |
- YY_CURRENT_BUFFER_LVALUE = new_buffer; |
9743 |
- |
9744 |
- /* copied from yy_switch_to_buffer. */ |
9745 |
- yy_load_buffer_state( yyscanner ); |
9746 |
- yyg->yy_did_buffer_switch_on_eof = 1; |
9747 |
-} |
9748 |
- |
9749 |
-/** Removes and deletes the top of the stack, if present. |
9750 |
- * The next element becomes the new top. |
9751 |
- * @param yyscanner The scanner object. |
9752 |
- */ |
9753 |
-void yypop_buffer_state (yyscan_t yyscanner) |
9754 |
-{ |
9755 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
9756 |
- if (!YY_CURRENT_BUFFER) |
9757 |
- return; |
9758 |
- |
9759 |
- yy_delete_buffer(YY_CURRENT_BUFFER , yyscanner); |
9760 |
- YY_CURRENT_BUFFER_LVALUE = NULL; |
9761 |
- if (yyg->yy_buffer_stack_top > 0) |
9762 |
- --yyg->yy_buffer_stack_top; |
9763 |
- |
9764 |
- if (YY_CURRENT_BUFFER) { |
9765 |
- yy_load_buffer_state( yyscanner ); |
9766 |
- yyg->yy_did_buffer_switch_on_eof = 1; |
9767 |
- } |
9768 |
-} |
9769 |
- |
9770 |
-/* Allocates the stack if it does not exist. |
9771 |
- * Guarantees space for at least one push. |
9772 |
- */ |
9773 |
-static void yyensure_buffer_stack (yyscan_t yyscanner) |
9774 |
-{ |
9775 |
- yy_size_t num_to_alloc; |
9776 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
9777 |
- |
9778 |
- if (!yyg->yy_buffer_stack) { |
9779 |
- |
9780 |
- /* First allocation is just for 2 elements, since we don't know if this |
9781 |
- * scanner will even need a stack. We use 2 instead of 1 to avoid an |
9782 |
- * immediate realloc on the next call. |
9783 |
- */ |
9784 |
- num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ |
9785 |
- yyg->yy_buffer_stack = (struct yy_buffer_state**)yyalloc |
9786 |
- (num_to_alloc * sizeof(struct yy_buffer_state*) |
9787 |
- , yyscanner); |
9788 |
- if ( ! yyg->yy_buffer_stack ) |
9789 |
- YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); |
9790 |
- |
9791 |
- memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*)); |
9792 |
- |
9793 |
- yyg->yy_buffer_stack_max = num_to_alloc; |
9794 |
- yyg->yy_buffer_stack_top = 0; |
9795 |
- return; |
9796 |
- } |
9797 |
- |
9798 |
- if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){ |
9799 |
- |
9800 |
- /* Increase the buffer to prepare for a possible push. */ |
9801 |
- yy_size_t grow_size = 8 /* arbitrary grow size */; |
9802 |
- |
9803 |
- num_to_alloc = yyg->yy_buffer_stack_max + grow_size; |
9804 |
- yyg->yy_buffer_stack = (struct yy_buffer_state**)yyrealloc |
9805 |
- (yyg->yy_buffer_stack, |
9806 |
- num_to_alloc * sizeof(struct yy_buffer_state*) |
9807 |
- , yyscanner); |
9808 |
- if ( ! yyg->yy_buffer_stack ) |
9809 |
- YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); |
9810 |
- |
9811 |
- /* zero only the new slots.*/ |
9812 |
- memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*)); |
9813 |
- yyg->yy_buffer_stack_max = num_to_alloc; |
9814 |
- } |
9815 |
-} |
9816 |
- |
9817 |
-/** Setup the input buffer state to scan directly from a user-specified character buffer. |
9818 |
- * @param base the character buffer |
9819 |
- * @param size the size in bytes of the character buffer |
9820 |
- * @param yyscanner The scanner object. |
9821 |
- * @return the newly allocated buffer state object. |
9822 |
- */ |
9823 |
-YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) |
9824 |
-{ |
9825 |
- YY_BUFFER_STATE b; |
9826 |
- |
9827 |
- if ( size < 2 || |
9828 |
- base[size-2] != YY_END_OF_BUFFER_CHAR || |
9829 |
- base[size-1] != YY_END_OF_BUFFER_CHAR ) |
9830 |
- /* They forgot to leave room for the EOB's. */ |
9831 |
- return NULL; |
9832 |
- |
9833 |
- b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner ); |
9834 |
- if ( ! b ) |
9835 |
- YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); |
9836 |
- |
9837 |
- b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */ |
9838 |
- b->yy_buf_pos = b->yy_ch_buf = base; |
9839 |
- b->yy_is_our_buffer = 0; |
9840 |
- b->yy_input_file = NULL; |
9841 |
- b->yy_n_chars = b->yy_buf_size; |
9842 |
- b->yy_is_interactive = 0; |
9843 |
- b->yy_at_bol = 1; |
9844 |
- b->yy_fill_buffer = 0; |
9845 |
- b->yy_buffer_status = YY_BUFFER_NEW; |
9846 |
- |
9847 |
- yy_switch_to_buffer( b , yyscanner ); |
9848 |
- |
9849 |
- return b; |
9850 |
-} |
9851 |
- |
9852 |
-/** Setup the input buffer state to scan a string. The next call to yylex() will |
9853 |
- * scan from a @e copy of @a str. |
9854 |
- * @param yystr a NUL-terminated string to scan |
9855 |
- * @param yyscanner The scanner object. |
9856 |
- * @return the newly allocated buffer state object. |
9857 |
- * @note If you want to scan bytes that may contain NUL values, then use |
9858 |
- * yy_scan_bytes() instead. |
9859 |
- */ |
9860 |
-YY_BUFFER_STATE yy_scan_string (const char * yystr , yyscan_t yyscanner) |
9861 |
-{ |
9862 |
- |
9863 |
- return yy_scan_bytes( yystr, (int) strlen(yystr) , yyscanner); |
9864 |
-} |
9865 |
- |
9866 |
-/** Setup the input buffer state to scan the given bytes. The next call to yylex() will |
9867 |
- * scan from a @e copy of @a bytes. |
9868 |
- * @param yybytes the byte buffer to scan |
9869 |
- * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. |
9870 |
- * @param yyscanner The scanner object. |
9871 |
- * @return the newly allocated buffer state object. |
9872 |
- */ |
9873 |
-YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len , yyscan_t yyscanner) |
9874 |
-{ |
9875 |
- YY_BUFFER_STATE b; |
9876 |
- char *buf; |
9877 |
- yy_size_t n; |
9878 |
- int i; |
9879 |
- |
9880 |
- /* Get memory for full buffer, including space for trailing EOB's. */ |
9881 |
- n = (yy_size_t) (_yybytes_len + 2); |
9882 |
- buf = (char *) yyalloc( n , yyscanner ); |
9883 |
- if ( ! buf ) |
9884 |
- YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); |
9885 |
- |
9886 |
- for ( i = 0; i < _yybytes_len; ++i ) |
9887 |
- buf[i] = yybytes[i]; |
9888 |
- |
9889 |
- buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; |
9890 |
- |
9891 |
- b = yy_scan_buffer( buf, n , yyscanner); |
9892 |
- if ( ! b ) |
9893 |
- YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); |
9894 |
- |
9895 |
- /* It's okay to grow etc. this buffer, and we should throw it |
9896 |
- * away when we're done. |
9897 |
- */ |
9898 |
- b->yy_is_our_buffer = 1; |
9899 |
- |
9900 |
- return b; |
9901 |
-} |
9902 |
- |
9903 |
-#ifndef YY_EXIT_FAILURE |
9904 |
-#define YY_EXIT_FAILURE 2 |
9905 |
-#endif |
9906 |
- |
9907 |
-static void yynoreturn yy_fatal_error (const char* msg , yyscan_t yyscanner) |
9908 |
-{ |
9909 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
9910 |
- (void)yyg; |
9911 |
- fprintf( stderr, "%s\n", msg ); |
9912 |
- exit( YY_EXIT_FAILURE ); |
9913 |
-} |
9914 |
- |
9915 |
-/* Redefine yyless() so it works in section 3 code. */ |
9916 |
- |
9917 |
-#undef yyless |
9918 |
-#define yyless(n) \ |
9919 |
- do \ |
9920 |
- { \ |
9921 |
- /* Undo effects of setting up yytext. */ \ |
9922 |
- int yyless_macro_arg = (n); \ |
9923 |
- YY_LESS_LINENO(yyless_macro_arg);\ |
9924 |
- yytext[yyleng] = yyg->yy_hold_char; \ |
9925 |
- yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ |
9926 |
- yyg->yy_hold_char = *yyg->yy_c_buf_p; \ |
9927 |
- *yyg->yy_c_buf_p = '\0'; \ |
9928 |
- yyleng = yyless_macro_arg; \ |
9929 |
- } \ |
9930 |
- while ( 0 ) |
9931 |
- |
9932 |
-/* Accessor methods (get/set functions) to struct members. */ |
9933 |
- |
9934 |
-/** Get the user-defined data for this scanner. |
9935 |
- * @param yyscanner The scanner object. |
9936 |
- */ |
9937 |
-YY_EXTRA_TYPE yyget_extra (yyscan_t yyscanner) |
9938 |
-{ |
9939 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
9940 |
- return yyextra; |
9941 |
-} |
9942 |
- |
9943 |
-/** Get the current line number. |
9944 |
- * @param yyscanner The scanner object. |
9945 |
- */ |
9946 |
-int yyget_lineno (yyscan_t yyscanner) |
9947 |
-{ |
9948 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
9949 |
- |
9950 |
- if (! YY_CURRENT_BUFFER) |
9951 |
- return 0; |
9952 |
- |
9953 |
- return yylineno; |
9954 |
-} |
9955 |
- |
9956 |
-/** Get the current column number. |
9957 |
- * @param yyscanner The scanner object. |
9958 |
- */ |
9959 |
-int yyget_column (yyscan_t yyscanner) |
9960 |
-{ |
9961 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
9962 |
- |
9963 |
- if (! YY_CURRENT_BUFFER) |
9964 |
- return 0; |
9965 |
- |
9966 |
- return yycolumn; |
9967 |
-} |
9968 |
- |
9969 |
-/** Get the input stream. |
9970 |
- * @param yyscanner The scanner object. |
9971 |
- */ |
9972 |
-FILE *yyget_in (yyscan_t yyscanner) |
9973 |
-{ |
9974 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
9975 |
- return yyin; |
9976 |
-} |
9977 |
- |
9978 |
-/** Get the output stream. |
9979 |
- * @param yyscanner The scanner object. |
9980 |
- */ |
9981 |
-FILE *yyget_out (yyscan_t yyscanner) |
9982 |
-{ |
9983 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
9984 |
- return yyout; |
9985 |
-} |
9986 |
- |
9987 |
-/** Get the length of the current token. |
9988 |
- * @param yyscanner The scanner object. |
9989 |
- */ |
9990 |
-int yyget_leng (yyscan_t yyscanner) |
9991 |
-{ |
9992 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
9993 |
- return yyleng; |
9994 |
-} |
9995 |
- |
9996 |
-/** Get the current token. |
9997 |
- * @param yyscanner The scanner object. |
9998 |
- */ |
9999 |
- |
10000 |
-char *yyget_text (yyscan_t yyscanner) |
10001 |
-{ |
10002 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
10003 |
- return yytext; |
10004 |
-} |
10005 |
- |
10006 |
-/** Set the user-defined data. This data is never touched by the scanner. |
10007 |
- * @param user_defined The data to be associated with this scanner. |
10008 |
- * @param yyscanner The scanner object. |
10009 |
- */ |
10010 |
-void yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner) |
10011 |
-{ |
10012 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
10013 |
- yyextra = user_defined ; |
10014 |
-} |
10015 |
- |
10016 |
-/** Set the current line number. |
10017 |
- * @param _line_number line number |
10018 |
- * @param yyscanner The scanner object. |
10019 |
- */ |
10020 |
-void yyset_lineno (int _line_number , yyscan_t yyscanner) |
10021 |
-{ |
10022 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
10023 |
- |
10024 |
- /* lineno is only valid if an input buffer exists. */ |
10025 |
- if (! YY_CURRENT_BUFFER ) |
10026 |
- YY_FATAL_ERROR( "yyset_lineno called with no buffer" ); |
10027 |
- |
10028 |
- yylineno = _line_number; |
10029 |
-} |
10030 |
- |
10031 |
-/** Set the current column. |
10032 |
- * @param _column_no column number |
10033 |
- * @param yyscanner The scanner object. |
10034 |
- */ |
10035 |
-void yyset_column (int _column_no , yyscan_t yyscanner) |
10036 |
-{ |
10037 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
10038 |
- |
10039 |
- /* column is only valid if an input buffer exists. */ |
10040 |
- if (! YY_CURRENT_BUFFER ) |
10041 |
- YY_FATAL_ERROR( "yyset_column called with no buffer" ); |
10042 |
- |
10043 |
- yycolumn = _column_no; |
10044 |
-} |
10045 |
- |
10046 |
-/** Set the input stream. This does not discard the current |
10047 |
- * input buffer. |
10048 |
- * @param _in_str A readable stream. |
10049 |
- * @param yyscanner The scanner object. |
10050 |
- * @see yy_switch_to_buffer |
10051 |
- */ |
10052 |
-void yyset_in (FILE * _in_str , yyscan_t yyscanner) |
10053 |
-{ |
10054 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
10055 |
- yyin = _in_str ; |
10056 |
-} |
10057 |
- |
10058 |
-void yyset_out (FILE * _out_str , yyscan_t yyscanner) |
10059 |
-{ |
10060 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
10061 |
- yyout = _out_str ; |
10062 |
-} |
10063 |
- |
10064 |
-int yyget_debug (yyscan_t yyscanner) |
10065 |
-{ |
10066 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
10067 |
- return yy_flex_debug; |
10068 |
-} |
10069 |
- |
10070 |
-void yyset_debug (int _bdebug , yyscan_t yyscanner) |
10071 |
-{ |
10072 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
10073 |
- yy_flex_debug = _bdebug ; |
10074 |
-} |
10075 |
- |
10076 |
-/* Accessor methods for yylval and yylloc */ |
10077 |
- |
10078 |
-YYSTYPE * yyget_lval (yyscan_t yyscanner) |
10079 |
-{ |
10080 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
10081 |
- return yylval; |
10082 |
-} |
10083 |
- |
10084 |
-void yyset_lval (YYSTYPE * yylval_param , yyscan_t yyscanner) |
10085 |
-{ |
10086 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
10087 |
- yylval = yylval_param; |
10088 |
-} |
10089 |
- |
10090 |
-/* User-visible API */ |
10091 |
- |
10092 |
-/* yylex_init is special because it creates the scanner itself, so it is |
10093 |
- * the ONLY reentrant function that doesn't take the scanner as the last argument. |
10094 |
- * That's why we explicitly handle the declaration, instead of using our macros. |
10095 |
- */ |
10096 |
-int yylex_init(yyscan_t* ptr_yy_globals) |
10097 |
-{ |
10098 |
- if (ptr_yy_globals == NULL){ |
10099 |
- errno = EINVAL; |
10100 |
- return 1; |
10101 |
- } |
10102 |
- |
10103 |
- *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), NULL ); |
10104 |
- |
10105 |
- if (*ptr_yy_globals == NULL){ |
10106 |
- errno = ENOMEM; |
10107 |
- return 1; |
10108 |
- } |
10109 |
- |
10110 |
- /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ |
10111 |
- memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); |
10112 |
- |
10113 |
- return yy_init_globals ( *ptr_yy_globals ); |
10114 |
-} |
10115 |
- |
10116 |
-/* yylex_init_extra has the same functionality as yylex_init, but follows the |
10117 |
- * convention of taking the scanner as the last argument. Note however, that |
10118 |
- * this is a *pointer* to a scanner, as it will be allocated by this call (and |
10119 |
- * is the reason, too, why this function also must handle its own declaration). |
10120 |
- * The user defined value in the first argument will be available to yyalloc in |
10121 |
- * the yyextra field. |
10122 |
- */ |
10123 |
-int yylex_init_extra( YY_EXTRA_TYPE yy_user_defined, yyscan_t* ptr_yy_globals ) |
10124 |
-{ |
10125 |
- struct yyguts_t dummy_yyguts; |
10126 |
- |
10127 |
- yyset_extra (yy_user_defined, &dummy_yyguts); |
10128 |
- |
10129 |
- if (ptr_yy_globals == NULL){ |
10130 |
- errno = EINVAL; |
10131 |
- return 1; |
10132 |
- } |
10133 |
- |
10134 |
- *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts ); |
10135 |
- |
10136 |
- if (*ptr_yy_globals == NULL){ |
10137 |
- errno = ENOMEM; |
10138 |
- return 1; |
10139 |
- } |
10140 |
- |
10141 |
- /* By setting to 0xAA, we expose bugs in |
10142 |
- yy_init_globals. Leave at 0x00 for releases. */ |
10143 |
- memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); |
10144 |
- |
10145 |
- yyset_extra (yy_user_defined, *ptr_yy_globals); |
10146 |
- |
10147 |
- return yy_init_globals ( *ptr_yy_globals ); |
10148 |
-} |
10149 |
- |
10150 |
-static int yy_init_globals (yyscan_t yyscanner) |
10151 |
-{ |
10152 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
10153 |
- /* Initialization is the same as for the non-reentrant scanner. |
10154 |
- * This function is called from yylex_destroy(), so don't allocate here. |
10155 |
- */ |
10156 |
- |
10157 |
- yyg->yy_buffer_stack = NULL; |
10158 |
- yyg->yy_buffer_stack_top = 0; |
10159 |
- yyg->yy_buffer_stack_max = 0; |
10160 |
- yyg->yy_c_buf_p = NULL; |
10161 |
- yyg->yy_init = 0; |
10162 |
- yyg->yy_start = 0; |
10163 |
- |
10164 |
- yyg->yy_start_stack_ptr = 0; |
10165 |
- yyg->yy_start_stack_depth = 0; |
10166 |
- yyg->yy_start_stack = NULL; |
10167 |
- |
10168 |
-/* Defined in main.c */ |
10169 |
-#ifdef YY_STDINIT |
10170 |
- yyin = stdin; |
10171 |
- yyout = stdout; |
10172 |
-#else |
10173 |
- yyin = NULL; |
10174 |
- yyout = NULL; |
10175 |
-#endif |
10176 |
- |
10177 |
- /* For future reference: Set errno on error, since we are called by |
10178 |
- * yylex_init() |
10179 |
- */ |
10180 |
- return 0; |
10181 |
-} |
10182 |
- |
10183 |
-/* yylex_destroy is for both reentrant and non-reentrant scanners. */ |
10184 |
-int yylex_destroy (yyscan_t yyscanner) |
10185 |
-{ |
10186 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
10187 |
- |
10188 |
- /* Pop the buffer stack, destroying each element. */ |
10189 |
- while(YY_CURRENT_BUFFER){ |
10190 |
- yy_delete_buffer( YY_CURRENT_BUFFER , yyscanner ); |
10191 |
- YY_CURRENT_BUFFER_LVALUE = NULL; |
10192 |
- yypop_buffer_state(yyscanner); |
10193 |
- } |
10194 |
- |
10195 |
- /* Destroy the stack itself. */ |
10196 |
- yyfree(yyg->yy_buffer_stack , yyscanner); |
10197 |
- yyg->yy_buffer_stack = NULL; |
10198 |
- |
10199 |
- /* Destroy the start condition stack. */ |
10200 |
- yyfree( yyg->yy_start_stack , yyscanner ); |
10201 |
- yyg->yy_start_stack = NULL; |
10202 |
- |
10203 |
- /* Reset the globals. This is important in a non-reentrant scanner so the next time |
10204 |
- * yylex() is called, initialization will occur. */ |
10205 |
- yy_init_globals( yyscanner); |
10206 |
- |
10207 |
- /* Destroy the main struct (reentrant only). */ |
10208 |
- yyfree ( yyscanner , yyscanner ); |
10209 |
- yyscanner = NULL; |
10210 |
- return 0; |
10211 |
-} |
10212 |
- |
10213 |
-/* |
10214 |
- * Internal utility routines. |
10215 |
- */ |
10216 |
- |
10217 |
-#ifndef yytext_ptr |
10218 |
-static void yy_flex_strncpy (char* s1, const char * s2, int n , yyscan_t yyscanner) |
10219 |
-{ |
10220 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
10221 |
- (void)yyg; |
10222 |
- |
10223 |
- int i; |
10224 |
- for ( i = 0; i < n; ++i ) |
10225 |
- s1[i] = s2[i]; |
10226 |
-} |
10227 |
-#endif |
10228 |
- |
10229 |
-#ifdef YY_NEED_STRLEN |
10230 |
-static int yy_flex_strlen (const char * s , yyscan_t yyscanner) |
10231 |
-{ |
10232 |
- int n; |
10233 |
- for ( n = 0; s[n]; ++n ) |
10234 |
- ; |
10235 |
- |
10236 |
- return n; |
10237 |
-} |
10238 |
-#endif |
10239 |
- |
10240 |
-void *yyalloc (yy_size_t size , yyscan_t yyscanner) |
10241 |
-{ |
10242 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
10243 |
- (void)yyg; |
10244 |
- return malloc(size); |
10245 |
-} |
10246 |
- |
10247 |
-void *yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner) |
10248 |
-{ |
10249 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
10250 |
- (void)yyg; |
10251 |
- |
10252 |
- /* The cast to (char *) in the following accommodates both |
10253 |
- * implementations that use char* generic pointers, and those |
10254 |
- * that use void* generic pointers. It works with the latter |
10255 |
- * because both ANSI C and C++ allow castless assignment from |
10256 |
- * any pointer type to void*, and deal with argument conversions |
10257 |
- * as though doing an assignment. |
10258 |
- */ |
10259 |
- return realloc(ptr, size); |
10260 |
-} |
10261 |
- |
10262 |
-void yyfree (void * ptr , yyscan_t yyscanner) |
10263 |
-{ |
10264 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
10265 |
- (void)yyg; |
10266 |
- free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ |
10267 |
-} |
10268 |
- |
10269 |
-#define YYTABLES_NAME "yytables" |
10270 |
- |
10271 |
-#line 103 "template_parser.l" |
10272 |
- |
10273 |
- |
10274 |
-int template_wrap(yyscan_t scanner) |
10275 |
-{ |
10276 |
- return 1; |
10277 |
-} |
10278 |
- |
10279 |
|
10280 |
diff --git a/app-emulation/opennebula/files/opennebula-5.10.1/parsers/template_parser.h b/app-emulation/opennebula/files/opennebula-5.10.1/parsers/template_parser.h |
10281 |
deleted file mode 100644 |
10282 |
index 652c368..0000000 |
10283 |
--- a/app-emulation/opennebula/files/opennebula-5.10.1/parsers/template_parser.h |
10284 |
+++ /dev/null |
10285 |
@@ -1,718 +0,0 @@ |
10286 |
-#ifndef template_HEADER_H |
10287 |
-#define template_HEADER_H 1 |
10288 |
-#define template_IN_HEADER 1 |
10289 |
- |
10290 |
-#line 5 "template_parser.h" |
10291 |
- |
10292 |
-#line 7 "template_parser.h" |
10293 |
- |
10294 |
-#define YY_INT_ALIGNED short int |
10295 |
- |
10296 |
-/* A lexical scanner generated by flex */ |
10297 |
- |
10298 |
-#define FLEX_SCANNER |
10299 |
-#define YY_FLEX_MAJOR_VERSION 2 |
10300 |
-#define YY_FLEX_MINOR_VERSION 6 |
10301 |
-#define YY_FLEX_SUBMINOR_VERSION 4 |
10302 |
-#if YY_FLEX_SUBMINOR_VERSION > 0 |
10303 |
-#define FLEX_BETA |
10304 |
-#endif |
10305 |
- |
10306 |
-#ifdef yy_create_buffer |
10307 |
-#define template__create_buffer_ALREADY_DEFINED |
10308 |
-#else |
10309 |
-#define yy_create_buffer template__create_buffer |
10310 |
-#endif |
10311 |
- |
10312 |
-#ifdef yy_delete_buffer |
10313 |
-#define template__delete_buffer_ALREADY_DEFINED |
10314 |
-#else |
10315 |
-#define yy_delete_buffer template__delete_buffer |
10316 |
-#endif |
10317 |
- |
10318 |
-#ifdef yy_scan_buffer |
10319 |
-#define template__scan_buffer_ALREADY_DEFINED |
10320 |
-#else |
10321 |
-#define yy_scan_buffer template__scan_buffer |
10322 |
-#endif |
10323 |
- |
10324 |
-#ifdef yy_scan_string |
10325 |
-#define template__scan_string_ALREADY_DEFINED |
10326 |
-#else |
10327 |
-#define yy_scan_string template__scan_string |
10328 |
-#endif |
10329 |
- |
10330 |
-#ifdef yy_scan_bytes |
10331 |
-#define template__scan_bytes_ALREADY_DEFINED |
10332 |
-#else |
10333 |
-#define yy_scan_bytes template__scan_bytes |
10334 |
-#endif |
10335 |
- |
10336 |
-#ifdef yy_init_buffer |
10337 |
-#define template__init_buffer_ALREADY_DEFINED |
10338 |
-#else |
10339 |
-#define yy_init_buffer template__init_buffer |
10340 |
-#endif |
10341 |
- |
10342 |
-#ifdef yy_flush_buffer |
10343 |
-#define template__flush_buffer_ALREADY_DEFINED |
10344 |
-#else |
10345 |
-#define yy_flush_buffer template__flush_buffer |
10346 |
-#endif |
10347 |
- |
10348 |
-#ifdef yy_load_buffer_state |
10349 |
-#define template__load_buffer_state_ALREADY_DEFINED |
10350 |
-#else |
10351 |
-#define yy_load_buffer_state template__load_buffer_state |
10352 |
-#endif |
10353 |
- |
10354 |
-#ifdef yy_switch_to_buffer |
10355 |
-#define template__switch_to_buffer_ALREADY_DEFINED |
10356 |
-#else |
10357 |
-#define yy_switch_to_buffer template__switch_to_buffer |
10358 |
-#endif |
10359 |
- |
10360 |
-#ifdef yypush_buffer_state |
10361 |
-#define template_push_buffer_state_ALREADY_DEFINED |
10362 |
-#else |
10363 |
-#define yypush_buffer_state template_push_buffer_state |
10364 |
-#endif |
10365 |
- |
10366 |
-#ifdef yypop_buffer_state |
10367 |
-#define template_pop_buffer_state_ALREADY_DEFINED |
10368 |
-#else |
10369 |
-#define yypop_buffer_state template_pop_buffer_state |
10370 |
-#endif |
10371 |
- |
10372 |
-#ifdef yyensure_buffer_stack |
10373 |
-#define template_ensure_buffer_stack_ALREADY_DEFINED |
10374 |
-#else |
10375 |
-#define yyensure_buffer_stack template_ensure_buffer_stack |
10376 |
-#endif |
10377 |
- |
10378 |
-#ifdef yylex |
10379 |
-#define template_lex_ALREADY_DEFINED |
10380 |
-#else |
10381 |
-#define yylex template_lex |
10382 |
-#endif |
10383 |
- |
10384 |
-#ifdef yyrestart |
10385 |
-#define template_restart_ALREADY_DEFINED |
10386 |
-#else |
10387 |
-#define yyrestart template_restart |
10388 |
-#endif |
10389 |
- |
10390 |
-#ifdef yylex_init |
10391 |
-#define template_lex_init_ALREADY_DEFINED |
10392 |
-#else |
10393 |
-#define yylex_init template_lex_init |
10394 |
-#endif |
10395 |
- |
10396 |
-#ifdef yylex_init_extra |
10397 |
-#define template_lex_init_extra_ALREADY_DEFINED |
10398 |
-#else |
10399 |
-#define yylex_init_extra template_lex_init_extra |
10400 |
-#endif |
10401 |
- |
10402 |
-#ifdef yylex_destroy |
10403 |
-#define template_lex_destroy_ALREADY_DEFINED |
10404 |
-#else |
10405 |
-#define yylex_destroy template_lex_destroy |
10406 |
-#endif |
10407 |
- |
10408 |
-#ifdef yyget_debug |
10409 |
-#define template_get_debug_ALREADY_DEFINED |
10410 |
-#else |
10411 |
-#define yyget_debug template_get_debug |
10412 |
-#endif |
10413 |
- |
10414 |
-#ifdef yyset_debug |
10415 |
-#define template_set_debug_ALREADY_DEFINED |
10416 |
-#else |
10417 |
-#define yyset_debug template_set_debug |
10418 |
-#endif |
10419 |
- |
10420 |
-#ifdef yyget_extra |
10421 |
-#define template_get_extra_ALREADY_DEFINED |
10422 |
-#else |
10423 |
-#define yyget_extra template_get_extra |
10424 |
-#endif |
10425 |
- |
10426 |
-#ifdef yyset_extra |
10427 |
-#define template_set_extra_ALREADY_DEFINED |
10428 |
-#else |
10429 |
-#define yyset_extra template_set_extra |
10430 |
-#endif |
10431 |
- |
10432 |
-#ifdef yyget_in |
10433 |
-#define template_get_in_ALREADY_DEFINED |
10434 |
-#else |
10435 |
-#define yyget_in template_get_in |
10436 |
-#endif |
10437 |
- |
10438 |
-#ifdef yyset_in |
10439 |
-#define template_set_in_ALREADY_DEFINED |
10440 |
-#else |
10441 |
-#define yyset_in template_set_in |
10442 |
-#endif |
10443 |
- |
10444 |
-#ifdef yyget_out |
10445 |
-#define template_get_out_ALREADY_DEFINED |
10446 |
-#else |
10447 |
-#define yyget_out template_get_out |
10448 |
-#endif |
10449 |
- |
10450 |
-#ifdef yyset_out |
10451 |
-#define template_set_out_ALREADY_DEFINED |
10452 |
-#else |
10453 |
-#define yyset_out template_set_out |
10454 |
-#endif |
10455 |
- |
10456 |
-#ifdef yyget_leng |
10457 |
-#define template_get_leng_ALREADY_DEFINED |
10458 |
-#else |
10459 |
-#define yyget_leng template_get_leng |
10460 |
-#endif |
10461 |
- |
10462 |
-#ifdef yyget_text |
10463 |
-#define template_get_text_ALREADY_DEFINED |
10464 |
-#else |
10465 |
-#define yyget_text template_get_text |
10466 |
-#endif |
10467 |
- |
10468 |
-#ifdef yyget_lineno |
10469 |
-#define template_get_lineno_ALREADY_DEFINED |
10470 |
-#else |
10471 |
-#define yyget_lineno template_get_lineno |
10472 |
-#endif |
10473 |
- |
10474 |
-#ifdef yyset_lineno |
10475 |
-#define template_set_lineno_ALREADY_DEFINED |
10476 |
-#else |
10477 |
-#define yyset_lineno template_set_lineno |
10478 |
-#endif |
10479 |
- |
10480 |
-#ifdef yyget_column |
10481 |
-#define template_get_column_ALREADY_DEFINED |
10482 |
-#else |
10483 |
-#define yyget_column template_get_column |
10484 |
-#endif |
10485 |
- |
10486 |
-#ifdef yyset_column |
10487 |
-#define template_set_column_ALREADY_DEFINED |
10488 |
-#else |
10489 |
-#define yyset_column template_set_column |
10490 |
-#endif |
10491 |
- |
10492 |
-#ifdef yywrap |
10493 |
-#define template_wrap_ALREADY_DEFINED |
10494 |
-#else |
10495 |
-#define yywrap template_wrap |
10496 |
-#endif |
10497 |
- |
10498 |
-#ifdef yyget_lval |
10499 |
-#define template_get_lval_ALREADY_DEFINED |
10500 |
-#else |
10501 |
-#define yyget_lval template_get_lval |
10502 |
-#endif |
10503 |
- |
10504 |
-#ifdef yyset_lval |
10505 |
-#define template_set_lval_ALREADY_DEFINED |
10506 |
-#else |
10507 |
-#define yyset_lval template_set_lval |
10508 |
-#endif |
10509 |
- |
10510 |
-#ifdef yyalloc |
10511 |
-#define template_alloc_ALREADY_DEFINED |
10512 |
-#else |
10513 |
-#define yyalloc template_alloc |
10514 |
-#endif |
10515 |
- |
10516 |
-#ifdef yyrealloc |
10517 |
-#define template_realloc_ALREADY_DEFINED |
10518 |
-#else |
10519 |
-#define yyrealloc template_realloc |
10520 |
-#endif |
10521 |
- |
10522 |
-#ifdef yyfree |
10523 |
-#define template_free_ALREADY_DEFINED |
10524 |
-#else |
10525 |
-#define yyfree template_free |
10526 |
-#endif |
10527 |
- |
10528 |
-/* First, we deal with platform-specific or compiler-specific issues. */ |
10529 |
- |
10530 |
-/* begin standard C headers. */ |
10531 |
-#include <stdio.h> |
10532 |
-#include <string.h> |
10533 |
-#include <errno.h> |
10534 |
-#include <stdlib.h> |
10535 |
- |
10536 |
-/* end standard C headers. */ |
10537 |
- |
10538 |
-/* flex integer type definitions */ |
10539 |
- |
10540 |
-#ifndef FLEXINT_H |
10541 |
-#define FLEXINT_H |
10542 |
- |
10543 |
-/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */ |
10544 |
- |
10545 |
-#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L |
10546 |
- |
10547 |
-/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, |
10548 |
- * if you want the limit (max/min) macros for int types. |
10549 |
- */ |
10550 |
-#ifndef __STDC_LIMIT_MACROS |
10551 |
-#define __STDC_LIMIT_MACROS 1 |
10552 |
-#endif |
10553 |
- |
10554 |
-#include <inttypes.h> |
10555 |
-typedef int8_t flex_int8_t; |
10556 |
-typedef uint8_t flex_uint8_t; |
10557 |
-typedef int16_t flex_int16_t; |
10558 |
-typedef uint16_t flex_uint16_t; |
10559 |
-typedef int32_t flex_int32_t; |
10560 |
-typedef uint32_t flex_uint32_t; |
10561 |
-#else |
10562 |
-typedef signed char flex_int8_t; |
10563 |
-typedef short int flex_int16_t; |
10564 |
-typedef int flex_int32_t; |
10565 |
-typedef unsigned char flex_uint8_t; |
10566 |
-typedef unsigned short int flex_uint16_t; |
10567 |
-typedef unsigned int flex_uint32_t; |
10568 |
- |
10569 |
-/* Limits of integral types. */ |
10570 |
-#ifndef INT8_MIN |
10571 |
-#define INT8_MIN (-128) |
10572 |
-#endif |
10573 |
-#ifndef INT16_MIN |
10574 |
-#define INT16_MIN (-32767-1) |
10575 |
-#endif |
10576 |
-#ifndef INT32_MIN |
10577 |
-#define INT32_MIN (-2147483647-1) |
10578 |
-#endif |
10579 |
-#ifndef INT8_MAX |
10580 |
-#define INT8_MAX (127) |
10581 |
-#endif |
10582 |
-#ifndef INT16_MAX |
10583 |
-#define INT16_MAX (32767) |
10584 |
-#endif |
10585 |
-#ifndef INT32_MAX |
10586 |
-#define INT32_MAX (2147483647) |
10587 |
-#endif |
10588 |
-#ifndef UINT8_MAX |
10589 |
-#define UINT8_MAX (255U) |
10590 |
-#endif |
10591 |
-#ifndef UINT16_MAX |
10592 |
-#define UINT16_MAX (65535U) |
10593 |
-#endif |
10594 |
-#ifndef UINT32_MAX |
10595 |
-#define UINT32_MAX (4294967295U) |
10596 |
-#endif |
10597 |
- |
10598 |
-#ifndef SIZE_MAX |
10599 |
-#define SIZE_MAX (~(size_t)0) |
10600 |
-#endif |
10601 |
- |
10602 |
-#endif /* ! C99 */ |
10603 |
- |
10604 |
-#endif /* ! FLEXINT_H */ |
10605 |
- |
10606 |
-/* begin standard C++ headers. */ |
10607 |
- |
10608 |
-/* TODO: this is always defined, so inline it */ |
10609 |
-#define yyconst const |
10610 |
- |
10611 |
-#if defined(__GNUC__) && __GNUC__ >= 3 |
10612 |
-#define yynoreturn __attribute__((__noreturn__)) |
10613 |
-#else |
10614 |
-#define yynoreturn |
10615 |
-#endif |
10616 |
- |
10617 |
-/* An opaque pointer. */ |
10618 |
-#ifndef YY_TYPEDEF_YY_SCANNER_T |
10619 |
-#define YY_TYPEDEF_YY_SCANNER_T |
10620 |
-typedef void* yyscan_t; |
10621 |
-#endif |
10622 |
- |
10623 |
-/* For convenience, these vars (plus the bison vars far below) |
10624 |
- are macros in the reentrant scanner. */ |
10625 |
-#define yyin yyg->yyin_r |
10626 |
-#define yyout yyg->yyout_r |
10627 |
-#define yyextra yyg->yyextra_r |
10628 |
-#define yyleng yyg->yyleng_r |
10629 |
-#define yytext yyg->yytext_r |
10630 |
-#define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno) |
10631 |
-#define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column) |
10632 |
-#define yy_flex_debug yyg->yy_flex_debug_r |
10633 |
- |
10634 |
-/* Size of default input buffer. */ |
10635 |
-#ifndef YY_BUF_SIZE |
10636 |
-#ifdef __ia64__ |
10637 |
-/* On IA-64, the buffer size is 16k, not 8k. |
10638 |
- * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. |
10639 |
- * Ditto for the __ia64__ case accordingly. |
10640 |
- */ |
10641 |
-#define YY_BUF_SIZE 32768 |
10642 |
-#else |
10643 |
-#define YY_BUF_SIZE 16384 |
10644 |
-#endif /* __ia64__ */ |
10645 |
-#endif |
10646 |
- |
10647 |
-#ifndef YY_TYPEDEF_YY_BUFFER_STATE |
10648 |
-#define YY_TYPEDEF_YY_BUFFER_STATE |
10649 |
-typedef struct yy_buffer_state *YY_BUFFER_STATE; |
10650 |
-#endif |
10651 |
- |
10652 |
-#ifndef YY_TYPEDEF_YY_SIZE_T |
10653 |
-#define YY_TYPEDEF_YY_SIZE_T |
10654 |
-typedef size_t yy_size_t; |
10655 |
-#endif |
10656 |
- |
10657 |
-#ifndef YY_STRUCT_YY_BUFFER_STATE |
10658 |
-#define YY_STRUCT_YY_BUFFER_STATE |
10659 |
-struct yy_buffer_state |
10660 |
- { |
10661 |
- FILE *yy_input_file; |
10662 |
- |
10663 |
- char *yy_ch_buf; /* input buffer */ |
10664 |
- char *yy_buf_pos; /* current position in input buffer */ |
10665 |
- |
10666 |
- /* Size of input buffer in bytes, not including room for EOB |
10667 |
- * characters. |
10668 |
- */ |
10669 |
- int yy_buf_size; |
10670 |
- |
10671 |
- /* Number of characters read into yy_ch_buf, not including EOB |
10672 |
- * characters. |
10673 |
- */ |
10674 |
- int yy_n_chars; |
10675 |
- |
10676 |
- /* Whether we "own" the buffer - i.e., we know we created it, |
10677 |
- * and can realloc() it to grow it, and should free() it to |
10678 |
- * delete it. |
10679 |
- */ |
10680 |
- int yy_is_our_buffer; |
10681 |
- |
10682 |
- /* Whether this is an "interactive" input source; if so, and |
10683 |
- * if we're using stdio for input, then we want to use getc() |
10684 |
- * instead of fread(), to make sure we stop fetching input after |
10685 |
- * each newline. |
10686 |
- */ |
10687 |
- int yy_is_interactive; |
10688 |
- |
10689 |
- /* Whether we're considered to be at the beginning of a line. |
10690 |
- * If so, '^' rules will be active on the next match, otherwise |
10691 |
- * not. |
10692 |
- */ |
10693 |
- int yy_at_bol; |
10694 |
- |
10695 |
- int yy_bs_lineno; /**< The line count. */ |
10696 |
- int yy_bs_column; /**< The column count. */ |
10697 |
- |
10698 |
- /* Whether to try to fill the input buffer when we reach the |
10699 |
- * end of it. |
10700 |
- */ |
10701 |
- int yy_fill_buffer; |
10702 |
- |
10703 |
- int yy_buffer_status; |
10704 |
- |
10705 |
- }; |
10706 |
-#endif /* !YY_STRUCT_YY_BUFFER_STATE */ |
10707 |
- |
10708 |
-void yyrestart ( FILE *input_file , yyscan_t yyscanner ); |
10709 |
-void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); |
10710 |
-YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner ); |
10711 |
-void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); |
10712 |
-void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); |
10713 |
-void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); |
10714 |
-void yypop_buffer_state ( yyscan_t yyscanner ); |
10715 |
- |
10716 |
-YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner ); |
10717 |
-YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner ); |
10718 |
-YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len , yyscan_t yyscanner ); |
10719 |
- |
10720 |
-void *yyalloc ( yy_size_t , yyscan_t yyscanner ); |
10721 |
-void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner ); |
10722 |
-void yyfree ( void * , yyscan_t yyscanner ); |
10723 |
- |
10724 |
-/* Begin user sect3 */ |
10725 |
- |
10726 |
-#define yytext_ptr yytext_r |
10727 |
- |
10728 |
-#ifdef YY_HEADER_EXPORT_START_CONDITIONS |
10729 |
-#define INITIAL 0 |
10730 |
-#define VALUE 1 |
10731 |
- |
10732 |
-#endif |
10733 |
- |
10734 |
-#ifndef YY_NO_UNISTD_H |
10735 |
-/* Special case for "unistd.h", since it is non-ANSI. We include it way |
10736 |
- * down here because we want the user's section 1 to have been scanned first. |
10737 |
- * The user has a chance to override it with an option. |
10738 |
- */ |
10739 |
-#include <unistd.h> |
10740 |
-#endif |
10741 |
- |
10742 |
-#ifndef YY_EXTRA_TYPE |
10743 |
-#define YY_EXTRA_TYPE void * |
10744 |
-#endif |
10745 |
- |
10746 |
-int yylex_init (yyscan_t* scanner); |
10747 |
- |
10748 |
-int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner); |
10749 |
- |
10750 |
-/* Accessor methods to globals. |
10751 |
- These are made visible to non-reentrant scanners for convenience. */ |
10752 |
- |
10753 |
-int yylex_destroy ( yyscan_t yyscanner ); |
10754 |
- |
10755 |
-int yyget_debug ( yyscan_t yyscanner ); |
10756 |
- |
10757 |
-void yyset_debug ( int debug_flag , yyscan_t yyscanner ); |
10758 |
- |
10759 |
-YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner ); |
10760 |
- |
10761 |
-void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner ); |
10762 |
- |
10763 |
-FILE *yyget_in ( yyscan_t yyscanner ); |
10764 |
- |
10765 |
-void yyset_in ( FILE * _in_str , yyscan_t yyscanner ); |
10766 |
- |
10767 |
-FILE *yyget_out ( yyscan_t yyscanner ); |
10768 |
- |
10769 |
-void yyset_out ( FILE * _out_str , yyscan_t yyscanner ); |
10770 |
- |
10771 |
- int yyget_leng ( yyscan_t yyscanner ); |
10772 |
- |
10773 |
-char *yyget_text ( yyscan_t yyscanner ); |
10774 |
- |
10775 |
-int yyget_lineno ( yyscan_t yyscanner ); |
10776 |
- |
10777 |
-void yyset_lineno ( int _line_number , yyscan_t yyscanner ); |
10778 |
- |
10779 |
-int yyget_column ( yyscan_t yyscanner ); |
10780 |
- |
10781 |
-void yyset_column ( int _column_no , yyscan_t yyscanner ); |
10782 |
- |
10783 |
-YYSTYPE * yyget_lval ( yyscan_t yyscanner ); |
10784 |
- |
10785 |
-void yyset_lval ( YYSTYPE * yylval_param , yyscan_t yyscanner ); |
10786 |
- |
10787 |
-/* Macros after this point can all be overridden by user definitions in |
10788 |
- * section 1. |
10789 |
- */ |
10790 |
- |
10791 |
-#ifndef YY_SKIP_YYWRAP |
10792 |
-#ifdef __cplusplus |
10793 |
-extern "C" int yywrap ( yyscan_t yyscanner ); |
10794 |
-#else |
10795 |
-extern int yywrap ( yyscan_t yyscanner ); |
10796 |
-#endif |
10797 |
-#endif |
10798 |
- |
10799 |
-#ifndef yytext_ptr |
10800 |
-static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner); |
10801 |
-#endif |
10802 |
- |
10803 |
-#ifdef YY_NEED_STRLEN |
10804 |
-static int yy_flex_strlen ( const char * , yyscan_t yyscanner); |
10805 |
-#endif |
10806 |
- |
10807 |
-#ifndef YY_NO_INPUT |
10808 |
- |
10809 |
-#endif |
10810 |
- |
10811 |
-/* Amount of stuff to slurp up with each read. */ |
10812 |
-#ifndef YY_READ_BUF_SIZE |
10813 |
-#ifdef __ia64__ |
10814 |
-/* On IA-64, the buffer size is 16k, not 8k */ |
10815 |
-#define YY_READ_BUF_SIZE 16384 |
10816 |
-#else |
10817 |
-#define YY_READ_BUF_SIZE 8192 |
10818 |
-#endif /* __ia64__ */ |
10819 |
-#endif |
10820 |
- |
10821 |
-/* Number of entries by which start-condition stack grows. */ |
10822 |
-#ifndef YY_START_STACK_INCR |
10823 |
-#define YY_START_STACK_INCR 25 |
10824 |
-#endif |
10825 |
- |
10826 |
-/* Default declaration of generated scanner - a define so the user can |
10827 |
- * easily add parameters. |
10828 |
- */ |
10829 |
-#ifndef YY_DECL |
10830 |
-#define YY_DECL_IS_OURS 1 |
10831 |
- |
10832 |
-extern int yylex \ |
10833 |
- (YYSTYPE * yylval_param , yyscan_t yyscanner); |
10834 |
- |
10835 |
-#define YY_DECL int yylex \ |
10836 |
- (YYSTYPE * yylval_param , yyscan_t yyscanner) |
10837 |
-#endif /* !YY_DECL */ |
10838 |
- |
10839 |
-/* yy_get_previous_state - get the state just before the EOB char was reached */ |
10840 |
- |
10841 |
-#undef YY_NEW_FILE |
10842 |
-#undef YY_FLUSH_BUFFER |
10843 |
-#undef yy_set_bol |
10844 |
-#undef yy_new_buffer |
10845 |
-#undef yy_set_interactive |
10846 |
-#undef YY_DO_BEFORE_ACTION |
10847 |
- |
10848 |
-#ifdef YY_DECL_IS_OURS |
10849 |
-#undef YY_DECL_IS_OURS |
10850 |
-#undef YY_DECL |
10851 |
-#endif |
10852 |
- |
10853 |
-#ifndef template__create_buffer_ALREADY_DEFINED |
10854 |
-#undef yy_create_buffer |
10855 |
-#endif |
10856 |
-#ifndef template__delete_buffer_ALREADY_DEFINED |
10857 |
-#undef yy_delete_buffer |
10858 |
-#endif |
10859 |
-#ifndef template__scan_buffer_ALREADY_DEFINED |
10860 |
-#undef yy_scan_buffer |
10861 |
-#endif |
10862 |
-#ifndef template__scan_string_ALREADY_DEFINED |
10863 |
-#undef yy_scan_string |
10864 |
-#endif |
10865 |
-#ifndef template__scan_bytes_ALREADY_DEFINED |
10866 |
-#undef yy_scan_bytes |
10867 |
-#endif |
10868 |
-#ifndef template__init_buffer_ALREADY_DEFINED |
10869 |
-#undef yy_init_buffer |
10870 |
-#endif |
10871 |
-#ifndef template__flush_buffer_ALREADY_DEFINED |
10872 |
-#undef yy_flush_buffer |
10873 |
-#endif |
10874 |
-#ifndef template__load_buffer_state_ALREADY_DEFINED |
10875 |
-#undef yy_load_buffer_state |
10876 |
-#endif |
10877 |
-#ifndef template__switch_to_buffer_ALREADY_DEFINED |
10878 |
-#undef yy_switch_to_buffer |
10879 |
-#endif |
10880 |
-#ifndef template_push_buffer_state_ALREADY_DEFINED |
10881 |
-#undef yypush_buffer_state |
10882 |
-#endif |
10883 |
-#ifndef template_pop_buffer_state_ALREADY_DEFINED |
10884 |
-#undef yypop_buffer_state |
10885 |
-#endif |
10886 |
-#ifndef template_ensure_buffer_stack_ALREADY_DEFINED |
10887 |
-#undef yyensure_buffer_stack |
10888 |
-#endif |
10889 |
-#ifndef template_lex_ALREADY_DEFINED |
10890 |
-#undef yylex |
10891 |
-#endif |
10892 |
-#ifndef template_restart_ALREADY_DEFINED |
10893 |
-#undef yyrestart |
10894 |
-#endif |
10895 |
-#ifndef template_lex_init_ALREADY_DEFINED |
10896 |
-#undef yylex_init |
10897 |
-#endif |
10898 |
-#ifndef template_lex_init_extra_ALREADY_DEFINED |
10899 |
-#undef yylex_init_extra |
10900 |
-#endif |
10901 |
-#ifndef template_lex_destroy_ALREADY_DEFINED |
10902 |
-#undef yylex_destroy |
10903 |
-#endif |
10904 |
-#ifndef template_get_debug_ALREADY_DEFINED |
10905 |
-#undef yyget_debug |
10906 |
-#endif |
10907 |
-#ifndef template_set_debug_ALREADY_DEFINED |
10908 |
-#undef yyset_debug |
10909 |
-#endif |
10910 |
-#ifndef template_get_extra_ALREADY_DEFINED |
10911 |
-#undef yyget_extra |
10912 |
-#endif |
10913 |
-#ifndef template_set_extra_ALREADY_DEFINED |
10914 |
-#undef yyset_extra |
10915 |
-#endif |
10916 |
-#ifndef template_get_in_ALREADY_DEFINED |
10917 |
-#undef yyget_in |
10918 |
-#endif |
10919 |
-#ifndef template_set_in_ALREADY_DEFINED |
10920 |
-#undef yyset_in |
10921 |
-#endif |
10922 |
-#ifndef template_get_out_ALREADY_DEFINED |
10923 |
-#undef yyget_out |
10924 |
-#endif |
10925 |
-#ifndef template_set_out_ALREADY_DEFINED |
10926 |
-#undef yyset_out |
10927 |
-#endif |
10928 |
-#ifndef template_get_leng_ALREADY_DEFINED |
10929 |
-#undef yyget_leng |
10930 |
-#endif |
10931 |
-#ifndef template_get_text_ALREADY_DEFINED |
10932 |
-#undef yyget_text |
10933 |
-#endif |
10934 |
-#ifndef template_get_lineno_ALREADY_DEFINED |
10935 |
-#undef yyget_lineno |
10936 |
-#endif |
10937 |
-#ifndef template_set_lineno_ALREADY_DEFINED |
10938 |
-#undef yyset_lineno |
10939 |
-#endif |
10940 |
-#ifndef template_get_column_ALREADY_DEFINED |
10941 |
-#undef yyget_column |
10942 |
-#endif |
10943 |
-#ifndef template_set_column_ALREADY_DEFINED |
10944 |
-#undef yyset_column |
10945 |
-#endif |
10946 |
-#ifndef template_wrap_ALREADY_DEFINED |
10947 |
-#undef yywrap |
10948 |
-#endif |
10949 |
-#ifndef template_get_lval_ALREADY_DEFINED |
10950 |
-#undef yyget_lval |
10951 |
-#endif |
10952 |
-#ifndef template_set_lval_ALREADY_DEFINED |
10953 |
-#undef yyset_lval |
10954 |
-#endif |
10955 |
-#ifndef template_get_lloc_ALREADY_DEFINED |
10956 |
-#undef yyget_lloc |
10957 |
-#endif |
10958 |
-#ifndef template_set_lloc_ALREADY_DEFINED |
10959 |
-#undef yyset_lloc |
10960 |
-#endif |
10961 |
-#ifndef template_alloc_ALREADY_DEFINED |
10962 |
-#undef yyalloc |
10963 |
-#endif |
10964 |
-#ifndef template_realloc_ALREADY_DEFINED |
10965 |
-#undef yyrealloc |
10966 |
-#endif |
10967 |
-#ifndef template_free_ALREADY_DEFINED |
10968 |
-#undef yyfree |
10969 |
-#endif |
10970 |
-#ifndef template_text_ALREADY_DEFINED |
10971 |
-#undef yytext |
10972 |
-#endif |
10973 |
-#ifndef template_leng_ALREADY_DEFINED |
10974 |
-#undef yyleng |
10975 |
-#endif |
10976 |
-#ifndef template_in_ALREADY_DEFINED |
10977 |
-#undef yyin |
10978 |
-#endif |
10979 |
-#ifndef template_out_ALREADY_DEFINED |
10980 |
-#undef yyout |
10981 |
-#endif |
10982 |
-#ifndef template__flex_debug_ALREADY_DEFINED |
10983 |
-#undef yy_flex_debug |
10984 |
-#endif |
10985 |
-#ifndef template_lineno_ALREADY_DEFINED |
10986 |
-#undef yylineno |
10987 |
-#endif |
10988 |
-#ifndef template_tables_fload_ALREADY_DEFINED |
10989 |
-#undef yytables_fload |
10990 |
-#endif |
10991 |
-#ifndef template_tables_destroy_ALREADY_DEFINED |
10992 |
-#undef yytables_destroy |
10993 |
-#endif |
10994 |
-#ifndef template_TABLES_NAME_ALREADY_DEFINED |
10995 |
-#undef yyTABLES_NAME |
10996 |
-#endif |
10997 |
- |
10998 |
-#line 103 "template_parser.l" |
10999 |
- |
11000 |
- |
11001 |
-#line 716 "template_parser.h" |
11002 |
-#undef template_IN_HEADER |
11003 |
-#endif /* template_HEADER_H */ |
11004 |
|
11005 |
diff --git a/app-emulation/opennebula/files/opennebula-5.10.1/parsers/template_parser.l b/app-emulation/opennebula/files/opennebula-5.10.1/parsers/template_parser.l |
11006 |
deleted file mode 100644 |
11007 |
index dc96c88..0000000 |
11008 |
--- a/app-emulation/opennebula/files/opennebula-5.10.1/parsers/template_parser.l |
11009 |
+++ /dev/null |
11010 |
@@ -1,107 +0,0 @@ |
11011 |
-/* -------------------------------------------------------------------------- */ |
11012 |
-/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */ |
11013 |
-/* */ |
11014 |
-/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ |
11015 |
-/* not use this file except in compliance with the License. You may obtain */ |
11016 |
-/* a copy of the License at */ |
11017 |
-/* */ |
11018 |
-/* http://www.apache.org/licenses/LICENSE-2.0 */ |
11019 |
-/* */ |
11020 |
-/* Unless required by applicable law or agreed to in writing, software */ |
11021 |
-/* distributed under the License is distributed on an "AS IS" BASIS, */ |
11022 |
-/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ |
11023 |
-/* See the License for the specific language governing permissions and */ |
11024 |
-/* limitations under the License. */ |
11025 |
-/* -------------------------------------------------------------------------- */ |
11026 |
- |
11027 |
-%{ |
11028 |
-#include <stdio.h> |
11029 |
-#include <stdlib.h> |
11030 |
-#include <string.h> |
11031 |
-#include <pthread.h> |
11032 |
- |
11033 |
-#include "template_syntax.h" |
11034 |
-#include "mem_collector.h" |
11035 |
- |
11036 |
-#define YY_NO_INPUT |
11037 |
- |
11038 |
-#define YY_DECL int template_lex (YYSTYPE *yylval_param, YYLTYPE *llocp, \ |
11039 |
- mem_collector *mc, yyscan_t yyscanner) |
11040 |
- |
11041 |
-#define YY_USER_ACTION llocp->first_line = yylineno; \ |
11042 |
- llocp->first_column = llocp->last_column; \ |
11043 |
- llocp->last_column += yyleng; |
11044 |
-%} |
11045 |
- |
11046 |
-%option nounput |
11047 |
-%option prefix="template_" |
11048 |
-%option outfile="template_parser.cc" |
11049 |
-%option header-file="template_parser.h" |
11050 |
-%option bison-bridge |
11051 |
-%option yylineno |
11052 |
-%option reentrant |
11053 |
- |
11054 |
-%x VALUE |
11055 |
- |
11056 |
-STRING [^=#[:blank:]\n,\[\]]+ |
11057 |
-VALUE_STRING ([^\"]|"\\\"")* |
11058 |
-CDATA "\]\]\>" |
11059 |
-%% |
11060 |
- |
11061 |
- /* ------------------------------------------------------------------------- */ |
11062 |
- /* Comments (lines with an starting #), and empty lines */ |
11063 |
- /* ------------------------------------------------------------------------- */ |
11064 |
-[[:blank:]]*#.*\n ; |
11065 |
-[[:blank:]\n]+ ; |
11066 |
- |
11067 |
- /* ------------------------------------------------------------------------- */ |
11068 |
- /* Variable: Alpha numeric charatcers and '_' */ |
11069 |
- /* ------------------------------------------------------------------------- */ |
11070 |
-[[:alnum:]_]+ { yylval_param->val_str = mem_collector_strdup(mc,yytext); |
11071 |
- return VARIABLE; } |
11072 |
- |
11073 |
- /* ------------------------------------------------------------------------ */ |
11074 |
- /* TOKENS */ |
11075 |
- /* Single attribute (VARIABLE = VALUE, also empty VAIABLE=) */ |
11076 |
- /* Vector attributes (VARIABLE = [ ATTR1 = VAL1, ATTR2 = VAL2 ]) */ |
11077 |
- /* ------------------------------------------------------------------------ */ |
11078 |
-[[:blank:]]*=[[:blank:]]* { BEGIN VALUE; return EQUAL;} |
11079 |
- |
11080 |
-[[:blank:]]*=[[:blank:]]*\n { return EQUAL_EMPTY;} |
11081 |
- |
11082 |
-[[:blank:]\n]*,[[:blank:]\n]* { return COMMA;} |
11083 |
- |
11084 |
-[[:blank:]\n]*\][[:blank:]\n]* { return CBRACKET;} |
11085 |
- |
11086 |
-<VALUE>[[:blank:]]*\[[[:blank:]\n]* { BEGIN(INITIAL); return OBRACKET;} |
11087 |
- |
11088 |
- /* ------------------------------------------------------------------------ */ |
11089 |
- /* Attribute values */ |
11090 |
- /* - String in double quoted form */ |
11091 |
- /* - Anything but =,][# and blanks */ |
11092 |
- /* ------------------------------------------------------------------------ */ |
11093 |
- |
11094 |
-<VALUE>.*{CDATA}.* { |
11095 |
- BEGIN(INITIAL); |
11096 |
- return CCDATA; |
11097 |
-} |
11098 |
- |
11099 |
-<VALUE>\"{VALUE_STRING}\" { |
11100 |
- yylval_param->val_str = mem_collector_strdup(mc,yytext+1); |
11101 |
- yylval_param->val_str[yyleng-2] = '\0'; |
11102 |
- BEGIN(INITIAL); |
11103 |
- return STRING; |
11104 |
-} |
11105 |
- |
11106 |
-<VALUE>{STRING} { |
11107 |
- yylval_param->val_str = mem_collector_strdup(mc,yytext); |
11108 |
- BEGIN(INITIAL); |
11109 |
- return STRING; |
11110 |
-} |
11111 |
- |
11112 |
-%% |
11113 |
- |
11114 |
-int template_wrap(yyscan_t scanner) |
11115 |
-{ |
11116 |
- return 1; |
11117 |
-} |
11118 |
|
11119 |
diff --git a/app-emulation/opennebula/files/opennebula-5.10.1/parsers/template_syntax.cc b/app-emulation/opennebula/files/opennebula-5.10.1/parsers/template_syntax.cc |
11120 |
deleted file mode 100644 |
11121 |
index f23cae5..0000000 |
11122 |
--- a/app-emulation/opennebula/files/opennebula-5.10.1/parsers/template_syntax.cc |
11123 |
+++ /dev/null |
11124 |
@@ -1,1779 +0,0 @@ |
11125 |
-/* A Bison parser, made by GNU Bison 3.4.1. */ |
11126 |
- |
11127 |
-/* Bison implementation for Yacc-like parsers in C |
11128 |
- |
11129 |
- Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2019 Free Software Foundation, |
11130 |
- Inc. |
11131 |
- |
11132 |
- This program is free software: you can redistribute it and/or modify |
11133 |
- it under the terms of the GNU General Public License as published by |
11134 |
- the Free Software Foundation, either version 3 of the License, or |
11135 |
- (at your option) any later version. |
11136 |
- |
11137 |
- This program is distributed in the hope that it will be useful, |
11138 |
- but WITHOUT ANY WARRANTY; without even the implied warranty of |
11139 |
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
11140 |
- GNU General Public License for more details. |
11141 |
- |
11142 |
- You should have received a copy of the GNU General Public License |
11143 |
- along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
11144 |
- |
11145 |
-/* As a special exception, you may create a larger work that contains |
11146 |
- part or all of the Bison parser skeleton and distribute that work |
11147 |
- under terms of your choice, so long as that work isn't itself a |
11148 |
- parser generator using the skeleton or a modified version thereof |
11149 |
- as a parser skeleton. Alternatively, if you modify or redistribute |
11150 |
- the parser skeleton itself, you may (at your option) remove this |
11151 |
- special exception, which will cause the skeleton and the resulting |
11152 |
- Bison output files to be licensed under the GNU General Public |
11153 |
- License without this special exception. |
11154 |
- |
11155 |
- This special exception was added by the Free Software Foundation in |
11156 |
- version 2.2 of Bison. */ |
11157 |
- |
11158 |
-/* C LALR(1) parser skeleton written by Richard Stallman, by |
11159 |
- simplifying the original so-called "semantic" parser. */ |
11160 |
- |
11161 |
-/* All symbols defined below should begin with yy or YY, to avoid |
11162 |
- infringing on user name space. This should be done even for local |
11163 |
- variables, as they might otherwise be expanded by user macros. |
11164 |
- There are some unavoidable exceptions within include files to |
11165 |
- define necessary library symbols; they are noted "INFRINGES ON |
11166 |
- USER NAME SPACE" below. */ |
11167 |
- |
11168 |
-/* Undocumented macros, especially those whose name start with YY_, |
11169 |
- are private implementation details. Do not rely on them. */ |
11170 |
- |
11171 |
-/* Identify Bison output. */ |
11172 |
-#define YYBISON 1 |
11173 |
- |
11174 |
-/* Bison version. */ |
11175 |
-#define YYBISON_VERSION "3.4.1" |
11176 |
- |
11177 |
-/* Skeleton name. */ |
11178 |
-#define YYSKELETON_NAME "yacc.c" |
11179 |
- |
11180 |
-/* Pure parsers. */ |
11181 |
-#define YYPURE 1 |
11182 |
- |
11183 |
-/* Push parsers. */ |
11184 |
-#define YYPUSH 0 |
11185 |
- |
11186 |
-/* Pull parsers. */ |
11187 |
-#define YYPULL 1 |
11188 |
- |
11189 |
- |
11190 |
-/* Substitute the variable and function names. */ |
11191 |
-#define yyparse template_parse |
11192 |
-#define yylex template_lex |
11193 |
-#define yyerror template_error |
11194 |
-#define yydebug template_debug |
11195 |
-#define yynerrs template_nerrs |
11196 |
- |
11197 |
- |
11198 |
-/* First part of user prologue. */ |
11199 |
-#line 17 "template_syntax.y" |
11200 |
- |
11201 |
-#include "template_syntax.h" |
11202 |
-#include "template_parser.h" |
11203 |
-#include "NebulaUtil.h" |
11204 |
- |
11205 |
-#define YYERROR_VERBOSE |
11206 |
- |
11207 |
-void template_error( YYLTYPE * llocp, mem_collector * mc, Template * tmpl, |
11208 |
- char ** error_msg, yyscan_t scanner, const char * str); |
11209 |
- |
11210 |
-int template_lex (YYSTYPE *lvalp, YYLTYPE *llocp, mem_collector * mc, |
11211 |
- yyscan_t scanner); |
11212 |
- |
11213 |
-int template_parse(Template * tmpl, char ** errmsg, yyscan_t scanner) |
11214 |
-{ |
11215 |
- mem_collector mc; |
11216 |
- int rc; |
11217 |
- |
11218 |
- mem_collector_init(&mc); |
11219 |
- |
11220 |
- rc = template_parse(&mc, tmpl, errmsg, scanner); |
11221 |
- |
11222 |
- mem_collector_cleanup(&mc); |
11223 |
- |
11224 |
- return rc; |
11225 |
-} |
11226 |
- |
11227 |
-static string& unescape (string &str); |
11228 |
- |
11229 |
-#line 106 "template_syntax.cc" |
11230 |
- |
11231 |
-# ifndef YY_NULLPTR |
11232 |
-# if defined __cplusplus |
11233 |
-# if 201103L <= __cplusplus |
11234 |
-# define YY_NULLPTR nullptr |
11235 |
-# else |
11236 |
-# define YY_NULLPTR 0 |
11237 |
-# endif |
11238 |
-# else |
11239 |
-# define YY_NULLPTR ((void*)0) |
11240 |
-# endif |
11241 |
-# endif |
11242 |
- |
11243 |
-/* Enabling verbose error messages. */ |
11244 |
-#ifdef YYERROR_VERBOSE |
11245 |
-# undef YYERROR_VERBOSE |
11246 |
-# define YYERROR_VERBOSE 1 |
11247 |
-#else |
11248 |
-# define YYERROR_VERBOSE 0 |
11249 |
-#endif |
11250 |
- |
11251 |
-/* Use api.header.include to #include this header |
11252 |
- instead of duplicating it here. */ |
11253 |
-#ifndef YY_TEMPLATE_TEMPLATE_SYNTAX_HH_INCLUDED |
11254 |
-# define YY_TEMPLATE_TEMPLATE_SYNTAX_HH_INCLUDED |
11255 |
-/* Debug traces. */ |
11256 |
-#ifndef YYDEBUG |
11257 |
-# define YYDEBUG 0 |
11258 |
-#endif |
11259 |
-#if YYDEBUG |
11260 |
-extern int template_debug; |
11261 |
-#endif |
11262 |
-/* "%code requires" blocks. */ |
11263 |
-#line 47 "template_syntax.y" |
11264 |
- |
11265 |
-#include <iostream> |
11266 |
-#include <string> |
11267 |
-#include <map> |
11268 |
-#include <algorithm> |
11269 |
- |
11270 |
-#include <ctype.h> |
11271 |
-#include <string.h> |
11272 |
-#include <stdio.h> |
11273 |
- |
11274 |
-#include "mem_collector.h" |
11275 |
- |
11276 |
-#include "Template.h" |
11277 |
- |
11278 |
-typedef void * yyscan_t; |
11279 |
- |
11280 |
-int template_parse(Template * tmpl, char ** errmsg, yyscan_t scanner); |
11281 |
- |
11282 |
-#line 159 "template_syntax.cc" |
11283 |
- |
11284 |
-/* Token type. */ |
11285 |
-#ifndef YYTOKENTYPE |
11286 |
-# define YYTOKENTYPE |
11287 |
- enum yytokentype |
11288 |
- { |
11289 |
- EQUAL = 258, |
11290 |
- COMMA = 259, |
11291 |
- OBRACKET = 260, |
11292 |
- CBRACKET = 261, |
11293 |
- EQUAL_EMPTY = 262, |
11294 |
- CCDATA = 263, |
11295 |
- STRING = 264, |
11296 |
- VARIABLE = 265 |
11297 |
- }; |
11298 |
-#endif |
11299 |
- |
11300 |
-/* Value type. */ |
11301 |
-#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED |
11302 |
-union YYSTYPE |
11303 |
-{ |
11304 |
-#line 74 "template_syntax.y" |
11305 |
- |
11306 |
- char * val_str; |
11307 |
- void * val_attr; |
11308 |
- |
11309 |
-#line 186 "template_syntax.cc" |
11310 |
- |
11311 |
-}; |
11312 |
-typedef union YYSTYPE YYSTYPE; |
11313 |
-# define YYSTYPE_IS_TRIVIAL 1 |
11314 |
-# define YYSTYPE_IS_DECLARED 1 |
11315 |
-#endif |
11316 |
- |
11317 |
-/* Location type. */ |
11318 |
-#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED |
11319 |
-typedef struct YYLTYPE YYLTYPE; |
11320 |
-struct YYLTYPE |
11321 |
-{ |
11322 |
- int first_line; |
11323 |
- int first_column; |
11324 |
- int last_line; |
11325 |
- int last_column; |
11326 |
-}; |
11327 |
-# define YYLTYPE_IS_DECLARED 1 |
11328 |
-# define YYLTYPE_IS_TRIVIAL 1 |
11329 |
-#endif |
11330 |
- |
11331 |
- |
11332 |
- |
11333 |
-int template_parse (mem_collector * mc, Template * tmpl, char ** error_msg, yyscan_t scanner); |
11334 |
- |
11335 |
-#endif /* !YY_TEMPLATE_TEMPLATE_SYNTAX_HH_INCLUDED */ |
11336 |
- |
11337 |
- |
11338 |
- |
11339 |
-#ifdef short |
11340 |
-# undef short |
11341 |
-#endif |
11342 |
- |
11343 |
-#ifdef YYTYPE_UINT8 |
11344 |
-typedef YYTYPE_UINT8 yytype_uint8; |
11345 |
-#else |
11346 |
-typedef unsigned char yytype_uint8; |
11347 |
-#endif |
11348 |
- |
11349 |
-#ifdef YYTYPE_INT8 |
11350 |
-typedef YYTYPE_INT8 yytype_int8; |
11351 |
-#else |
11352 |
-typedef signed char yytype_int8; |
11353 |
-#endif |
11354 |
- |
11355 |
-#ifdef YYTYPE_UINT16 |
11356 |
-typedef YYTYPE_UINT16 yytype_uint16; |
11357 |
-#else |
11358 |
-typedef unsigned short yytype_uint16; |
11359 |
-#endif |
11360 |
- |
11361 |
-#ifdef YYTYPE_INT16 |
11362 |
-typedef YYTYPE_INT16 yytype_int16; |
11363 |
-#else |
11364 |
-typedef short yytype_int16; |
11365 |
-#endif |
11366 |
- |
11367 |
-#ifndef YYSIZE_T |
11368 |
-# ifdef __SIZE_TYPE__ |
11369 |
-# define YYSIZE_T __SIZE_TYPE__ |
11370 |
-# elif defined size_t |
11371 |
-# define YYSIZE_T size_t |
11372 |
-# elif ! defined YYSIZE_T |
11373 |
-# include <stddef.h> /* INFRINGES ON USER NAME SPACE */ |
11374 |
-# define YYSIZE_T size_t |
11375 |
-# else |
11376 |
-# define YYSIZE_T unsigned |
11377 |
-# endif |
11378 |
-#endif |
11379 |
- |
11380 |
-#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) |
11381 |
- |
11382 |
-#ifndef YY_ |
11383 |
-# if defined YYENABLE_NLS && YYENABLE_NLS |
11384 |
-# if ENABLE_NLS |
11385 |
-# include <libintl.h> /* INFRINGES ON USER NAME SPACE */ |
11386 |
-# define YY_(Msgid) dgettext ("bison-runtime", Msgid) |
11387 |
-# endif |
11388 |
-# endif |
11389 |
-# ifndef YY_ |
11390 |
-# define YY_(Msgid) Msgid |
11391 |
-# endif |
11392 |
-#endif |
11393 |
- |
11394 |
-#ifndef YY_ATTRIBUTE |
11395 |
-# if (defined __GNUC__ \ |
11396 |
- && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \ |
11397 |
- || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C |
11398 |
-# define YY_ATTRIBUTE(Spec) __attribute__(Spec) |
11399 |
-# else |
11400 |
-# define YY_ATTRIBUTE(Spec) /* empty */ |
11401 |
-# endif |
11402 |
-#endif |
11403 |
- |
11404 |
-#ifndef YY_ATTRIBUTE_PURE |
11405 |
-# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__)) |
11406 |
-#endif |
11407 |
- |
11408 |
-#ifndef YY_ATTRIBUTE_UNUSED |
11409 |
-# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) |
11410 |
-#endif |
11411 |
- |
11412 |
-/* Suppress unused-variable warnings by "using" E. */ |
11413 |
-#if ! defined lint || defined __GNUC__ |
11414 |
-# define YYUSE(E) ((void) (E)) |
11415 |
-#else |
11416 |
-# define YYUSE(E) /* empty */ |
11417 |
-#endif |
11418 |
- |
11419 |
-#if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ |
11420 |
-/* Suppress an incorrect diagnostic about yylval being uninitialized. */ |
11421 |
-# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ |
11422 |
- _Pragma ("GCC diagnostic push") \ |
11423 |
- _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ |
11424 |
- _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") |
11425 |
-# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ |
11426 |
- _Pragma ("GCC diagnostic pop") |
11427 |
-#else |
11428 |
-# define YY_INITIAL_VALUE(Value) Value |
11429 |
-#endif |
11430 |
-#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
11431 |
-# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
11432 |
-# define YY_IGNORE_MAYBE_UNINITIALIZED_END |
11433 |
-#endif |
11434 |
-#ifndef YY_INITIAL_VALUE |
11435 |
-# define YY_INITIAL_VALUE(Value) /* Nothing. */ |
11436 |
-#endif |
11437 |
- |
11438 |
- |
11439 |
-#define YY_ASSERT(E) ((void) (0 && (E))) |
11440 |
- |
11441 |
-#if ! defined yyoverflow || YYERROR_VERBOSE |
11442 |
- |
11443 |
-/* The parser invokes alloca or malloc; define the necessary symbols. */ |
11444 |
- |
11445 |
-# ifdef YYSTACK_USE_ALLOCA |
11446 |
-# if YYSTACK_USE_ALLOCA |
11447 |
-# ifdef __GNUC__ |
11448 |
-# define YYSTACK_ALLOC __builtin_alloca |
11449 |
-# elif defined __BUILTIN_VA_ARG_INCR |
11450 |
-# include <alloca.h> /* INFRINGES ON USER NAME SPACE */ |
11451 |
-# elif defined _AIX |
11452 |
-# define YYSTACK_ALLOC __alloca |
11453 |
-# elif defined _MSC_VER |
11454 |
-# include <malloc.h> /* INFRINGES ON USER NAME SPACE */ |
11455 |
-# define alloca _alloca |
11456 |
-# else |
11457 |
-# define YYSTACK_ALLOC alloca |
11458 |
-# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS |
11459 |
-# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ |
11460 |
- /* Use EXIT_SUCCESS as a witness for stdlib.h. */ |
11461 |
-# ifndef EXIT_SUCCESS |
11462 |
-# define EXIT_SUCCESS 0 |
11463 |
-# endif |
11464 |
-# endif |
11465 |
-# endif |
11466 |
-# endif |
11467 |
-# endif |
11468 |
- |
11469 |
-# ifdef YYSTACK_ALLOC |
11470 |
- /* Pacify GCC's 'empty if-body' warning. */ |
11471 |
-# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) |
11472 |
-# ifndef YYSTACK_ALLOC_MAXIMUM |
11473 |
- /* The OS might guarantee only one guard page at the bottom of the stack, |
11474 |
- and a page size can be as small as 4096 bytes. So we cannot safely |
11475 |
- invoke alloca (N) if N exceeds 4096. Use a slightly smaller number |
11476 |
- to allow for a few compiler-allocated temporary stack slots. */ |
11477 |
-# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ |
11478 |
-# endif |
11479 |
-# else |
11480 |
-# define YYSTACK_ALLOC YYMALLOC |
11481 |
-# define YYSTACK_FREE YYFREE |
11482 |
-# ifndef YYSTACK_ALLOC_MAXIMUM |
11483 |
-# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM |
11484 |
-# endif |
11485 |
-# if (defined __cplusplus && ! defined EXIT_SUCCESS \ |
11486 |
- && ! ((defined YYMALLOC || defined malloc) \ |
11487 |
- && (defined YYFREE || defined free))) |
11488 |
-# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ |
11489 |
-# ifndef EXIT_SUCCESS |
11490 |
-# define EXIT_SUCCESS 0 |
11491 |
-# endif |
11492 |
-# endif |
11493 |
-# ifndef YYMALLOC |
11494 |
-# define YYMALLOC malloc |
11495 |
-# if ! defined malloc && ! defined EXIT_SUCCESS |
11496 |
-void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ |
11497 |
-# endif |
11498 |
-# endif |
11499 |
-# ifndef YYFREE |
11500 |
-# define YYFREE free |
11501 |
-# if ! defined free && ! defined EXIT_SUCCESS |
11502 |
-void free (void *); /* INFRINGES ON USER NAME SPACE */ |
11503 |
-# endif |
11504 |
-# endif |
11505 |
-# endif |
11506 |
-#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ |
11507 |
- |
11508 |
- |
11509 |
-#if (! defined yyoverflow \ |
11510 |
- && (! defined __cplusplus \ |
11511 |
- || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \ |
11512 |
- && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) |
11513 |
- |
11514 |
-/* A type that is properly aligned for any stack member. */ |
11515 |
-union yyalloc |
11516 |
-{ |
11517 |
- yytype_int16 yyss_alloc; |
11518 |
- YYSTYPE yyvs_alloc; |
11519 |
- YYLTYPE yyls_alloc; |
11520 |
-}; |
11521 |
- |
11522 |
-/* The size of the maximum gap between one aligned stack and the next. */ |
11523 |
-# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) |
11524 |
- |
11525 |
-/* The size of an array large to enough to hold all stacks, each with |
11526 |
- N elements. */ |
11527 |
-# define YYSTACK_BYTES(N) \ |
11528 |
- ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \ |
11529 |
- + 2 * YYSTACK_GAP_MAXIMUM) |
11530 |
- |
11531 |
-# define YYCOPY_NEEDED 1 |
11532 |
- |
11533 |
-/* Relocate STACK from its old location to the new one. The |
11534 |
- local variables YYSIZE and YYSTACKSIZE give the old and new number of |
11535 |
- elements in the stack, and YYPTR gives the new location of the |
11536 |
- stack. Advance YYPTR to a properly aligned location for the next |
11537 |
- stack. */ |
11538 |
-# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ |
11539 |
- do \ |
11540 |
- { \ |
11541 |
- YYSIZE_T yynewbytes; \ |
11542 |
- YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ |
11543 |
- Stack = &yyptr->Stack_alloc; \ |
11544 |
- yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ |
11545 |
- yyptr += yynewbytes / sizeof (*yyptr); \ |
11546 |
- } \ |
11547 |
- while (0) |
11548 |
- |
11549 |
-#endif |
11550 |
- |
11551 |
-#if defined YYCOPY_NEEDED && YYCOPY_NEEDED |
11552 |
-/* Copy COUNT objects from SRC to DST. The source and destination do |
11553 |
- not overlap. */ |
11554 |
-# ifndef YYCOPY |
11555 |
-# if defined __GNUC__ && 1 < __GNUC__ |
11556 |
-# define YYCOPY(Dst, Src, Count) \ |
11557 |
- __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) |
11558 |
-# else |
11559 |
-# define YYCOPY(Dst, Src, Count) \ |
11560 |
- do \ |
11561 |
- { \ |
11562 |
- YYSIZE_T yyi; \ |
11563 |
- for (yyi = 0; yyi < (Count); yyi++) \ |
11564 |
- (Dst)[yyi] = (Src)[yyi]; \ |
11565 |
- } \ |
11566 |
- while (0) |
11567 |
-# endif |
11568 |
-# endif |
11569 |
-#endif /* !YYCOPY_NEEDED */ |
11570 |
- |
11571 |
-/* YYFINAL -- State number of the termination state. */ |
11572 |
-#define YYFINAL 7 |
11573 |
-/* YYLAST -- Last index in YYTABLE. */ |
11574 |
-#define YYLAST 16 |
11575 |
- |
11576 |
-/* YYNTOKENS -- Number of terminals. */ |
11577 |
-#define YYNTOKENS 11 |
11578 |
-/* YYNNTS -- Number of nonterminals. */ |
11579 |
-#define YYNNTS 5 |
11580 |
-/* YYNRULES -- Number of rules. */ |
11581 |
-#define YYNRULES 12 |
11582 |
-/* YYNSTATES -- Number of states. */ |
11583 |
-#define YYNSTATES 22 |
11584 |
- |
11585 |
-#define YYUNDEFTOK 2 |
11586 |
-#define YYMAXUTOK 265 |
11587 |
- |
11588 |
-/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM |
11589 |
- as returned by yylex, with out-of-bounds checking. */ |
11590 |
-#define YYTRANSLATE(YYX) \ |
11591 |
- ((unsigned) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) |
11592 |
- |
11593 |
-/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM |
11594 |
- as returned by yylex. */ |
11595 |
-static const yytype_uint8 yytranslate[] = |
11596 |
-{ |
11597 |
- 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
11598 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
11599 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
11600 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
11601 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
11602 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
11603 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
11604 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
11605 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
11606 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
11607 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
11608 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
11609 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
11610 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
11611 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
11612 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
11613 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
11614 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
11615 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
11616 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
11617 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
11618 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
11619 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
11620 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
11621 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
11622 |
- 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, |
11623 |
- 5, 6, 7, 8, 9, 10 |
11624 |
-}; |
11625 |
- |
11626 |
-#if YYDEBUG |
11627 |
- /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ |
11628 |
-static const yytype_uint8 yyrline[] = |
11629 |
-{ |
11630 |
- 0, 94, 94, 95, 98, 99, 102, 112, 125, 134, |
11631 |
- 144, 150, 163 |
11632 |
-}; |
11633 |
-#endif |
11634 |
- |
11635 |
-#if YYDEBUG || YYERROR_VERBOSE || 0 |
11636 |
-/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. |
11637 |
- First, the terminals, then, starting at YYNTOKENS, nonterminals. */ |
11638 |
-static const char *const yytname[] = |
11639 |
-{ |
11640 |
- "$end", "error", "$undefined", "EQUAL", "COMMA", "OBRACKET", "CBRACKET", |
11641 |
- "EQUAL_EMPTY", "CCDATA", "STRING", "VARIABLE", "$accept", |
11642 |
- "template_file", "template", "attribute", "array_val", YY_NULLPTR |
11643 |
-}; |
11644 |
-#endif |
11645 |
- |
11646 |
-# ifdef YYPRINT |
11647 |
-/* YYTOKNUM[NUM] -- (External) token number corresponding to the |
11648 |
- (internal) symbol number NUM (which must be that of a token). */ |
11649 |
-static const yytype_uint16 yytoknum[] = |
11650 |
-{ |
11651 |
- 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, |
11652 |
- 265 |
11653 |
-}; |
11654 |
-# endif |
11655 |
- |
11656 |
-#define YYPACT_NINF -6 |
11657 |
- |
11658 |
-#define yypact_value_is_default(Yystate) \ |
11659 |
- (!!((Yystate) == (-6))) |
11660 |
- |
11661 |
-#define YYTABLE_NINF -1 |
11662 |
- |
11663 |
-#define yytable_value_is_error(Yytable_value) \ |
11664 |
- 0 |
11665 |
- |
11666 |
- /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing |
11667 |
- STATE-NUM. */ |
11668 |
-static const yytype_int8 yypact[] = |
11669 |
-{ |
11670 |
- 0, -2, 8, 0, -6, -5, -6, -6, -6, -4, |
11671 |
- -6, -6, -6, 9, 3, 2, 4, -6, -6, 10, |
11672 |
- 6, -6 |
11673 |
-}; |
11674 |
- |
11675 |
- /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. |
11676 |
- Performed when YYTABLE does not specify something else to do. Zero |
11677 |
- means the default is an error. */ |
11678 |
-static const yytype_uint8 yydefact[] = |
11679 |
-{ |
11680 |
- 2, 0, 0, 3, 4, 0, 9, 1, 5, 0, |
11681 |
- 10, 6, 8, 0, 0, 0, 0, 7, 11, 0, |
11682 |
- 0, 12 |
11683 |
-}; |
11684 |
- |
11685 |
- /* YYPGOTO[NTERM-NUM]. */ |
11686 |
-static const yytype_int8 yypgoto[] = |
11687 |
-{ |
11688 |
- -6, -6, -6, 13, -6 |
11689 |
-}; |
11690 |
- |
11691 |
- /* YYDEFGOTO[NTERM-NUM]. */ |
11692 |
-static const yytype_int8 yydefgoto[] = |
11693 |
-{ |
11694 |
- -1, 2, 3, 4, 14 |
11695 |
-}; |
11696 |
- |
11697 |
- /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If |
11698 |
- positive, shift that token. If negative, reduce the rule whose |
11699 |
- number is the opposite. If YYTABLE_NINF, syntax error. */ |
11700 |
-static const yytype_uint8 yytable[] = |
11701 |
-{ |
11702 |
- 9, 5, 12, 10, 11, 6, 13, 16, 7, 17, |
11703 |
- 1, 18, 15, 20, 19, 21, 8 |
11704 |
-}; |
11705 |
- |
11706 |
-static const yytype_uint8 yycheck[] = |
11707 |
-{ |
11708 |
- 5, 3, 6, 8, 9, 7, 10, 4, 0, 6, |
11709 |
- 10, 9, 3, 3, 10, 9, 3 |
11710 |
-}; |
11711 |
- |
11712 |
- /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing |
11713 |
- symbol of state STATE-NUM. */ |
11714 |
-static const yytype_uint8 yystos[] = |
11715 |
-{ |
11716 |
- 0, 10, 12, 13, 14, 3, 7, 0, 14, 5, |
11717 |
- 8, 9, 6, 10, 15, 3, 4, 6, 9, 10, |
11718 |
- 3, 9 |
11719 |
-}; |
11720 |
- |
11721 |
- /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ |
11722 |
-static const yytype_uint8 yyr1[] = |
11723 |
-{ |
11724 |
- 0, 11, 12, 12, 13, 13, 14, 14, 14, 14, |
11725 |
- 14, 15, 15 |
11726 |
-}; |
11727 |
- |
11728 |
- /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ |
11729 |
-static const yytype_uint8 yyr2[] = |
11730 |
-{ |
11731 |
- 0, 2, 0, 1, 1, 2, 3, 5, 4, 2, |
11732 |
- 3, 3, 5 |
11733 |
-}; |
11734 |
- |
11735 |
- |
11736 |
-#define yyerrok (yyerrstatus = 0) |
11737 |
-#define yyclearin (yychar = YYEMPTY) |
11738 |
-#define YYEMPTY (-2) |
11739 |
-#define YYEOF 0 |
11740 |
- |
11741 |
-#define YYACCEPT goto yyacceptlab |
11742 |
-#define YYABORT goto yyabortlab |
11743 |
-#define YYERROR goto yyerrorlab |
11744 |
- |
11745 |
- |
11746 |
-#define YYRECOVERING() (!!yyerrstatus) |
11747 |
- |
11748 |
-#define YYBACKUP(Token, Value) \ |
11749 |
- do \ |
11750 |
- if (yychar == YYEMPTY) \ |
11751 |
- { \ |
11752 |
- yychar = (Token); \ |
11753 |
- yylval = (Value); \ |
11754 |
- YYPOPSTACK (yylen); \ |
11755 |
- yystate = *yyssp; \ |
11756 |
- goto yybackup; \ |
11757 |
- } \ |
11758 |
- else \ |
11759 |
- { \ |
11760 |
- yyerror (&yylloc, mc, tmpl, error_msg, scanner, YY_("syntax error: cannot back up")); \ |
11761 |
- YYERROR; \ |
11762 |
- } \ |
11763 |
- while (0) |
11764 |
- |
11765 |
-/* Error token number */ |
11766 |
-#define YYTERROR 1 |
11767 |
-#define YYERRCODE 256 |
11768 |
- |
11769 |
- |
11770 |
-/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. |
11771 |
- If N is 0, then set CURRENT to the empty location which ends |
11772 |
- the previous symbol: RHS[0] (always defined). */ |
11773 |
- |
11774 |
-#ifndef YYLLOC_DEFAULT |
11775 |
-# define YYLLOC_DEFAULT(Current, Rhs, N) \ |
11776 |
- do \ |
11777 |
- if (N) \ |
11778 |
- { \ |
11779 |
- (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ |
11780 |
- (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ |
11781 |
- (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ |
11782 |
- (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ |
11783 |
- } \ |
11784 |
- else \ |
11785 |
- { \ |
11786 |
- (Current).first_line = (Current).last_line = \ |
11787 |
- YYRHSLOC (Rhs, 0).last_line; \ |
11788 |
- (Current).first_column = (Current).last_column = \ |
11789 |
- YYRHSLOC (Rhs, 0).last_column; \ |
11790 |
- } \ |
11791 |
- while (0) |
11792 |
-#endif |
11793 |
- |
11794 |
-#define YYRHSLOC(Rhs, K) ((Rhs)[K]) |
11795 |
- |
11796 |
- |
11797 |
-/* Enable debugging if requested. */ |
11798 |
-#if YYDEBUG |
11799 |
- |
11800 |
-# ifndef YYFPRINTF |
11801 |
-# include <stdio.h> /* INFRINGES ON USER NAME SPACE */ |
11802 |
-# define YYFPRINTF fprintf |
11803 |
-# endif |
11804 |
- |
11805 |
-# define YYDPRINTF(Args) \ |
11806 |
-do { \ |
11807 |
- if (yydebug) \ |
11808 |
- YYFPRINTF Args; \ |
11809 |
-} while (0) |
11810 |
- |
11811 |
- |
11812 |
-/* YY_LOCATION_PRINT -- Print the location on the stream. |
11813 |
- This macro was not mandated originally: define only if we know |
11814 |
- we won't break user code: when these are the locations we know. */ |
11815 |
- |
11816 |
-#ifndef YY_LOCATION_PRINT |
11817 |
-# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL |
11818 |
- |
11819 |
-/* Print *YYLOCP on YYO. Private, do not rely on its existence. */ |
11820 |
- |
11821 |
-YY_ATTRIBUTE_UNUSED |
11822 |
-static int |
11823 |
-yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp) |
11824 |
-{ |
11825 |
- int res = 0; |
11826 |
- int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0; |
11827 |
- if (0 <= yylocp->first_line) |
11828 |
- { |
11829 |
- res += YYFPRINTF (yyo, "%d", yylocp->first_line); |
11830 |
- if (0 <= yylocp->first_column) |
11831 |
- res += YYFPRINTF (yyo, ".%d", yylocp->first_column); |
11832 |
- } |
11833 |
- if (0 <= yylocp->last_line) |
11834 |
- { |
11835 |
- if (yylocp->first_line < yylocp->last_line) |
11836 |
- { |
11837 |
- res += YYFPRINTF (yyo, "-%d", yylocp->last_line); |
11838 |
- if (0 <= end_col) |
11839 |
- res += YYFPRINTF (yyo, ".%d", end_col); |
11840 |
- } |
11841 |
- else if (0 <= end_col && yylocp->first_column < end_col) |
11842 |
- res += YYFPRINTF (yyo, "-%d", end_col); |
11843 |
- } |
11844 |
- return res; |
11845 |
- } |
11846 |
- |
11847 |
-# define YY_LOCATION_PRINT(File, Loc) \ |
11848 |
- yy_location_print_ (File, &(Loc)) |
11849 |
- |
11850 |
-# else |
11851 |
-# define YY_LOCATION_PRINT(File, Loc) ((void) 0) |
11852 |
-# endif |
11853 |
-#endif |
11854 |
- |
11855 |
- |
11856 |
-# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ |
11857 |
-do { \ |
11858 |
- if (yydebug) \ |
11859 |
- { \ |
11860 |
- YYFPRINTF (stderr, "%s ", Title); \ |
11861 |
- yy_symbol_print (stderr, \ |
11862 |
- Type, Value, Location, mc, tmpl, error_msg, scanner); \ |
11863 |
- YYFPRINTF (stderr, "\n"); \ |
11864 |
- } \ |
11865 |
-} while (0) |
11866 |
- |
11867 |
- |
11868 |
-/*-----------------------------------. |
11869 |
-| Print this symbol's value on YYO. | |
11870 |
-`-----------------------------------*/ |
11871 |
- |
11872 |
-static void |
11873 |
-yy_symbol_value_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, mem_collector * mc, Template * tmpl, char ** error_msg, yyscan_t scanner) |
11874 |
-{ |
11875 |
- FILE *yyoutput = yyo; |
11876 |
- YYUSE (yyoutput); |
11877 |
- YYUSE (yylocationp); |
11878 |
- YYUSE (mc); |
11879 |
- YYUSE (tmpl); |
11880 |
- YYUSE (error_msg); |
11881 |
- YYUSE (scanner); |
11882 |
- if (!yyvaluep) |
11883 |
- return; |
11884 |
-# ifdef YYPRINT |
11885 |
- if (yytype < YYNTOKENS) |
11886 |
- YYPRINT (yyo, yytoknum[yytype], *yyvaluep); |
11887 |
-# endif |
11888 |
- YYUSE (yytype); |
11889 |
-} |
11890 |
- |
11891 |
- |
11892 |
-/*---------------------------. |
11893 |
-| Print this symbol on YYO. | |
11894 |
-`---------------------------*/ |
11895 |
- |
11896 |
-static void |
11897 |
-yy_symbol_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, mem_collector * mc, Template * tmpl, char ** error_msg, yyscan_t scanner) |
11898 |
-{ |
11899 |
- YYFPRINTF (yyo, "%s %s (", |
11900 |
- yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); |
11901 |
- |
11902 |
- YY_LOCATION_PRINT (yyo, *yylocationp); |
11903 |
- YYFPRINTF (yyo, ": "); |
11904 |
- yy_symbol_value_print (yyo, yytype, yyvaluep, yylocationp, mc, tmpl, error_msg, scanner); |
11905 |
- YYFPRINTF (yyo, ")"); |
11906 |
-} |
11907 |
- |
11908 |
-/*------------------------------------------------------------------. |
11909 |
-| yy_stack_print -- Print the state stack from its BOTTOM up to its | |
11910 |
-| TOP (included). | |
11911 |
-`------------------------------------------------------------------*/ |
11912 |
- |
11913 |
-static void |
11914 |
-yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) |
11915 |
-{ |
11916 |
- YYFPRINTF (stderr, "Stack now"); |
11917 |
- for (; yybottom <= yytop; yybottom++) |
11918 |
- { |
11919 |
- int yybot = *yybottom; |
11920 |
- YYFPRINTF (stderr, " %d", yybot); |
11921 |
- } |
11922 |
- YYFPRINTF (stderr, "\n"); |
11923 |
-} |
11924 |
- |
11925 |
-# define YY_STACK_PRINT(Bottom, Top) \ |
11926 |
-do { \ |
11927 |
- if (yydebug) \ |
11928 |
- yy_stack_print ((Bottom), (Top)); \ |
11929 |
-} while (0) |
11930 |
- |
11931 |
- |
11932 |
-/*------------------------------------------------. |
11933 |
-| Report that the YYRULE is going to be reduced. | |
11934 |
-`------------------------------------------------*/ |
11935 |
- |
11936 |
-static void |
11937 |
-yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, mem_collector * mc, Template * tmpl, char ** error_msg, yyscan_t scanner) |
11938 |
-{ |
11939 |
- unsigned long yylno = yyrline[yyrule]; |
11940 |
- int yynrhs = yyr2[yyrule]; |
11941 |
- int yyi; |
11942 |
- YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", |
11943 |
- yyrule - 1, yylno); |
11944 |
- /* The symbols being reduced. */ |
11945 |
- for (yyi = 0; yyi < yynrhs; yyi++) |
11946 |
- { |
11947 |
- YYFPRINTF (stderr, " $%d = ", yyi + 1); |
11948 |
- yy_symbol_print (stderr, |
11949 |
- yystos[yyssp[yyi + 1 - yynrhs]], |
11950 |
- &yyvsp[(yyi + 1) - (yynrhs)] |
11951 |
- , &(yylsp[(yyi + 1) - (yynrhs)]) , mc, tmpl, error_msg, scanner); |
11952 |
- YYFPRINTF (stderr, "\n"); |
11953 |
- } |
11954 |
-} |
11955 |
- |
11956 |
-# define YY_REDUCE_PRINT(Rule) \ |
11957 |
-do { \ |
11958 |
- if (yydebug) \ |
11959 |
- yy_reduce_print (yyssp, yyvsp, yylsp, Rule, mc, tmpl, error_msg, scanner); \ |
11960 |
-} while (0) |
11961 |
- |
11962 |
-/* Nonzero means print parse trace. It is left uninitialized so that |
11963 |
- multiple parsers can coexist. */ |
11964 |
-int yydebug; |
11965 |
-#else /* !YYDEBUG */ |
11966 |
-# define YYDPRINTF(Args) |
11967 |
-# define YY_SYMBOL_PRINT(Title, Type, Value, Location) |
11968 |
-# define YY_STACK_PRINT(Bottom, Top) |
11969 |
-# define YY_REDUCE_PRINT(Rule) |
11970 |
-#endif /* !YYDEBUG */ |
11971 |
- |
11972 |
- |
11973 |
-/* YYINITDEPTH -- initial size of the parser's stacks. */ |
11974 |
-#ifndef YYINITDEPTH |
11975 |
-# define YYINITDEPTH 200 |
11976 |
-#endif |
11977 |
- |
11978 |
-/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only |
11979 |
- if the built-in stack extension method is used). |
11980 |
- |
11981 |
- Do not make this value too large; the results are undefined if |
11982 |
- YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) |
11983 |
- evaluated with infinite-precision integer arithmetic. */ |
11984 |
- |
11985 |
-#ifndef YYMAXDEPTH |
11986 |
-# define YYMAXDEPTH 10000 |
11987 |
-#endif |
11988 |
- |
11989 |
- |
11990 |
-#if YYERROR_VERBOSE |
11991 |
- |
11992 |
-# ifndef yystrlen |
11993 |
-# if defined __GLIBC__ && defined _STRING_H |
11994 |
-# define yystrlen strlen |
11995 |
-# else |
11996 |
-/* Return the length of YYSTR. */ |
11997 |
-static YYSIZE_T |
11998 |
-yystrlen (const char *yystr) |
11999 |
-{ |
12000 |
- YYSIZE_T yylen; |
12001 |
- for (yylen = 0; yystr[yylen]; yylen++) |
12002 |
- continue; |
12003 |
- return yylen; |
12004 |
-} |
12005 |
-# endif |
12006 |
-# endif |
12007 |
- |
12008 |
-# ifndef yystpcpy |
12009 |
-# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE |
12010 |
-# define yystpcpy stpcpy |
12011 |
-# else |
12012 |
-/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in |
12013 |
- YYDEST. */ |
12014 |
-static char * |
12015 |
-yystpcpy (char *yydest, const char *yysrc) |
12016 |
-{ |
12017 |
- char *yyd = yydest; |
12018 |
- const char *yys = yysrc; |
12019 |
- |
12020 |
- while ((*yyd++ = *yys++) != '\0') |
12021 |
- continue; |
12022 |
- |
12023 |
- return yyd - 1; |
12024 |
-} |
12025 |
-# endif |
12026 |
-# endif |
12027 |
- |
12028 |
-# ifndef yytnamerr |
12029 |
-/* Copy to YYRES the contents of YYSTR after stripping away unnecessary |
12030 |
- quotes and backslashes, so that it's suitable for yyerror. The |
12031 |
- heuristic is that double-quoting is unnecessary unless the string |
12032 |
- contains an apostrophe, a comma, or backslash (other than |
12033 |
- backslash-backslash). YYSTR is taken from yytname. If YYRES is |
12034 |
- null, do not copy; instead, return the length of what the result |
12035 |
- would have been. */ |
12036 |
-static YYSIZE_T |
12037 |
-yytnamerr (char *yyres, const char *yystr) |
12038 |
-{ |
12039 |
- if (*yystr == '"') |
12040 |
- { |
12041 |
- YYSIZE_T yyn = 0; |
12042 |
- char const *yyp = yystr; |
12043 |
- |
12044 |
- for (;;) |
12045 |
- switch (*++yyp) |
12046 |
- { |
12047 |
- case '\'': |
12048 |
- case ',': |
12049 |
- goto do_not_strip_quotes; |
12050 |
- |
12051 |
- case '\\': |
12052 |
- if (*++yyp != '\\') |
12053 |
- goto do_not_strip_quotes; |
12054 |
- else |
12055 |
- goto append; |
12056 |
- |
12057 |
- append: |
12058 |
- default: |
12059 |
- if (yyres) |
12060 |
- yyres[yyn] = *yyp; |
12061 |
- yyn++; |
12062 |
- break; |
12063 |
- |
12064 |
- case '"': |
12065 |
- if (yyres) |
12066 |
- yyres[yyn] = '\0'; |
12067 |
- return yyn; |
12068 |
- } |
12069 |
- do_not_strip_quotes: ; |
12070 |
- } |
12071 |
- |
12072 |
- if (! yyres) |
12073 |
- return yystrlen (yystr); |
12074 |
- |
12075 |
- return (YYSIZE_T) (yystpcpy (yyres, yystr) - yyres); |
12076 |
-} |
12077 |
-# endif |
12078 |
- |
12079 |
-/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message |
12080 |
- about the unexpected token YYTOKEN for the state stack whose top is |
12081 |
- YYSSP. |
12082 |
- |
12083 |
- Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is |
12084 |
- not large enough to hold the message. In that case, also set |
12085 |
- *YYMSG_ALLOC to the required number of bytes. Return 2 if the |
12086 |
- required number of bytes is too large to store. */ |
12087 |
-static int |
12088 |
-yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, |
12089 |
- yytype_int16 *yyssp, int yytoken) |
12090 |
-{ |
12091 |
- YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]); |
12092 |
- YYSIZE_T yysize = yysize0; |
12093 |
- enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; |
12094 |
- /* Internationalized format string. */ |
12095 |
- const char *yyformat = YY_NULLPTR; |
12096 |
- /* Arguments of yyformat. */ |
12097 |
- char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; |
12098 |
- /* Number of reported tokens (one for the "unexpected", one per |
12099 |
- "expected"). */ |
12100 |
- int yycount = 0; |
12101 |
- |
12102 |
- /* There are many possibilities here to consider: |
12103 |
- - If this state is a consistent state with a default action, then |
12104 |
- the only way this function was invoked is if the default action |
12105 |
- is an error action. In that case, don't check for expected |
12106 |
- tokens because there are none. |
12107 |
- - The only way there can be no lookahead present (in yychar) is if |
12108 |
- this state is a consistent state with a default action. Thus, |
12109 |
- detecting the absence of a lookahead is sufficient to determine |
12110 |
- that there is no unexpected or expected token to report. In that |
12111 |
- case, just report a simple "syntax error". |
12112 |
- - Don't assume there isn't a lookahead just because this state is a |
12113 |
- consistent state with a default action. There might have been a |
12114 |
- previous inconsistent state, consistent state with a non-default |
12115 |
- action, or user semantic action that manipulated yychar. |
12116 |
- - Of course, the expected token list depends on states to have |
12117 |
- correct lookahead information, and it depends on the parser not |
12118 |
- to perform extra reductions after fetching a lookahead from the |
12119 |
- scanner and before detecting a syntax error. Thus, state merging |
12120 |
- (from LALR or IELR) and default reductions corrupt the expected |
12121 |
- token list. However, the list is correct for canonical LR with |
12122 |
- one exception: it will still contain any token that will not be |
12123 |
- accepted due to an error action in a later state. |
12124 |
- */ |
12125 |
- if (yytoken != YYEMPTY) |
12126 |
- { |
12127 |
- int yyn = yypact[*yyssp]; |
12128 |
- yyarg[yycount++] = yytname[yytoken]; |
12129 |
- if (!yypact_value_is_default (yyn)) |
12130 |
- { |
12131 |
- /* Start YYX at -YYN if negative to avoid negative indexes in |
12132 |
- YYCHECK. In other words, skip the first -YYN actions for |
12133 |
- this state because they are default actions. */ |
12134 |
- int yyxbegin = yyn < 0 ? -yyn : 0; |
12135 |
- /* Stay within bounds of both yycheck and yytname. */ |
12136 |
- int yychecklim = YYLAST - yyn + 1; |
12137 |
- int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; |
12138 |
- int yyx; |
12139 |
- |
12140 |
- for (yyx = yyxbegin; yyx < yyxend; ++yyx) |
12141 |
- if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR |
12142 |
- && !yytable_value_is_error (yytable[yyx + yyn])) |
12143 |
- { |
12144 |
- if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) |
12145 |
- { |
12146 |
- yycount = 1; |
12147 |
- yysize = yysize0; |
12148 |
- break; |
12149 |
- } |
12150 |
- yyarg[yycount++] = yytname[yyx]; |
12151 |
- { |
12152 |
- YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]); |
12153 |
- if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) |
12154 |
- yysize = yysize1; |
12155 |
- else |
12156 |
- return 2; |
12157 |
- } |
12158 |
- } |
12159 |
- } |
12160 |
- } |
12161 |
- |
12162 |
- switch (yycount) |
12163 |
- { |
12164 |
-# define YYCASE_(N, S) \ |
12165 |
- case N: \ |
12166 |
- yyformat = S; \ |
12167 |
- break |
12168 |
- default: /* Avoid compiler warnings. */ |
12169 |
- YYCASE_(0, YY_("syntax error")); |
12170 |
- YYCASE_(1, YY_("syntax error, unexpected %s")); |
12171 |
- YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); |
12172 |
- YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); |
12173 |
- YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); |
12174 |
- YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); |
12175 |
-# undef YYCASE_ |
12176 |
- } |
12177 |
- |
12178 |
- { |
12179 |
- YYSIZE_T yysize1 = yysize + yystrlen (yyformat); |
12180 |
- if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) |
12181 |
- yysize = yysize1; |
12182 |
- else |
12183 |
- return 2; |
12184 |
- } |
12185 |
- |
12186 |
- if (*yymsg_alloc < yysize) |
12187 |
- { |
12188 |
- *yymsg_alloc = 2 * yysize; |
12189 |
- if (! (yysize <= *yymsg_alloc |
12190 |
- && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) |
12191 |
- *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; |
12192 |
- return 1; |
12193 |
- } |
12194 |
- |
12195 |
- /* Avoid sprintf, as that infringes on the user's name space. |
12196 |
- Don't have undefined behavior even if the translation |
12197 |
- produced a string with the wrong number of "%s"s. */ |
12198 |
- { |
12199 |
- char *yyp = *yymsg; |
12200 |
- int yyi = 0; |
12201 |
- while ((*yyp = *yyformat) != '\0') |
12202 |
- if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) |
12203 |
- { |
12204 |
- yyp += yytnamerr (yyp, yyarg[yyi++]); |
12205 |
- yyformat += 2; |
12206 |
- } |
12207 |
- else |
12208 |
- { |
12209 |
- yyp++; |
12210 |
- yyformat++; |
12211 |
- } |
12212 |
- } |
12213 |
- return 0; |
12214 |
-} |
12215 |
-#endif /* YYERROR_VERBOSE */ |
12216 |
- |
12217 |
-/*-----------------------------------------------. |
12218 |
-| Release the memory associated to this symbol. | |
12219 |
-`-----------------------------------------------*/ |
12220 |
- |
12221 |
-static void |
12222 |
-yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, mem_collector * mc, Template * tmpl, char ** error_msg, yyscan_t scanner) |
12223 |
-{ |
12224 |
- YYUSE (yyvaluep); |
12225 |
- YYUSE (yylocationp); |
12226 |
- YYUSE (mc); |
12227 |
- YYUSE (tmpl); |
12228 |
- YYUSE (error_msg); |
12229 |
- YYUSE (scanner); |
12230 |
- if (!yymsg) |
12231 |
- yymsg = "Deleting"; |
12232 |
- YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); |
12233 |
- |
12234 |
- YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
12235 |
- YYUSE (yytype); |
12236 |
- YY_IGNORE_MAYBE_UNINITIALIZED_END |
12237 |
-} |
12238 |
- |
12239 |
- |
12240 |
- |
12241 |
- |
12242 |
-/*----------. |
12243 |
-| yyparse. | |
12244 |
-`----------*/ |
12245 |
- |
12246 |
-int |
12247 |
-yyparse (mem_collector * mc, Template * tmpl, char ** error_msg, yyscan_t scanner) |
12248 |
-{ |
12249 |
-/* The lookahead symbol. */ |
12250 |
-int yychar; |
12251 |
- |
12252 |
- |
12253 |
-/* The semantic value of the lookahead symbol. */ |
12254 |
-/* Default value used for initialization, for pacifying older GCCs |
12255 |
- or non-GCC compilers. */ |
12256 |
-YY_INITIAL_VALUE (static YYSTYPE yyval_default;) |
12257 |
-YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); |
12258 |
- |
12259 |
-/* Location data for the lookahead symbol. */ |
12260 |
-static YYLTYPE yyloc_default |
12261 |
-# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL |
12262 |
- = { 1, 1, 1, 1 } |
12263 |
-# endif |
12264 |
-; |
12265 |
-YYLTYPE yylloc = yyloc_default; |
12266 |
- |
12267 |
- /* Number of syntax errors so far. */ |
12268 |
- int yynerrs; |
12269 |
- |
12270 |
- int yystate; |
12271 |
- /* Number of tokens to shift before error messages enabled. */ |
12272 |
- int yyerrstatus; |
12273 |
- |
12274 |
- /* The stacks and their tools: |
12275 |
- 'yyss': related to states. |
12276 |
- 'yyvs': related to semantic values. |
12277 |
- 'yyls': related to locations. |
12278 |
- |
12279 |
- Refer to the stacks through separate pointers, to allow yyoverflow |
12280 |
- to reallocate them elsewhere. */ |
12281 |
- |
12282 |
- /* The state stack. */ |
12283 |
- yytype_int16 yyssa[YYINITDEPTH]; |
12284 |
- yytype_int16 *yyss; |
12285 |
- yytype_int16 *yyssp; |
12286 |
- |
12287 |
- /* The semantic value stack. */ |
12288 |
- YYSTYPE yyvsa[YYINITDEPTH]; |
12289 |
- YYSTYPE *yyvs; |
12290 |
- YYSTYPE *yyvsp; |
12291 |
- |
12292 |
- /* The location stack. */ |
12293 |
- YYLTYPE yylsa[YYINITDEPTH]; |
12294 |
- YYLTYPE *yyls; |
12295 |
- YYLTYPE *yylsp; |
12296 |
- |
12297 |
- /* The locations where the error started and ended. */ |
12298 |
- YYLTYPE yyerror_range[3]; |
12299 |
- |
12300 |
- YYSIZE_T yystacksize; |
12301 |
- |
12302 |
- int yyn; |
12303 |
- int yyresult; |
12304 |
- /* Lookahead token as an internal (translated) token number. */ |
12305 |
- int yytoken = 0; |
12306 |
- /* The variables used to return semantic value and location from the |
12307 |
- action routines. */ |
12308 |
- YYSTYPE yyval; |
12309 |
- YYLTYPE yyloc; |
12310 |
- |
12311 |
-#if YYERROR_VERBOSE |
12312 |
- /* Buffer for error messages, and its allocated size. */ |
12313 |
- char yymsgbuf[128]; |
12314 |
- char *yymsg = yymsgbuf; |
12315 |
- YYSIZE_T yymsg_alloc = sizeof yymsgbuf; |
12316 |
-#endif |
12317 |
- |
12318 |
-#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) |
12319 |
- |
12320 |
- /* The number of symbols on the RHS of the reduced rule. |
12321 |
- Keep to zero when no symbol should be popped. */ |
12322 |
- int yylen = 0; |
12323 |
- |
12324 |
- yyssp = yyss = yyssa; |
12325 |
- yyvsp = yyvs = yyvsa; |
12326 |
- yylsp = yyls = yylsa; |
12327 |
- yystacksize = YYINITDEPTH; |
12328 |
- |
12329 |
- YYDPRINTF ((stderr, "Starting parse\n")); |
12330 |
- |
12331 |
- yystate = 0; |
12332 |
- yyerrstatus = 0; |
12333 |
- yynerrs = 0; |
12334 |
- yychar = YYEMPTY; /* Cause a token to be read. */ |
12335 |
- yylsp[0] = yylloc; |
12336 |
- goto yysetstate; |
12337 |
- |
12338 |
- |
12339 |
-/*------------------------------------------------------------. |
12340 |
-| yynewstate -- push a new state, which is found in yystate. | |
12341 |
-`------------------------------------------------------------*/ |
12342 |
-yynewstate: |
12343 |
- /* In all cases, when you get here, the value and location stacks |
12344 |
- have just been pushed. So pushing a state here evens the stacks. */ |
12345 |
- yyssp++; |
12346 |
- |
12347 |
- |
12348 |
-/*--------------------------------------------------------------------. |
12349 |
-| yynewstate -- set current state (the top of the stack) to yystate. | |
12350 |
-`--------------------------------------------------------------------*/ |
12351 |
-yysetstate: |
12352 |
- YYDPRINTF ((stderr, "Entering state %d\n", yystate)); |
12353 |
- YY_ASSERT (0 <= yystate && yystate < YYNSTATES); |
12354 |
- *yyssp = (yytype_int16) yystate; |
12355 |
- |
12356 |
- if (yyss + yystacksize - 1 <= yyssp) |
12357 |
-#if !defined yyoverflow && !defined YYSTACK_RELOCATE |
12358 |
- goto yyexhaustedlab; |
12359 |
-#else |
12360 |
- { |
12361 |
- /* Get the current used size of the three stacks, in elements. */ |
12362 |
- YYSIZE_T yysize = (YYSIZE_T) (yyssp - yyss + 1); |
12363 |
- |
12364 |
-# if defined yyoverflow |
12365 |
- { |
12366 |
- /* Give user a chance to reallocate the stack. Use copies of |
12367 |
- these so that the &'s don't force the real ones into |
12368 |
- memory. */ |
12369 |
- YYSTYPE *yyvs1 = yyvs; |
12370 |
- yytype_int16 *yyss1 = yyss; |
12371 |
- YYLTYPE *yyls1 = yyls; |
12372 |
- |
12373 |
- /* Each stack pointer address is followed by the size of the |
12374 |
- data in use in that stack, in bytes. This used to be a |
12375 |
- conditional around just the two extra args, but that might |
12376 |
- be undefined if yyoverflow is a macro. */ |
12377 |
- yyoverflow (YY_("memory exhausted"), |
12378 |
- &yyss1, yysize * sizeof (*yyssp), |
12379 |
- &yyvs1, yysize * sizeof (*yyvsp), |
12380 |
- &yyls1, yysize * sizeof (*yylsp), |
12381 |
- &yystacksize); |
12382 |
- yyss = yyss1; |
12383 |
- yyvs = yyvs1; |
12384 |
- yyls = yyls1; |
12385 |
- } |
12386 |
-# else /* defined YYSTACK_RELOCATE */ |
12387 |
- /* Extend the stack our own way. */ |
12388 |
- if (YYMAXDEPTH <= yystacksize) |
12389 |
- goto yyexhaustedlab; |
12390 |
- yystacksize *= 2; |
12391 |
- if (YYMAXDEPTH < yystacksize) |
12392 |
- yystacksize = YYMAXDEPTH; |
12393 |
- |
12394 |
- { |
12395 |
- yytype_int16 *yyss1 = yyss; |
12396 |
- union yyalloc *yyptr = |
12397 |
- (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); |
12398 |
- if (! yyptr) |
12399 |
- goto yyexhaustedlab; |
12400 |
- YYSTACK_RELOCATE (yyss_alloc, yyss); |
12401 |
- YYSTACK_RELOCATE (yyvs_alloc, yyvs); |
12402 |
- YYSTACK_RELOCATE (yyls_alloc, yyls); |
12403 |
-# undef YYSTACK_RELOCATE |
12404 |
- if (yyss1 != yyssa) |
12405 |
- YYSTACK_FREE (yyss1); |
12406 |
- } |
12407 |
-# endif |
12408 |
- |
12409 |
- yyssp = yyss + yysize - 1; |
12410 |
- yyvsp = yyvs + yysize - 1; |
12411 |
- yylsp = yyls + yysize - 1; |
12412 |
- |
12413 |
- YYDPRINTF ((stderr, "Stack size increased to %lu\n", |
12414 |
- (unsigned long) yystacksize)); |
12415 |
- |
12416 |
- if (yyss + yystacksize - 1 <= yyssp) |
12417 |
- YYABORT; |
12418 |
- } |
12419 |
-#endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */ |
12420 |
- |
12421 |
- if (yystate == YYFINAL) |
12422 |
- YYACCEPT; |
12423 |
- |
12424 |
- goto yybackup; |
12425 |
- |
12426 |
- |
12427 |
-/*-----------. |
12428 |
-| yybackup. | |
12429 |
-`-----------*/ |
12430 |
-yybackup: |
12431 |
- /* Do appropriate processing given the current state. Read a |
12432 |
- lookahead token if we need one and don't already have one. */ |
12433 |
- |
12434 |
- /* First try to decide what to do without reference to lookahead token. */ |
12435 |
- yyn = yypact[yystate]; |
12436 |
- if (yypact_value_is_default (yyn)) |
12437 |
- goto yydefault; |
12438 |
- |
12439 |
- /* Not known => get a lookahead token if don't already have one. */ |
12440 |
- |
12441 |
- /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ |
12442 |
- if (yychar == YYEMPTY) |
12443 |
- { |
12444 |
- YYDPRINTF ((stderr, "Reading a token: ")); |
12445 |
- yychar = yylex (&yylval, &yylloc, mc, scanner); |
12446 |
- } |
12447 |
- |
12448 |
- if (yychar <= YYEOF) |
12449 |
- { |
12450 |
- yychar = yytoken = YYEOF; |
12451 |
- YYDPRINTF ((stderr, "Now at end of input.\n")); |
12452 |
- } |
12453 |
- else |
12454 |
- { |
12455 |
- yytoken = YYTRANSLATE (yychar); |
12456 |
- YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); |
12457 |
- } |
12458 |
- |
12459 |
- /* If the proper action on seeing token YYTOKEN is to reduce or to |
12460 |
- detect an error, take that action. */ |
12461 |
- yyn += yytoken; |
12462 |
- if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) |
12463 |
- goto yydefault; |
12464 |
- yyn = yytable[yyn]; |
12465 |
- if (yyn <= 0) |
12466 |
- { |
12467 |
- if (yytable_value_is_error (yyn)) |
12468 |
- goto yyerrlab; |
12469 |
- yyn = -yyn; |
12470 |
- goto yyreduce; |
12471 |
- } |
12472 |
- |
12473 |
- /* Count tokens shifted since error; after three, turn off error |
12474 |
- status. */ |
12475 |
- if (yyerrstatus) |
12476 |
- yyerrstatus--; |
12477 |
- |
12478 |
- /* Shift the lookahead token. */ |
12479 |
- YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); |
12480 |
- |
12481 |
- /* Discard the shifted token. */ |
12482 |
- yychar = YYEMPTY; |
12483 |
- |
12484 |
- yystate = yyn; |
12485 |
- YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
12486 |
- *++yyvsp = yylval; |
12487 |
- YY_IGNORE_MAYBE_UNINITIALIZED_END |
12488 |
- *++yylsp = yylloc; |
12489 |
- goto yynewstate; |
12490 |
- |
12491 |
- |
12492 |
-/*-----------------------------------------------------------. |
12493 |
-| yydefault -- do the default action for the current state. | |
12494 |
-`-----------------------------------------------------------*/ |
12495 |
-yydefault: |
12496 |
- yyn = yydefact[yystate]; |
12497 |
- if (yyn == 0) |
12498 |
- goto yyerrlab; |
12499 |
- goto yyreduce; |
12500 |
- |
12501 |
- |
12502 |
-/*-----------------------------. |
12503 |
-| yyreduce -- do a reduction. | |
12504 |
-`-----------------------------*/ |
12505 |
-yyreduce: |
12506 |
- /* yyn is the number of a rule to reduce with. */ |
12507 |
- yylen = yyr2[yyn]; |
12508 |
- |
12509 |
- /* If YYLEN is nonzero, implement the default value of the action: |
12510 |
- '$$ = $1'. |
12511 |
- |
12512 |
- Otherwise, the following line sets YYVAL to garbage. |
12513 |
- This behavior is undocumented and Bison |
12514 |
- users should not rely upon it. Assigning to YYVAL |
12515 |
- unconditionally makes the parser a bit smaller, and it avoids a |
12516 |
- GCC warning that YYVAL may be used uninitialized. */ |
12517 |
- yyval = yyvsp[1-yylen]; |
12518 |
- |
12519 |
- /* Default location. */ |
12520 |
- YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen); |
12521 |
- yyerror_range[1] = yyloc; |
12522 |
- YY_REDUCE_PRINT (yyn); |
12523 |
- switch (yyn) |
12524 |
- { |
12525 |
- case 6: |
12526 |
-#line 103 "template_syntax.y" |
12527 |
- { |
12528 |
- Attribute * pattr; |
12529 |
- string name((yyvsp[-2].val_str)); |
12530 |
- string value((yyvsp[0].val_str)); |
12531 |
- |
12532 |
- pattr = new SingleAttribute(name,unescape(value)); |
12533 |
- |
12534 |
- tmpl->set(pattr); |
12535 |
- } |
12536 |
-#line 1413 "template_syntax.cc" |
12537 |
- break; |
12538 |
- |
12539 |
- case 7: |
12540 |
-#line 113 "template_syntax.y" |
12541 |
- { |
12542 |
- Attribute * pattr; |
12543 |
- string name((yyvsp[-4].val_str)); |
12544 |
- map<string,string> * amap; |
12545 |
- |
12546 |
- amap = static_cast<map<string,string> *>((yyvsp[-1].val_attr)); |
12547 |
- pattr = new VectorAttribute(name,*amap); |
12548 |
- |
12549 |
- tmpl->set(pattr); |
12550 |
- |
12551 |
- delete amap; |
12552 |
- } |
12553 |
-#line 1430 "template_syntax.cc" |
12554 |
- break; |
12555 |
- |
12556 |
- case 8: |
12557 |
-#line 126 "template_syntax.y" |
12558 |
- { |
12559 |
- Attribute * pattr; |
12560 |
- string name((yyvsp[-3].val_str)); |
12561 |
- |
12562 |
- pattr = new VectorAttribute(name); |
12563 |
- |
12564 |
- tmpl->set(pattr); |
12565 |
- } |
12566 |
-#line 1443 "template_syntax.cc" |
12567 |
- break; |
12568 |
- |
12569 |
- case 9: |
12570 |
-#line 135 "template_syntax.y" |
12571 |
- { |
12572 |
- Attribute * pattr; |
12573 |
- string name((yyvsp[-1].val_str)); |
12574 |
- string value; |
12575 |
- |
12576 |
- pattr = new SingleAttribute(name,value); |
12577 |
- |
12578 |
- tmpl->set(pattr); |
12579 |
- } |
12580 |
-#line 1457 "template_syntax.cc" |
12581 |
- break; |
12582 |
- |
12583 |
- case 10: |
12584 |
-#line 145 "template_syntax.y" |
12585 |
- { |
12586 |
- YYABORT; |
12587 |
- } |
12588 |
-#line 1465 "template_syntax.cc" |
12589 |
- break; |
12590 |
- |
12591 |
- case 11: |
12592 |
-#line 151 "template_syntax.y" |
12593 |
- { |
12594 |
- map<string,string>* vattr; |
12595 |
- string name((yyvsp[-2].val_str)); |
12596 |
- string value((yyvsp[0].val_str)); |
12597 |
- |
12598 |
- one_util::toupper(name); |
12599 |
- |
12600 |
- vattr = new map<string,string>; |
12601 |
- vattr->insert(make_pair(name,unescape(value))); |
12602 |
- |
12603 |
- (yyval.val_attr) = static_cast<void *>(vattr); |
12604 |
- } |
12605 |
-#line 1482 "template_syntax.cc" |
12606 |
- break; |
12607 |
- |
12608 |
- case 12: |
12609 |
-#line 164 "template_syntax.y" |
12610 |
- { |
12611 |
- string name((yyvsp[-2].val_str)); |
12612 |
- string value((yyvsp[0].val_str)); |
12613 |
- map<string,string> * attrmap; |
12614 |
- |
12615 |
- one_util::toupper(name); |
12616 |
- |
12617 |
- attrmap = static_cast<map<string,string> *>((yyvsp[-4].val_attr)); |
12618 |
- |
12619 |
- attrmap->insert(make_pair(name,unescape(value))); |
12620 |
- (yyval.val_attr) = (yyvsp[-4].val_attr); |
12621 |
- } |
12622 |
-#line 1499 "template_syntax.cc" |
12623 |
- break; |
12624 |
- |
12625 |
- |
12626 |
-#line 1503 "template_syntax.cc" |
12627 |
- |
12628 |
- default: break; |
12629 |
- } |
12630 |
- /* User semantic actions sometimes alter yychar, and that requires |
12631 |
- that yytoken be updated with the new translation. We take the |
12632 |
- approach of translating immediately before every use of yytoken. |
12633 |
- One alternative is translating here after every semantic action, |
12634 |
- but that translation would be missed if the semantic action invokes |
12635 |
- YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or |
12636 |
- if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an |
12637 |
- incorrect destructor might then be invoked immediately. In the |
12638 |
- case of YYERROR or YYBACKUP, subsequent parser actions might lead |
12639 |
- to an incorrect destructor call or verbose syntax error message |
12640 |
- before the lookahead is translated. */ |
12641 |
- YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); |
12642 |
- |
12643 |
- YYPOPSTACK (yylen); |
12644 |
- yylen = 0; |
12645 |
- YY_STACK_PRINT (yyss, yyssp); |
12646 |
- |
12647 |
- *++yyvsp = yyval; |
12648 |
- *++yylsp = yyloc; |
12649 |
- |
12650 |
- /* Now 'shift' the result of the reduction. Determine what state |
12651 |
- that goes to, based on the state we popped back to and the rule |
12652 |
- number reduced by. */ |
12653 |
- { |
12654 |
- const int yylhs = yyr1[yyn] - YYNTOKENS; |
12655 |
- const int yyi = yypgoto[yylhs] + *yyssp; |
12656 |
- yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp |
12657 |
- ? yytable[yyi] |
12658 |
- : yydefgoto[yylhs]); |
12659 |
- } |
12660 |
- |
12661 |
- goto yynewstate; |
12662 |
- |
12663 |
- |
12664 |
-/*--------------------------------------. |
12665 |
-| yyerrlab -- here on detecting error. | |
12666 |
-`--------------------------------------*/ |
12667 |
-yyerrlab: |
12668 |
- /* Make sure we have latest lookahead translation. See comments at |
12669 |
- user semantic actions for why this is necessary. */ |
12670 |
- yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); |
12671 |
- |
12672 |
- /* If not already recovering from an error, report this error. */ |
12673 |
- if (!yyerrstatus) |
12674 |
- { |
12675 |
- ++yynerrs; |
12676 |
-#if ! YYERROR_VERBOSE |
12677 |
- yyerror (&yylloc, mc, tmpl, error_msg, scanner, YY_("syntax error")); |
12678 |
-#else |
12679 |
-# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ |
12680 |
- yyssp, yytoken) |
12681 |
- { |
12682 |
- char const *yymsgp = YY_("syntax error"); |
12683 |
- int yysyntax_error_status; |
12684 |
- yysyntax_error_status = YYSYNTAX_ERROR; |
12685 |
- if (yysyntax_error_status == 0) |
12686 |
- yymsgp = yymsg; |
12687 |
- else if (yysyntax_error_status == 1) |
12688 |
- { |
12689 |
- if (yymsg != yymsgbuf) |
12690 |
- YYSTACK_FREE (yymsg); |
12691 |
- yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); |
12692 |
- if (!yymsg) |
12693 |
- { |
12694 |
- yymsg = yymsgbuf; |
12695 |
- yymsg_alloc = sizeof yymsgbuf; |
12696 |
- yysyntax_error_status = 2; |
12697 |
- } |
12698 |
- else |
12699 |
- { |
12700 |
- yysyntax_error_status = YYSYNTAX_ERROR; |
12701 |
- yymsgp = yymsg; |
12702 |
- } |
12703 |
- } |
12704 |
- yyerror (&yylloc, mc, tmpl, error_msg, scanner, yymsgp); |
12705 |
- if (yysyntax_error_status == 2) |
12706 |
- goto yyexhaustedlab; |
12707 |
- } |
12708 |
-# undef YYSYNTAX_ERROR |
12709 |
-#endif |
12710 |
- } |
12711 |
- |
12712 |
- yyerror_range[1] = yylloc; |
12713 |
- |
12714 |
- if (yyerrstatus == 3) |
12715 |
- { |
12716 |
- /* If just tried and failed to reuse lookahead token after an |
12717 |
- error, discard it. */ |
12718 |
- |
12719 |
- if (yychar <= YYEOF) |
12720 |
- { |
12721 |
- /* Return failure if at end of input. */ |
12722 |
- if (yychar == YYEOF) |
12723 |
- YYABORT; |
12724 |
- } |
12725 |
- else |
12726 |
- { |
12727 |
- yydestruct ("Error: discarding", |
12728 |
- yytoken, &yylval, &yylloc, mc, tmpl, error_msg, scanner); |
12729 |
- yychar = YYEMPTY; |
12730 |
- } |
12731 |
- } |
12732 |
- |
12733 |
- /* Else will try to reuse lookahead token after shifting the error |
12734 |
- token. */ |
12735 |
- goto yyerrlab1; |
12736 |
- |
12737 |
- |
12738 |
-/*---------------------------------------------------. |
12739 |
-| yyerrorlab -- error raised explicitly by YYERROR. | |
12740 |
-`---------------------------------------------------*/ |
12741 |
-yyerrorlab: |
12742 |
- /* Pacify compilers when the user code never invokes YYERROR and the |
12743 |
- label yyerrorlab therefore never appears in user code. */ |
12744 |
- if (0) |
12745 |
- YYERROR; |
12746 |
- |
12747 |
- /* Do not reclaim the symbols of the rule whose action triggered |
12748 |
- this YYERROR. */ |
12749 |
- YYPOPSTACK (yylen); |
12750 |
- yylen = 0; |
12751 |
- YY_STACK_PRINT (yyss, yyssp); |
12752 |
- yystate = *yyssp; |
12753 |
- goto yyerrlab1; |
12754 |
- |
12755 |
- |
12756 |
-/*-------------------------------------------------------------. |
12757 |
-| yyerrlab1 -- common code for both syntax error and YYERROR. | |
12758 |
-`-------------------------------------------------------------*/ |
12759 |
-yyerrlab1: |
12760 |
- yyerrstatus = 3; /* Each real token shifted decrements this. */ |
12761 |
- |
12762 |
- for (;;) |
12763 |
- { |
12764 |
- yyn = yypact[yystate]; |
12765 |
- if (!yypact_value_is_default (yyn)) |
12766 |
- { |
12767 |
- yyn += YYTERROR; |
12768 |
- if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) |
12769 |
- { |
12770 |
- yyn = yytable[yyn]; |
12771 |
- if (0 < yyn) |
12772 |
- break; |
12773 |
- } |
12774 |
- } |
12775 |
- |
12776 |
- /* Pop the current state because it cannot handle the error token. */ |
12777 |
- if (yyssp == yyss) |
12778 |
- YYABORT; |
12779 |
- |
12780 |
- yyerror_range[1] = *yylsp; |
12781 |
- yydestruct ("Error: popping", |
12782 |
- yystos[yystate], yyvsp, yylsp, mc, tmpl, error_msg, scanner); |
12783 |
- YYPOPSTACK (1); |
12784 |
- yystate = *yyssp; |
12785 |
- YY_STACK_PRINT (yyss, yyssp); |
12786 |
- } |
12787 |
- |
12788 |
- YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
12789 |
- *++yyvsp = yylval; |
12790 |
- YY_IGNORE_MAYBE_UNINITIALIZED_END |
12791 |
- |
12792 |
- yyerror_range[2] = yylloc; |
12793 |
- /* Using YYLLOC is tempting, but would change the location of |
12794 |
- the lookahead. YYLOC is available though. */ |
12795 |
- YYLLOC_DEFAULT (yyloc, yyerror_range, 2); |
12796 |
- *++yylsp = yyloc; |
12797 |
- |
12798 |
- /* Shift the error token. */ |
12799 |
- YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); |
12800 |
- |
12801 |
- yystate = yyn; |
12802 |
- goto yynewstate; |
12803 |
- |
12804 |
- |
12805 |
-/*-------------------------------------. |
12806 |
-| yyacceptlab -- YYACCEPT comes here. | |
12807 |
-`-------------------------------------*/ |
12808 |
-yyacceptlab: |
12809 |
- yyresult = 0; |
12810 |
- goto yyreturn; |
12811 |
- |
12812 |
- |
12813 |
-/*-----------------------------------. |
12814 |
-| yyabortlab -- YYABORT comes here. | |
12815 |
-`-----------------------------------*/ |
12816 |
-yyabortlab: |
12817 |
- yyresult = 1; |
12818 |
- goto yyreturn; |
12819 |
- |
12820 |
- |
12821 |
-#if !defined yyoverflow || YYERROR_VERBOSE |
12822 |
-/*-------------------------------------------------. |
12823 |
-| yyexhaustedlab -- memory exhaustion comes here. | |
12824 |
-`-------------------------------------------------*/ |
12825 |
-yyexhaustedlab: |
12826 |
- yyerror (&yylloc, mc, tmpl, error_msg, scanner, YY_("memory exhausted")); |
12827 |
- yyresult = 2; |
12828 |
- /* Fall through. */ |
12829 |
-#endif |
12830 |
- |
12831 |
- |
12832 |
-/*-----------------------------------------------------. |
12833 |
-| yyreturn -- parsing is finished, return the result. | |
12834 |
-`-----------------------------------------------------*/ |
12835 |
-yyreturn: |
12836 |
- if (yychar != YYEMPTY) |
12837 |
- { |
12838 |
- /* Make sure we have latest lookahead translation. See comments at |
12839 |
- user semantic actions for why this is necessary. */ |
12840 |
- yytoken = YYTRANSLATE (yychar); |
12841 |
- yydestruct ("Cleanup: discarding lookahead", |
12842 |
- yytoken, &yylval, &yylloc, mc, tmpl, error_msg, scanner); |
12843 |
- } |
12844 |
- /* Do not reclaim the symbols of the rule whose action triggered |
12845 |
- this YYABORT or YYACCEPT. */ |
12846 |
- YYPOPSTACK (yylen); |
12847 |
- YY_STACK_PRINT (yyss, yyssp); |
12848 |
- while (yyssp != yyss) |
12849 |
- { |
12850 |
- yydestruct ("Cleanup: popping", |
12851 |
- yystos[*yyssp], yyvsp, yylsp, mc, tmpl, error_msg, scanner); |
12852 |
- YYPOPSTACK (1); |
12853 |
- } |
12854 |
-#ifndef yyoverflow |
12855 |
- if (yyss != yyssa) |
12856 |
- YYSTACK_FREE (yyss); |
12857 |
-#endif |
12858 |
-#if YYERROR_VERBOSE |
12859 |
- if (yymsg != yymsgbuf) |
12860 |
- YYSTACK_FREE (yymsg); |
12861 |
-#endif |
12862 |
- return yyresult; |
12863 |
-} |
12864 |
-#line 177 "template_syntax.y" |
12865 |
- |
12866 |
- |
12867 |
-string& unescape (string &str) |
12868 |
-{ |
12869 |
- size_t pos = 0; |
12870 |
- |
12871 |
- while ((pos = str.find("\\\"", pos)) != string::npos) |
12872 |
- { |
12873 |
- str.replace(pos,2,"\""); |
12874 |
- } |
12875 |
- |
12876 |
- return str; |
12877 |
-} |
12878 |
- |
12879 |
-void template_error( |
12880 |
- YYLTYPE * llocp, |
12881 |
- mem_collector * mc, |
12882 |
- Template * tmpl, |
12883 |
- char ** error_msg, |
12884 |
- yyscan_t scanner, |
12885 |
- const char * str) |
12886 |
-{ |
12887 |
- int length; |
12888 |
- |
12889 |
- length = strlen(str)+ 64; |
12890 |
- |
12891 |
- *error_msg = (char *) malloc(sizeof(char)*length); |
12892 |
- |
12893 |
- if (*error_msg != 0) |
12894 |
- { |
12895 |
- snprintf(*error_msg, |
12896 |
- length, |
12897 |
- "%s at line %i, columns %i:%i", |
12898 |
- str, |
12899 |
- llocp->first_line, |
12900 |
- llocp->first_column, |
12901 |
- llocp->last_column); |
12902 |
- } |
12903 |
-} |
12904 |
|
12905 |
diff --git a/app-emulation/opennebula/files/opennebula-5.10.1/parsers/template_syntax.h b/app-emulation/opennebula/files/opennebula-5.10.1/parsers/template_syntax.h |
12906 |
deleted file mode 100644 |
12907 |
index 25d2ba5..0000000 |
12908 |
--- a/app-emulation/opennebula/files/opennebula-5.10.1/parsers/template_syntax.h |
12909 |
+++ /dev/null |
12910 |
@@ -1,119 +0,0 @@ |
12911 |
-/* A Bison parser, made by GNU Bison 3.4.1. */ |
12912 |
- |
12913 |
-/* Bison interface for Yacc-like parsers in C |
12914 |
- |
12915 |
- Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2019 Free Software Foundation, |
12916 |
- Inc. |
12917 |
- |
12918 |
- This program is free software: you can redistribute it and/or modify |
12919 |
- it under the terms of the GNU General Public License as published by |
12920 |
- the Free Software Foundation, either version 3 of the License, or |
12921 |
- (at your option) any later version. |
12922 |
- |
12923 |
- This program is distributed in the hope that it will be useful, |
12924 |
- but WITHOUT ANY WARRANTY; without even the implied warranty of |
12925 |
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12926 |
- GNU General Public License for more details. |
12927 |
- |
12928 |
- You should have received a copy of the GNU General Public License |
12929 |
- along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
12930 |
- |
12931 |
-/* As a special exception, you may create a larger work that contains |
12932 |
- part or all of the Bison parser skeleton and distribute that work |
12933 |
- under terms of your choice, so long as that work isn't itself a |
12934 |
- parser generator using the skeleton or a modified version thereof |
12935 |
- as a parser skeleton. Alternatively, if you modify or redistribute |
12936 |
- the parser skeleton itself, you may (at your option) remove this |
12937 |
- special exception, which will cause the skeleton and the resulting |
12938 |
- Bison output files to be licensed under the GNU General Public |
12939 |
- License without this special exception. |
12940 |
- |
12941 |
- This special exception was added by the Free Software Foundation in |
12942 |
- version 2.2 of Bison. */ |
12943 |
- |
12944 |
-/* Undocumented macros, especially those whose name start with YY_, |
12945 |
- are private implementation details. Do not rely on them. */ |
12946 |
- |
12947 |
-#ifndef YY_TEMPLATE_TEMPLATE_SYNTAX_HH_INCLUDED |
12948 |
-# define YY_TEMPLATE_TEMPLATE_SYNTAX_HH_INCLUDED |
12949 |
-/* Debug traces. */ |
12950 |
-#ifndef YYDEBUG |
12951 |
-# define YYDEBUG 0 |
12952 |
-#endif |
12953 |
-#if YYDEBUG |
12954 |
-extern int template_debug; |
12955 |
-#endif |
12956 |
-/* "%code requires" blocks. */ |
12957 |
-#line 47 "template_syntax.y" |
12958 |
- |
12959 |
-#include <iostream> |
12960 |
-#include <string> |
12961 |
-#include <map> |
12962 |
-#include <algorithm> |
12963 |
- |
12964 |
-#include <ctype.h> |
12965 |
-#include <string.h> |
12966 |
-#include <stdio.h> |
12967 |
- |
12968 |
-#include "mem_collector.h" |
12969 |
- |
12970 |
-#include "Template.h" |
12971 |
- |
12972 |
-typedef void * yyscan_t; |
12973 |
- |
12974 |
-int template_parse(Template * tmpl, char ** errmsg, yyscan_t scanner); |
12975 |
- |
12976 |
-#line 67 "template_syntax.hh" |
12977 |
- |
12978 |
-/* Token type. */ |
12979 |
-#ifndef YYTOKENTYPE |
12980 |
-# define YYTOKENTYPE |
12981 |
- enum yytokentype |
12982 |
- { |
12983 |
- EQUAL = 258, |
12984 |
- COMMA = 259, |
12985 |
- OBRACKET = 260, |
12986 |
- CBRACKET = 261, |
12987 |
- EQUAL_EMPTY = 262, |
12988 |
- CCDATA = 263, |
12989 |
- STRING = 264, |
12990 |
- VARIABLE = 265 |
12991 |
- }; |
12992 |
-#endif |
12993 |
- |
12994 |
-/* Value type. */ |
12995 |
-#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED |
12996 |
-union YYSTYPE |
12997 |
-{ |
12998 |
-#line 74 "template_syntax.y" |
12999 |
- |
13000 |
- char * val_str; |
13001 |
- void * val_attr; |
13002 |
- |
13003 |
-#line 94 "template_syntax.hh" |
13004 |
- |
13005 |
-}; |
13006 |
-typedef union YYSTYPE YYSTYPE; |
13007 |
-# define YYSTYPE_IS_TRIVIAL 1 |
13008 |
-# define YYSTYPE_IS_DECLARED 1 |
13009 |
-#endif |
13010 |
- |
13011 |
-/* Location type. */ |
13012 |
-#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED |
13013 |
-typedef struct YYLTYPE YYLTYPE; |
13014 |
-struct YYLTYPE |
13015 |
-{ |
13016 |
- int first_line; |
13017 |
- int first_column; |
13018 |
- int last_line; |
13019 |
- int last_column; |
13020 |
-}; |
13021 |
-# define YYLTYPE_IS_DECLARED 1 |
13022 |
-# define YYLTYPE_IS_TRIVIAL 1 |
13023 |
-#endif |
13024 |
- |
13025 |
- |
13026 |
- |
13027 |
-int template_parse (mem_collector * mc, Template * tmpl, char ** error_msg, yyscan_t scanner); |
13028 |
- |
13029 |
-#endif /* !YY_TEMPLATE_TEMPLATE_SYNTAX_HH_INCLUDED */ |
13030 |
|
13031 |
diff --git a/app-emulation/opennebula/files/opennebula-5.10.1/parsers/template_syntax.y b/app-emulation/opennebula/files/opennebula-5.10.1/parsers/template_syntax.y |
13032 |
deleted file mode 100644 |
13033 |
index 989f5f5..0000000 |
13034 |
--- a/app-emulation/opennebula/files/opennebula-5.10.1/parsers/template_syntax.y |
13035 |
+++ /dev/null |
13036 |
@@ -1,215 +0,0 @@ |
13037 |
-/* -------------------------------------------------------------------------- */ |
13038 |
-/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */ |
13039 |
-/* */ |
13040 |
-/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ |
13041 |
-/* not use this file except in compliance with the License. You may obtain */ |
13042 |
-/* a copy of the License at */ |
13043 |
-/* */ |
13044 |
-/* http://www.apache.org/licenses/LICENSE-2.0 */ |
13045 |
-/* */ |
13046 |
-/* Unless required by applicable law or agreed to in writing, software */ |
13047 |
-/* distributed under the License is distributed on an "AS IS" BASIS, */ |
13048 |
-/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ |
13049 |
-/* See the License for the specific language governing permissions and */ |
13050 |
-/* limitations under the License. */ |
13051 |
-/* -------------------------------------------------------------------------- */ |
13052 |
- |
13053 |
-%{ |
13054 |
-#include "template_syntax.h" |
13055 |
-#include "template_parser.h" |
13056 |
-#include "NebulaUtil.h" |
13057 |
- |
13058 |
-#define YYERROR_VERBOSE |
13059 |
- |
13060 |
-void template_error( YYLTYPE * llocp, mem_collector * mc, Template * tmpl, |
13061 |
- char ** error_msg, yyscan_t scanner, const char * str); |
13062 |
- |
13063 |
-int template_lex (YYSTYPE *lvalp, YYLTYPE *llocp, mem_collector * mc, |
13064 |
- yyscan_t scanner); |
13065 |
- |
13066 |
-int template_parse(Template * tmpl, char ** errmsg, yyscan_t scanner) |
13067 |
-{ |
13068 |
- mem_collector mc; |
13069 |
- int rc; |
13070 |
- |
13071 |
- mem_collector_init(&mc); |
13072 |
- |
13073 |
- rc = template_parse(&mc, tmpl, errmsg, scanner); |
13074 |
- |
13075 |
- mem_collector_cleanup(&mc); |
13076 |
- |
13077 |
- return rc; |
13078 |
-} |
13079 |
- |
13080 |
-static string& unescape (string &str); |
13081 |
-%} |
13082 |
- |
13083 |
-%code requires { |
13084 |
-#include <iostream> |
13085 |
-#include <string> |
13086 |
-#include <map> |
13087 |
-#include <algorithm> |
13088 |
- |
13089 |
-#include <ctype.h> |
13090 |
-#include <string.h> |
13091 |
-#include <stdio.h> |
13092 |
- |
13093 |
-#include "mem_collector.h" |
13094 |
- |
13095 |
-#include "Template.h" |
13096 |
- |
13097 |
-typedef void * yyscan_t; |
13098 |
- |
13099 |
-int template_parse(Template * tmpl, char ** errmsg, yyscan_t scanner); |
13100 |
-} |
13101 |
- |
13102 |
-%parse-param {mem_collector * mc} |
13103 |
-%parse-param {Template * tmpl} |
13104 |
-%parse-param {char ** error_msg} |
13105 |
-%parse-param {yyscan_t scanner} |
13106 |
- |
13107 |
-%lex-param {mem_collector * mc} |
13108 |
-%lex-param {yyscan_t scanner} |
13109 |
- |
13110 |
-%union { |
13111 |
- char * val_str; |
13112 |
- void * val_attr; |
13113 |
-}; |
13114 |
- |
13115 |
-%defines |
13116 |
-%locations |
13117 |
-%pure-parser |
13118 |
-%name-prefix "template_" |
13119 |
-%output "template_syntax.cc" |
13120 |
- |
13121 |
-%token EQUAL COMMA OBRACKET CBRACKET EQUAL_EMPTY CCDATA |
13122 |
-%token <val_str> STRING |
13123 |
-%token <val_str> VARIABLE |
13124 |
-%type <val_attr> array_val |
13125 |
-%type <void> attribute |
13126 |
-%type <void> template |
13127 |
- |
13128 |
-%% |
13129 |
- |
13130 |
-template_file : |
13131 |
- | template |
13132 |
- ; |
13133 |
- |
13134 |
-template: attribute |
13135 |
- | template attribute |
13136 |
- ; |
13137 |
- |
13138 |
-attribute: VARIABLE EQUAL STRING |
13139 |
- { |
13140 |
- Attribute * pattr; |
13141 |
- string name($1); |
13142 |
- string value($3); |
13143 |
- |
13144 |
- pattr = new SingleAttribute(name,unescape(value)); |
13145 |
- |
13146 |
- tmpl->set(pattr); |
13147 |
- } |
13148 |
- | VARIABLE EQUAL OBRACKET array_val CBRACKET |
13149 |
- { |
13150 |
- Attribute * pattr; |
13151 |
- string name($1); |
13152 |
- map<string,string> * amap; |
13153 |
- |
13154 |
- amap = static_cast<map<string,string> *>($4); |
13155 |
- pattr = new VectorAttribute(name,*amap); |
13156 |
- |
13157 |
- tmpl->set(pattr); |
13158 |
- |
13159 |
- delete amap; |
13160 |
- } |
13161 |
- | VARIABLE EQUAL OBRACKET CBRACKET |
13162 |
- { |
13163 |
- Attribute * pattr; |
13164 |
- string name($1); |
13165 |
- |
13166 |
- pattr = new VectorAttribute(name); |
13167 |
- |
13168 |
- tmpl->set(pattr); |
13169 |
- } |
13170 |
- | VARIABLE EQUAL_EMPTY |
13171 |
- { |
13172 |
- Attribute * pattr; |
13173 |
- string name($1); |
13174 |
- string value; |
13175 |
- |
13176 |
- pattr = new SingleAttribute(name,value); |
13177 |
- |
13178 |
- tmpl->set(pattr); |
13179 |
- } |
13180 |
- | VARIABLE EQUAL CCDATA |
13181 |
- { |
13182 |
- YYABORT; |
13183 |
- } |
13184 |
- ; |
13185 |
- |
13186 |
-array_val: VARIABLE EQUAL STRING |
13187 |
- { |
13188 |
- map<string,string>* vattr; |
13189 |
- string name($1); |
13190 |
- string value($3); |
13191 |
- |
13192 |
- one_util::toupper(name); |
13193 |
- |
13194 |
- vattr = new map<string,string>; |
13195 |
- vattr->insert(make_pair(name,unescape(value))); |
13196 |
- |
13197 |
- $$ = static_cast<void *>(vattr); |
13198 |
- } |
13199 |
- | array_val COMMA VARIABLE EQUAL STRING |
13200 |
- { |
13201 |
- string name($3); |
13202 |
- string value($5); |
13203 |
- map<string,string> * attrmap; |
13204 |
- |
13205 |
- one_util::toupper(name); |
13206 |
- |
13207 |
- attrmap = static_cast<map<string,string> *>($1); |
13208 |
- |
13209 |
- attrmap->insert(make_pair(name,unescape(value))); |
13210 |
- $$ = $1; |
13211 |
- } |
13212 |
- ; |
13213 |
-%% |
13214 |
- |
13215 |
-string& unescape (string &str) |
13216 |
-{ |
13217 |
- size_t pos = 0; |
13218 |
- |
13219 |
- while ((pos = str.find("\\\"", pos)) != string::npos) |
13220 |
- { |
13221 |
- str.replace(pos,2,"\""); |
13222 |
- } |
13223 |
- |
13224 |
- return str; |
13225 |
-} |
13226 |
- |
13227 |
-void template_error( |
13228 |
- YYLTYPE * llocp, |
13229 |
- mem_collector * mc, |
13230 |
- Template * tmpl, |
13231 |
- char ** error_msg, |
13232 |
- yyscan_t scanner, |
13233 |
- const char * str) |
13234 |
-{ |
13235 |
- int length; |
13236 |
- |
13237 |
- length = strlen(str)+ 64; |
13238 |
- |
13239 |
- *error_msg = (char *) malloc(sizeof(char)*length); |
13240 |
- |
13241 |
- if (*error_msg != 0) |
13242 |
- { |
13243 |
- snprintf(*error_msg, |
13244 |
- length, |
13245 |
- "%s at line %i, columns %i:%i", |
13246 |
- str, |
13247 |
- llocp->first_line, |
13248 |
- llocp->first_column, |
13249 |
- llocp->last_column); |
13250 |
- } |
13251 |
-} |
13252 |
|
13253 |
diff --git a/app-emulation/opennebula/files/opennebula-5.10.1/parsers/vm_file_var_syntax.cc b/app-emulation/opennebula/files/opennebula-5.10.1/parsers/vm_file_var_syntax.cc |
13254 |
deleted file mode 100644 |
13255 |
index ba5e634..0000000 |
13256 |
--- a/app-emulation/opennebula/files/opennebula-5.10.1/parsers/vm_file_var_syntax.cc |
13257 |
+++ /dev/null |
13258 |
@@ -1,1843 +0,0 @@ |
13259 |
-/* A Bison parser, made by GNU Bison 3.4.1. */ |
13260 |
- |
13261 |
-/* Bison implementation for Yacc-like parsers in C |
13262 |
- |
13263 |
- Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2019 Free Software Foundation, |
13264 |
- Inc. |
13265 |
- |
13266 |
- This program is free software: you can redistribute it and/or modify |
13267 |
- it under the terms of the GNU General Public License as published by |
13268 |
- the Free Software Foundation, either version 3 of the License, or |
13269 |
- (at your option) any later version. |
13270 |
- |
13271 |
- This program is distributed in the hope that it will be useful, |
13272 |
- but WITHOUT ANY WARRANTY; without even the implied warranty of |
13273 |
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13274 |
- GNU General Public License for more details. |
13275 |
- |
13276 |
- You should have received a copy of the GNU General Public License |
13277 |
- along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
13278 |
- |
13279 |
-/* As a special exception, you may create a larger work that contains |
13280 |
- part or all of the Bison parser skeleton and distribute that work |
13281 |
- under terms of your choice, so long as that work isn't itself a |
13282 |
- parser generator using the skeleton or a modified version thereof |
13283 |
- as a parser skeleton. Alternatively, if you modify or redistribute |
13284 |
- the parser skeleton itself, you may (at your option) remove this |
13285 |
- special exception, which will cause the skeleton and the resulting |
13286 |
- Bison output files to be licensed under the GNU General Public |
13287 |
- License without this special exception. |
13288 |
- |
13289 |
- This special exception was added by the Free Software Foundation in |
13290 |
- version 2.2 of Bison. */ |
13291 |
- |
13292 |
-/* C LALR(1) parser skeleton written by Richard Stallman, by |
13293 |
- simplifying the original so-called "semantic" parser. */ |
13294 |
- |
13295 |
-/* All symbols defined below should begin with yy or YY, to avoid |
13296 |
- infringing on user name space. This should be done even for local |
13297 |
- variables, as they might otherwise be expanded by user macros. |
13298 |
- There are some unavoidable exceptions within include files to |
13299 |
- define necessary library symbols; they are noted "INFRINGES ON |
13300 |
- USER NAME SPACE" below. */ |
13301 |
- |
13302 |
-/* Undocumented macros, especially those whose name start with YY_, |
13303 |
- are private implementation details. Do not rely on them. */ |
13304 |
- |
13305 |
-/* Identify Bison output. */ |
13306 |
-#define YYBISON 1 |
13307 |
- |
13308 |
-/* Bison version. */ |
13309 |
-#define YYBISON_VERSION "3.4.1" |
13310 |
- |
13311 |
-/* Skeleton name. */ |
13312 |
-#define YYSKELETON_NAME "yacc.c" |
13313 |
- |
13314 |
-/* Pure parsers. */ |
13315 |
-#define YYPURE 1 |
13316 |
- |
13317 |
-/* Push parsers. */ |
13318 |
-#define YYPUSH 0 |
13319 |
- |
13320 |
-/* Pull parsers. */ |
13321 |
-#define YYPULL 1 |
13322 |
- |
13323 |
- |
13324 |
-/* Substitute the variable and function names. */ |
13325 |
-#define yyparse vm_file_var_parse |
13326 |
-#define yylex vm_file_var_lex |
13327 |
-#define yyerror vm_file_var_error |
13328 |
-#define yydebug vm_file_var_debug |
13329 |
-#define yynerrs vm_file_var_nerrs |
13330 |
- |
13331 |
- |
13332 |
-/* First part of user prologue. */ |
13333 |
-#line 40 "vm_file_var_syntax.y" |
13334 |
- |
13335 |
-#include "vm_file_var_syntax.h" |
13336 |
-#include "vm_var_parser.h" |
13337 |
- |
13338 |
-#define YYERROR_VERBOSE |
13339 |
-#define vm_file_var_lex vm_var_lex |
13340 |
- |
13341 |
-void vm_file_var_error(YYLTYPE * llocp, mem_collector * mc, VirtualMachine * vm, |
13342 |
- vector<int> * img_ids, char ** errmsg, yyscan_t scanner, const char * str); |
13343 |
- |
13344 |
-int vm_var_lex(YYSTYPE *lvalp, YYLTYPE *llocp, mem_collector * mc, |
13345 |
- yyscan_t scanner); |
13346 |
- |
13347 |
-int vm_file_var_parse (VirtualMachine * vm, vector<int> * img_ids, |
13348 |
- char ** errmsg, yyscan_t scanner) |
13349 |
-{ |
13350 |
- mem_collector mc; |
13351 |
- int rc; |
13352 |
- |
13353 |
- mem_collector_init(&mc); |
13354 |
- |
13355 |
- rc = vm_file_var_parse(&mc, vm, img_ids, errmsg, scanner); |
13356 |
- |
13357 |
- mem_collector_cleanup(&mc); |
13358 |
- |
13359 |
- return rc; |
13360 |
-} |
13361 |
- |
13362 |
-/* -------------------------------------------------------------------------- */ |
13363 |
-/* -------------------------------------------------------------------------- */ |
13364 |
- |
13365 |
-int get_image_path(VirtualMachine * vm, |
13366 |
- const string& var_name, |
13367 |
- const string& var1, |
13368 |
- const string& val1, |
13369 |
- const string& var2, |
13370 |
- const string& val2, |
13371 |
- vector<int> * img_ids, |
13372 |
- string& error_str) |
13373 |
-{ |
13374 |
- Nebula& nd = Nebula::instance(); |
13375 |
- |
13376 |
- ImagePool * ipool = nd.get_ipool(); |
13377 |
- UserPool * upool = nd.get_upool(); |
13378 |
- Image * img = 0; |
13379 |
- User * user = 0; |
13380 |
- int iid = -1; |
13381 |
- |
13382 |
- PoolObjectAuth perm; |
13383 |
- |
13384 |
- if (var_name != "FILE" ) |
13385 |
- { |
13386 |
- error_str = "Must use FILE variable for attribute."; |
13387 |
- return -1; |
13388 |
- } |
13389 |
- |
13390 |
- if ( var1 == "IMAGE" ) |
13391 |
- { |
13392 |
- int uid = vm->get_uid(); |
13393 |
- |
13394 |
- if ( !var2.empty() ) |
13395 |
- { |
13396 |
- VectorAttribute * vfile; |
13397 |
- map<string,string> file_values; |
13398 |
- |
13399 |
- file_values.insert(make_pair(var1, val1)); |
13400 |
- file_values.insert(make_pair(var2, val2)); |
13401 |
- |
13402 |
- vfile = new VectorAttribute("FILE", file_values); |
13403 |
- |
13404 |
- VirtualMachineDisk file_disk(vfile, 0); |
13405 |
- uid = file_disk.get_uid(uid); |
13406 |
- |
13407 |
- delete vfile; |
13408 |
- } |
13409 |
- |
13410 |
- img = ipool->get_ro(val1, uid); |
13411 |
- |
13412 |
- if ( img == 0 ) |
13413 |
- { |
13414 |
- ostringstream oss; |
13415 |
- oss << "User " << uid << " does not own an image with name: " << val1 |
13416 |
- << " . Set IMAGE_UNAME or IMAGE_UID of owner."; |
13417 |
- |
13418 |
- error_str = oss.str(); |
13419 |
- |
13420 |
- return -1; |
13421 |
- } |
13422 |
- } |
13423 |
- else if ( var1 == "IMAGE_ID" ) |
13424 |
- { |
13425 |
- istringstream is(val1); |
13426 |
- |
13427 |
- is >> iid; |
13428 |
- |
13429 |
- if ( !is.fail() ) |
13430 |
- { |
13431 |
- img = ipool->get_ro(iid); |
13432 |
- } |
13433 |
- |
13434 |
- if ( img == 0 ) |
13435 |
- { |
13436 |
- ostringstream oss; |
13437 |
- oss << "Image with ID: " << iid << " does not exist"; |
13438 |
- |
13439 |
- error_str = oss.str(); |
13440 |
- |
13441 |
- return -1; |
13442 |
- } |
13443 |
- } |
13444 |
- else |
13445 |
- { |
13446 |
- error_str = "Cannot get image, set IMAGE_ID or IMAGE."; |
13447 |
- return -1; |
13448 |
- } |
13449 |
- |
13450 |
- iid = img->get_oid(); |
13451 |
- |
13452 |
- img->get_permissions(perm); |
13453 |
- |
13454 |
- img->unlock();; |
13455 |
- |
13456 |
- set<int> gids; |
13457 |
- |
13458 |
- user = upool->get_ro(vm->get_uid()); |
13459 |
- |
13460 |
- if (user != 0) |
13461 |
- { |
13462 |
- gids = user->get_groups(); |
13463 |
- user->unlock(); |
13464 |
- } |
13465 |
- else |
13466 |
- { |
13467 |
- gids.insert(vm->get_gid()); |
13468 |
- } |
13469 |
- |
13470 |
- AuthRequest ar(vm->get_uid(), gids); |
13471 |
- |
13472 |
- ar.add_auth(AuthRequest::USE, perm); |
13473 |
- |
13474 |
- if (UserPool::authorize(ar) == -1) |
13475 |
- { |
13476 |
- error_str = "User not authorize to use image."; |
13477 |
- return -1; |
13478 |
- } |
13479 |
- |
13480 |
- img_ids->push_back(iid); |
13481 |
- |
13482 |
- return 0; |
13483 |
-} |
13484 |
- |
13485 |
-/* -------------------------------------------------------------------------- */ |
13486 |
-/* -------------------------------------------------------------------------- */ |
13487 |
- |
13488 |
- |
13489 |
-#line 232 "vm_file_var_syntax.cc" |
13490 |
- |
13491 |
-# ifndef YY_NULLPTR |
13492 |
-# if defined __cplusplus |
13493 |
-# if 201103L <= __cplusplus |
13494 |
-# define YY_NULLPTR nullptr |
13495 |
-# else |
13496 |
-# define YY_NULLPTR 0 |
13497 |
-# endif |
13498 |
-# else |
13499 |
-# define YY_NULLPTR ((void*)0) |
13500 |
-# endif |
13501 |
-# endif |
13502 |
- |
13503 |
-/* Enabling verbose error messages. */ |
13504 |
-#ifdef YYERROR_VERBOSE |
13505 |
-# undef YYERROR_VERBOSE |
13506 |
-# define YYERROR_VERBOSE 1 |
13507 |
-#else |
13508 |
-# define YYERROR_VERBOSE 0 |
13509 |
-#endif |
13510 |
- |
13511 |
-/* Use api.header.include to #include this header |
13512 |
- instead of duplicating it here. */ |
13513 |
-#ifndef YY_VM_FILE_VAR_VM_FILE_VAR_SYNTAX_HH_INCLUDED |
13514 |
-# define YY_VM_FILE_VAR_VM_FILE_VAR_SYNTAX_HH_INCLUDED |
13515 |
-/* Debug traces. */ |
13516 |
-#ifndef YYDEBUG |
13517 |
-# define YYDEBUG 0 |
13518 |
-#endif |
13519 |
-#if YYDEBUG |
13520 |
-extern int vm_file_var_debug; |
13521 |
-#endif |
13522 |
-/* "%code requires" blocks. */ |
13523 |
-#line 17 "vm_file_var_syntax.y" |
13524 |
- |
13525 |
-#include <iostream> |
13526 |
-#include <vector> |
13527 |
-#include <string> |
13528 |
-#include <map> |
13529 |
-#include <algorithm> |
13530 |
- |
13531 |
-#include <ctype.h> |
13532 |
-#include <string.h> |
13533 |
- |
13534 |
-#include "ImagePool.h" |
13535 |
-#include "UserPool.h" |
13536 |
-#include "VirtualMachine.h" |
13537 |
-#include "Nebula.h" |
13538 |
- |
13539 |
-#include "mem_collector.h" |
13540 |
- |
13541 |
-typedef void * yyscan_t; |
13542 |
- |
13543 |
-int vm_file_var_parse (VirtualMachine * vm, vector<int> * img_ids, |
13544 |
- char ** errmsg, yyscan_t scanner); |
13545 |
- |
13546 |
-#line 289 "vm_file_var_syntax.cc" |
13547 |
- |
13548 |
-/* Token type. */ |
13549 |
-#ifndef YYTOKENTYPE |
13550 |
-# define YYTOKENTYPE |
13551 |
- enum yytokentype |
13552 |
- { |
13553 |
- EQUAL = 258, |
13554 |
- COMMA = 259, |
13555 |
- OBRACKET = 260, |
13556 |
- CBRACKET = 261, |
13557 |
- EOA = 262, |
13558 |
- STRING = 263, |
13559 |
- VARIABLE = 264, |
13560 |
- RSTRING = 265, |
13561 |
- INTEGER = 266 |
13562 |
- }; |
13563 |
-#endif |
13564 |
- |
13565 |
-/* Value type. */ |
13566 |
-#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED |
13567 |
-union YYSTYPE |
13568 |
-{ |
13569 |
-#line 205 "vm_file_var_syntax.y" |
13570 |
- |
13571 |
- char * val_str; |
13572 |
- int val_int; |
13573 |
- char val_char; |
13574 |
- |
13575 |
-#line 318 "vm_file_var_syntax.cc" |
13576 |
- |
13577 |
-}; |
13578 |
-typedef union YYSTYPE YYSTYPE; |
13579 |
-# define YYSTYPE_IS_TRIVIAL 1 |
13580 |
-# define YYSTYPE_IS_DECLARED 1 |
13581 |
-#endif |
13582 |
- |
13583 |
-/* Location type. */ |
13584 |
-#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED |
13585 |
-typedef struct YYLTYPE YYLTYPE; |
13586 |
-struct YYLTYPE |
13587 |
-{ |
13588 |
- int first_line; |
13589 |
- int first_column; |
13590 |
- int last_line; |
13591 |
- int last_column; |
13592 |
-}; |
13593 |
-# define YYLTYPE_IS_DECLARED 1 |
13594 |
-# define YYLTYPE_IS_TRIVIAL 1 |
13595 |
-#endif |
13596 |
- |
13597 |
- |
13598 |
- |
13599 |
-int vm_file_var_parse (mem_collector * mc, VirtualMachine * vm, vector<int> * img_ids, char ** errmsg, yyscan_t scanner); |
13600 |
- |
13601 |
-#endif /* !YY_VM_FILE_VAR_VM_FILE_VAR_SYNTAX_HH_INCLUDED */ |
13602 |
- |
13603 |
- |
13604 |
- |
13605 |
-#ifdef short |
13606 |
-# undef short |
13607 |
-#endif |
13608 |
- |
13609 |
-#ifdef YYTYPE_UINT8 |
13610 |
-typedef YYTYPE_UINT8 yytype_uint8; |
13611 |
-#else |
13612 |
-typedef unsigned char yytype_uint8; |
13613 |
-#endif |
13614 |
- |
13615 |
-#ifdef YYTYPE_INT8 |
13616 |
-typedef YYTYPE_INT8 yytype_int8; |
13617 |
-#else |
13618 |
-typedef signed char yytype_int8; |
13619 |
-#endif |
13620 |
- |
13621 |
-#ifdef YYTYPE_UINT16 |
13622 |
-typedef YYTYPE_UINT16 yytype_uint16; |
13623 |
-#else |
13624 |
-typedef unsigned short yytype_uint16; |
13625 |
-#endif |
13626 |
- |
13627 |
-#ifdef YYTYPE_INT16 |
13628 |
-typedef YYTYPE_INT16 yytype_int16; |
13629 |
-#else |
13630 |
-typedef short yytype_int16; |
13631 |
-#endif |
13632 |
- |
13633 |
-#ifndef YYSIZE_T |
13634 |
-# ifdef __SIZE_TYPE__ |
13635 |
-# define YYSIZE_T __SIZE_TYPE__ |
13636 |
-# elif defined size_t |
13637 |
-# define YYSIZE_T size_t |
13638 |
-# elif ! defined YYSIZE_T |
13639 |
-# include <stddef.h> /* INFRINGES ON USER NAME SPACE */ |
13640 |
-# define YYSIZE_T size_t |
13641 |
-# else |
13642 |
-# define YYSIZE_T unsigned |
13643 |
-# endif |
13644 |
-#endif |
13645 |
- |
13646 |
-#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) |
13647 |
- |
13648 |
-#ifndef YY_ |
13649 |
-# if defined YYENABLE_NLS && YYENABLE_NLS |
13650 |
-# if ENABLE_NLS |
13651 |
-# include <libintl.h> /* INFRINGES ON USER NAME SPACE */ |
13652 |
-# define YY_(Msgid) dgettext ("bison-runtime", Msgid) |
13653 |
-# endif |
13654 |
-# endif |
13655 |
-# ifndef YY_ |
13656 |
-# define YY_(Msgid) Msgid |
13657 |
-# endif |
13658 |
-#endif |
13659 |
- |
13660 |
-#ifndef YY_ATTRIBUTE |
13661 |
-# if (defined __GNUC__ \ |
13662 |
- && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \ |
13663 |
- || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C |
13664 |
-# define YY_ATTRIBUTE(Spec) __attribute__(Spec) |
13665 |
-# else |
13666 |
-# define YY_ATTRIBUTE(Spec) /* empty */ |
13667 |
-# endif |
13668 |
-#endif |
13669 |
- |
13670 |
-#ifndef YY_ATTRIBUTE_PURE |
13671 |
-# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__)) |
13672 |
-#endif |
13673 |
- |
13674 |
-#ifndef YY_ATTRIBUTE_UNUSED |
13675 |
-# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) |
13676 |
-#endif |
13677 |
- |
13678 |
-/* Suppress unused-variable warnings by "using" E. */ |
13679 |
-#if ! defined lint || defined __GNUC__ |
13680 |
-# define YYUSE(E) ((void) (E)) |
13681 |
-#else |
13682 |
-# define YYUSE(E) /* empty */ |
13683 |
-#endif |
13684 |
- |
13685 |
-#if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ |
13686 |
-/* Suppress an incorrect diagnostic about yylval being uninitialized. */ |
13687 |
-# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ |
13688 |
- _Pragma ("GCC diagnostic push") \ |
13689 |
- _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ |
13690 |
- _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") |
13691 |
-# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ |
13692 |
- _Pragma ("GCC diagnostic pop") |
13693 |
-#else |
13694 |
-# define YY_INITIAL_VALUE(Value) Value |
13695 |
-#endif |
13696 |
-#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
13697 |
-# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
13698 |
-# define YY_IGNORE_MAYBE_UNINITIALIZED_END |
13699 |
-#endif |
13700 |
-#ifndef YY_INITIAL_VALUE |
13701 |
-# define YY_INITIAL_VALUE(Value) /* Nothing. */ |
13702 |
-#endif |
13703 |
- |
13704 |
- |
13705 |
-#define YY_ASSERT(E) ((void) (0 && (E))) |
13706 |
- |
13707 |
-#if ! defined yyoverflow || YYERROR_VERBOSE |
13708 |
- |
13709 |
-/* The parser invokes alloca or malloc; define the necessary symbols. */ |
13710 |
- |
13711 |
-# ifdef YYSTACK_USE_ALLOCA |
13712 |
-# if YYSTACK_USE_ALLOCA |
13713 |
-# ifdef __GNUC__ |
13714 |
-# define YYSTACK_ALLOC __builtin_alloca |
13715 |
-# elif defined __BUILTIN_VA_ARG_INCR |
13716 |
-# include <alloca.h> /* INFRINGES ON USER NAME SPACE */ |
13717 |
-# elif defined _AIX |
13718 |
-# define YYSTACK_ALLOC __alloca |
13719 |
-# elif defined _MSC_VER |
13720 |
-# include <malloc.h> /* INFRINGES ON USER NAME SPACE */ |
13721 |
-# define alloca _alloca |
13722 |
-# else |
13723 |
-# define YYSTACK_ALLOC alloca |
13724 |
-# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS |
13725 |
-# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ |
13726 |
- /* Use EXIT_SUCCESS as a witness for stdlib.h. */ |
13727 |
-# ifndef EXIT_SUCCESS |
13728 |
-# define EXIT_SUCCESS 0 |
13729 |
-# endif |
13730 |
-# endif |
13731 |
-# endif |
13732 |
-# endif |
13733 |
-# endif |
13734 |
- |
13735 |
-# ifdef YYSTACK_ALLOC |
13736 |
- /* Pacify GCC's 'empty if-body' warning. */ |
13737 |
-# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) |
13738 |
-# ifndef YYSTACK_ALLOC_MAXIMUM |
13739 |
- /* The OS might guarantee only one guard page at the bottom of the stack, |
13740 |
- and a page size can be as small as 4096 bytes. So we cannot safely |
13741 |
- invoke alloca (N) if N exceeds 4096. Use a slightly smaller number |
13742 |
- to allow for a few compiler-allocated temporary stack slots. */ |
13743 |
-# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ |
13744 |
-# endif |
13745 |
-# else |
13746 |
-# define YYSTACK_ALLOC YYMALLOC |
13747 |
-# define YYSTACK_FREE YYFREE |
13748 |
-# ifndef YYSTACK_ALLOC_MAXIMUM |
13749 |
-# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM |
13750 |
-# endif |
13751 |
-# if (defined __cplusplus && ! defined EXIT_SUCCESS \ |
13752 |
- && ! ((defined YYMALLOC || defined malloc) \ |
13753 |
- && (defined YYFREE || defined free))) |
13754 |
-# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ |
13755 |
-# ifndef EXIT_SUCCESS |
13756 |
-# define EXIT_SUCCESS 0 |
13757 |
-# endif |
13758 |
-# endif |
13759 |
-# ifndef YYMALLOC |
13760 |
-# define YYMALLOC malloc |
13761 |
-# if ! defined malloc && ! defined EXIT_SUCCESS |
13762 |
-void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ |
13763 |
-# endif |
13764 |
-# endif |
13765 |
-# ifndef YYFREE |
13766 |
-# define YYFREE free |
13767 |
-# if ! defined free && ! defined EXIT_SUCCESS |
13768 |
-void free (void *); /* INFRINGES ON USER NAME SPACE */ |
13769 |
-# endif |
13770 |
-# endif |
13771 |
-# endif |
13772 |
-#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ |
13773 |
- |
13774 |
- |
13775 |
-#if (! defined yyoverflow \ |
13776 |
- && (! defined __cplusplus \ |
13777 |
- || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \ |
13778 |
- && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) |
13779 |
- |
13780 |
-/* A type that is properly aligned for any stack member. */ |
13781 |
-union yyalloc |
13782 |
-{ |
13783 |
- yytype_int16 yyss_alloc; |
13784 |
- YYSTYPE yyvs_alloc; |
13785 |
- YYLTYPE yyls_alloc; |
13786 |
-}; |
13787 |
- |
13788 |
-/* The size of the maximum gap between one aligned stack and the next. */ |
13789 |
-# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) |
13790 |
- |
13791 |
-/* The size of an array large to enough to hold all stacks, each with |
13792 |
- N elements. */ |
13793 |
-# define YYSTACK_BYTES(N) \ |
13794 |
- ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \ |
13795 |
- + 2 * YYSTACK_GAP_MAXIMUM) |
13796 |
- |
13797 |
-# define YYCOPY_NEEDED 1 |
13798 |
- |
13799 |
-/* Relocate STACK from its old location to the new one. The |
13800 |
- local variables YYSIZE and YYSTACKSIZE give the old and new number of |
13801 |
- elements in the stack, and YYPTR gives the new location of the |
13802 |
- stack. Advance YYPTR to a properly aligned location for the next |
13803 |
- stack. */ |
13804 |
-# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ |
13805 |
- do \ |
13806 |
- { \ |
13807 |
- YYSIZE_T yynewbytes; \ |
13808 |
- YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ |
13809 |
- Stack = &yyptr->Stack_alloc; \ |
13810 |
- yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ |
13811 |
- yyptr += yynewbytes / sizeof (*yyptr); \ |
13812 |
- } \ |
13813 |
- while (0) |
13814 |
- |
13815 |
-#endif |
13816 |
- |
13817 |
-#if defined YYCOPY_NEEDED && YYCOPY_NEEDED |
13818 |
-/* Copy COUNT objects from SRC to DST. The source and destination do |
13819 |
- not overlap. */ |
13820 |
-# ifndef YYCOPY |
13821 |
-# if defined __GNUC__ && 1 < __GNUC__ |
13822 |
-# define YYCOPY(Dst, Src, Count) \ |
13823 |
- __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) |
13824 |
-# else |
13825 |
-# define YYCOPY(Dst, Src, Count) \ |
13826 |
- do \ |
13827 |
- { \ |
13828 |
- YYSIZE_T yyi; \ |
13829 |
- for (yyi = 0; yyi < (Count); yyi++) \ |
13830 |
- (Dst)[yyi] = (Src)[yyi]; \ |
13831 |
- } \ |
13832 |
- while (0) |
13833 |
-# endif |
13834 |
-# endif |
13835 |
-#endif /* !YYCOPY_NEEDED */ |
13836 |
- |
13837 |
-/* YYFINAL -- State number of the termination state. */ |
13838 |
-#define YYFINAL 5 |
13839 |
-/* YYLAST -- Last index in YYTABLE. */ |
13840 |
-#define YYLAST 16 |
13841 |
- |
13842 |
-/* YYNTOKENS -- Number of terminals. */ |
13843 |
-#define YYNTOKENS 12 |
13844 |
-/* YYNNTS -- Number of nonterminals. */ |
13845 |
-#define YYNNTS 3 |
13846 |
-/* YYNRULES -- Number of rules. */ |
13847 |
-#define YYNRULES 5 |
13848 |
-/* YYNSTATES -- Number of states. */ |
13849 |
-#define YYNSTATES 18 |
13850 |
- |
13851 |
-#define YYUNDEFTOK 2 |
13852 |
-#define YYMAXUTOK 266 |
13853 |
- |
13854 |
-/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM |
13855 |
- as returned by yylex, with out-of-bounds checking. */ |
13856 |
-#define YYTRANSLATE(YYX) \ |
13857 |
- ((unsigned) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) |
13858 |
- |
13859 |
-/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM |
13860 |
- as returned by yylex. */ |
13861 |
-static const yytype_uint8 yytranslate[] = |
13862 |
-{ |
13863 |
- 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
13864 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
13865 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
13866 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
13867 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
13868 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
13869 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
13870 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
13871 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
13872 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
13873 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
13874 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
13875 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
13876 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
13877 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
13878 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
13879 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
13880 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
13881 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
13882 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
13883 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
13884 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
13885 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
13886 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
13887 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
13888 |
- 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, |
13889 |
- 5, 6, 7, 8, 9, 10, 11 |
13890 |
-}; |
13891 |
- |
13892 |
-#if YYDEBUG |
13893 |
- /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ |
13894 |
-static const yytype_uint8 yyrline[] = |
13895 |
-{ |
13896 |
- 0, 229, 229, 230, 234, 252 |
13897 |
-}; |
13898 |
-#endif |
13899 |
- |
13900 |
-#if YYDEBUG || YYERROR_VERBOSE || 0 |
13901 |
-/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. |
13902 |
- First, the terminals, then, starting at YYNTOKENS, nonterminals. */ |
13903 |
-static const char *const yytname[] = |
13904 |
-{ |
13905 |
- "$end", "error", "$undefined", "EQUAL", "COMMA", "OBRACKET", "CBRACKET", |
13906 |
- "EOA", "STRING", "VARIABLE", "RSTRING", "INTEGER", "$accept", |
13907 |
- "vm_string", "vm_variable", YY_NULLPTR |
13908 |
-}; |
13909 |
-#endif |
13910 |
- |
13911 |
-# ifdef YYPRINT |
13912 |
-/* YYTOKNUM[NUM] -- (External) token number corresponding to the |
13913 |
- (internal) symbol number NUM (which must be that of a token). */ |
13914 |
-static const yytype_uint16 yytoknum[] = |
13915 |
-{ |
13916 |
- 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, |
13917 |
- 265, 266 |
13918 |
-}; |
13919 |
-# endif |
13920 |
- |
13921 |
-#define YYPACT_NINF -8 |
13922 |
- |
13923 |
-#define yypact_value_is_default(Yystate) \ |
13924 |
- (!!((Yystate) == (-8))) |
13925 |
- |
13926 |
-#define YYTABLE_NINF -1 |
13927 |
- |
13928 |
-#define yytable_value_is_error(Yytable_value) \ |
13929 |
- 0 |
13930 |
- |
13931 |
- /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing |
13932 |
- STATE-NUM. */ |
13933 |
-static const yytype_int8 yypact[] = |
13934 |
-{ |
13935 |
- -7, -1, 0, -8, -4, -8, -8, 3, 2, -3, |
13936 |
- -2, 1, 8, -8, 4, 7, 9, -8 |
13937 |
-}; |
13938 |
- |
13939 |
- /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. |
13940 |
- Performed when YYTABLE does not specify something else to do. Zero |
13941 |
- means the default is an error. */ |
13942 |
-static const yytype_uint8 yydefact[] = |
13943 |
-{ |
13944 |
- 0, 0, 0, 2, 0, 1, 3, 0, 0, 0, |
13945 |
- 0, 0, 0, 4, 0, 0, 0, 5 |
13946 |
-}; |
13947 |
- |
13948 |
- /* YYPGOTO[NTERM-NUM]. */ |
13949 |
-static const yytype_int8 yypgoto[] = |
13950 |
-{ |
13951 |
- -8, -8, 12 |
13952 |
-}; |
13953 |
- |
13954 |
- /* YYDEFGOTO[NTERM-NUM]. */ |
13955 |
-static const yytype_int8 yydefgoto[] = |
13956 |
-{ |
13957 |
- -1, 2, 3 |
13958 |
-}; |
13959 |
- |
13960 |
- /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If |
13961 |
- positive, shift that token. If negative, reduce the rule whose |
13962 |
- number is the opposite. If YYTABLE_NINF, syntax error. */ |
13963 |
-static const yytype_uint8 yytable[] = |
13964 |
-{ |
13965 |
- 5, 10, 1, 11, 4, 7, 8, 12, 13, 1, |
13966 |
- 9, 14, 15, 16, 6, 0, 17 |
13967 |
-}; |
13968 |
- |
13969 |
-static const yytype_int8 yycheck[] = |
13970 |
-{ |
13971 |
- 0, 4, 9, 6, 5, 9, 3, 9, 7, 9, |
13972 |
- 8, 3, 8, 6, 2, -1, 7 |
13973 |
-}; |
13974 |
- |
13975 |
- /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing |
13976 |
- symbol of state STATE-NUM. */ |
13977 |
-static const yytype_uint8 yystos[] = |
13978 |
-{ |
13979 |
- 0, 9, 13, 14, 5, 0, 14, 9, 3, 8, |
13980 |
- 4, 6, 9, 7, 3, 8, 6, 7 |
13981 |
-}; |
13982 |
- |
13983 |
- /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ |
13984 |
-static const yytype_uint8 yyr1[] = |
13985 |
-{ |
13986 |
- 0, 12, 13, 13, 14, 14 |
13987 |
-}; |
13988 |
- |
13989 |
- /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ |
13990 |
-static const yytype_uint8 yyr2[] = |
13991 |
-{ |
13992 |
- 0, 2, 1, 2, 7, 11 |
13993 |
-}; |
13994 |
- |
13995 |
- |
13996 |
-#define yyerrok (yyerrstatus = 0) |
13997 |
-#define yyclearin (yychar = YYEMPTY) |
13998 |
-#define YYEMPTY (-2) |
13999 |
-#define YYEOF 0 |
14000 |
- |
14001 |
-#define YYACCEPT goto yyacceptlab |
14002 |
-#define YYABORT goto yyabortlab |
14003 |
-#define YYERROR goto yyerrorlab |
14004 |
- |
14005 |
- |
14006 |
-#define YYRECOVERING() (!!yyerrstatus) |
14007 |
- |
14008 |
-#define YYBACKUP(Token, Value) \ |
14009 |
- do \ |
14010 |
- if (yychar == YYEMPTY) \ |
14011 |
- { \ |
14012 |
- yychar = (Token); \ |
14013 |
- yylval = (Value); \ |
14014 |
- YYPOPSTACK (yylen); \ |
14015 |
- yystate = *yyssp; \ |
14016 |
- goto yybackup; \ |
14017 |
- } \ |
14018 |
- else \ |
14019 |
- { \ |
14020 |
- yyerror (&yylloc, mc, vm, img_ids, errmsg, scanner, YY_("syntax error: cannot back up")); \ |
14021 |
- YYERROR; \ |
14022 |
- } \ |
14023 |
- while (0) |
14024 |
- |
14025 |
-/* Error token number */ |
14026 |
-#define YYTERROR 1 |
14027 |
-#define YYERRCODE 256 |
14028 |
- |
14029 |
- |
14030 |
-/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. |
14031 |
- If N is 0, then set CURRENT to the empty location which ends |
14032 |
- the previous symbol: RHS[0] (always defined). */ |
14033 |
- |
14034 |
-#ifndef YYLLOC_DEFAULT |
14035 |
-# define YYLLOC_DEFAULT(Current, Rhs, N) \ |
14036 |
- do \ |
14037 |
- if (N) \ |
14038 |
- { \ |
14039 |
- (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ |
14040 |
- (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ |
14041 |
- (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ |
14042 |
- (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ |
14043 |
- } \ |
14044 |
- else \ |
14045 |
- { \ |
14046 |
- (Current).first_line = (Current).last_line = \ |
14047 |
- YYRHSLOC (Rhs, 0).last_line; \ |
14048 |
- (Current).first_column = (Current).last_column = \ |
14049 |
- YYRHSLOC (Rhs, 0).last_column; \ |
14050 |
- } \ |
14051 |
- while (0) |
14052 |
-#endif |
14053 |
- |
14054 |
-#define YYRHSLOC(Rhs, K) ((Rhs)[K]) |
14055 |
- |
14056 |
- |
14057 |
-/* Enable debugging if requested. */ |
14058 |
-#if YYDEBUG |
14059 |
- |
14060 |
-# ifndef YYFPRINTF |
14061 |
-# include <stdio.h> /* INFRINGES ON USER NAME SPACE */ |
14062 |
-# define YYFPRINTF fprintf |
14063 |
-# endif |
14064 |
- |
14065 |
-# define YYDPRINTF(Args) \ |
14066 |
-do { \ |
14067 |
- if (yydebug) \ |
14068 |
- YYFPRINTF Args; \ |
14069 |
-} while (0) |
14070 |
- |
14071 |
- |
14072 |
-/* YY_LOCATION_PRINT -- Print the location on the stream. |
14073 |
- This macro was not mandated originally: define only if we know |
14074 |
- we won't break user code: when these are the locations we know. */ |
14075 |
- |
14076 |
-#ifndef YY_LOCATION_PRINT |
14077 |
-# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL |
14078 |
- |
14079 |
-/* Print *YYLOCP on YYO. Private, do not rely on its existence. */ |
14080 |
- |
14081 |
-YY_ATTRIBUTE_UNUSED |
14082 |
-static int |
14083 |
-yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp) |
14084 |
-{ |
14085 |
- int res = 0; |
14086 |
- int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0; |
14087 |
- if (0 <= yylocp->first_line) |
14088 |
- { |
14089 |
- res += YYFPRINTF (yyo, "%d", yylocp->first_line); |
14090 |
- if (0 <= yylocp->first_column) |
14091 |
- res += YYFPRINTF (yyo, ".%d", yylocp->first_column); |
14092 |
- } |
14093 |
- if (0 <= yylocp->last_line) |
14094 |
- { |
14095 |
- if (yylocp->first_line < yylocp->last_line) |
14096 |
- { |
14097 |
- res += YYFPRINTF (yyo, "-%d", yylocp->last_line); |
14098 |
- if (0 <= end_col) |
14099 |
- res += YYFPRINTF (yyo, ".%d", end_col); |
14100 |
- } |
14101 |
- else if (0 <= end_col && yylocp->first_column < end_col) |
14102 |
- res += YYFPRINTF (yyo, "-%d", end_col); |
14103 |
- } |
14104 |
- return res; |
14105 |
- } |
14106 |
- |
14107 |
-# define YY_LOCATION_PRINT(File, Loc) \ |
14108 |
- yy_location_print_ (File, &(Loc)) |
14109 |
- |
14110 |
-# else |
14111 |
-# define YY_LOCATION_PRINT(File, Loc) ((void) 0) |
14112 |
-# endif |
14113 |
-#endif |
14114 |
- |
14115 |
- |
14116 |
-# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ |
14117 |
-do { \ |
14118 |
- if (yydebug) \ |
14119 |
- { \ |
14120 |
- YYFPRINTF (stderr, "%s ", Title); \ |
14121 |
- yy_symbol_print (stderr, \ |
14122 |
- Type, Value, Location, mc, vm, img_ids, errmsg, scanner); \ |
14123 |
- YYFPRINTF (stderr, "\n"); \ |
14124 |
- } \ |
14125 |
-} while (0) |
14126 |
- |
14127 |
- |
14128 |
-/*-----------------------------------. |
14129 |
-| Print this symbol's value on YYO. | |
14130 |
-`-----------------------------------*/ |
14131 |
- |
14132 |
-static void |
14133 |
-yy_symbol_value_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, mem_collector * mc, VirtualMachine * vm, vector<int> * img_ids, char ** errmsg, yyscan_t scanner) |
14134 |
-{ |
14135 |
- FILE *yyoutput = yyo; |
14136 |
- YYUSE (yyoutput); |
14137 |
- YYUSE (yylocationp); |
14138 |
- YYUSE (mc); |
14139 |
- YYUSE (vm); |
14140 |
- YYUSE (img_ids); |
14141 |
- YYUSE (errmsg); |
14142 |
- YYUSE (scanner); |
14143 |
- if (!yyvaluep) |
14144 |
- return; |
14145 |
-# ifdef YYPRINT |
14146 |
- if (yytype < YYNTOKENS) |
14147 |
- YYPRINT (yyo, yytoknum[yytype], *yyvaluep); |
14148 |
-# endif |
14149 |
- YYUSE (yytype); |
14150 |
-} |
14151 |
- |
14152 |
- |
14153 |
-/*---------------------------. |
14154 |
-| Print this symbol on YYO. | |
14155 |
-`---------------------------*/ |
14156 |
- |
14157 |
-static void |
14158 |
-yy_symbol_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, mem_collector * mc, VirtualMachine * vm, vector<int> * img_ids, char ** errmsg, yyscan_t scanner) |
14159 |
-{ |
14160 |
- YYFPRINTF (yyo, "%s %s (", |
14161 |
- yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); |
14162 |
- |
14163 |
- YY_LOCATION_PRINT (yyo, *yylocationp); |
14164 |
- YYFPRINTF (yyo, ": "); |
14165 |
- yy_symbol_value_print (yyo, yytype, yyvaluep, yylocationp, mc, vm, img_ids, errmsg, scanner); |
14166 |
- YYFPRINTF (yyo, ")"); |
14167 |
-} |
14168 |
- |
14169 |
-/*------------------------------------------------------------------. |
14170 |
-| yy_stack_print -- Print the state stack from its BOTTOM up to its | |
14171 |
-| TOP (included). | |
14172 |
-`------------------------------------------------------------------*/ |
14173 |
- |
14174 |
-static void |
14175 |
-yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) |
14176 |
-{ |
14177 |
- YYFPRINTF (stderr, "Stack now"); |
14178 |
- for (; yybottom <= yytop; yybottom++) |
14179 |
- { |
14180 |
- int yybot = *yybottom; |
14181 |
- YYFPRINTF (stderr, " %d", yybot); |
14182 |
- } |
14183 |
- YYFPRINTF (stderr, "\n"); |
14184 |
-} |
14185 |
- |
14186 |
-# define YY_STACK_PRINT(Bottom, Top) \ |
14187 |
-do { \ |
14188 |
- if (yydebug) \ |
14189 |
- yy_stack_print ((Bottom), (Top)); \ |
14190 |
-} while (0) |
14191 |
- |
14192 |
- |
14193 |
-/*------------------------------------------------. |
14194 |
-| Report that the YYRULE is going to be reduced. | |
14195 |
-`------------------------------------------------*/ |
14196 |
- |
14197 |
-static void |
14198 |
-yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, mem_collector * mc, VirtualMachine * vm, vector<int> * img_ids, char ** errmsg, yyscan_t scanner) |
14199 |
-{ |
14200 |
- unsigned long yylno = yyrline[yyrule]; |
14201 |
- int yynrhs = yyr2[yyrule]; |
14202 |
- int yyi; |
14203 |
- YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", |
14204 |
- yyrule - 1, yylno); |
14205 |
- /* The symbols being reduced. */ |
14206 |
- for (yyi = 0; yyi < yynrhs; yyi++) |
14207 |
- { |
14208 |
- YYFPRINTF (stderr, " $%d = ", yyi + 1); |
14209 |
- yy_symbol_print (stderr, |
14210 |
- yystos[yyssp[yyi + 1 - yynrhs]], |
14211 |
- &yyvsp[(yyi + 1) - (yynrhs)] |
14212 |
- , &(yylsp[(yyi + 1) - (yynrhs)]) , mc, vm, img_ids, errmsg, scanner); |
14213 |
- YYFPRINTF (stderr, "\n"); |
14214 |
- } |
14215 |
-} |
14216 |
- |
14217 |
-# define YY_REDUCE_PRINT(Rule) \ |
14218 |
-do { \ |
14219 |
- if (yydebug) \ |
14220 |
- yy_reduce_print (yyssp, yyvsp, yylsp, Rule, mc, vm, img_ids, errmsg, scanner); \ |
14221 |
-} while (0) |
14222 |
- |
14223 |
-/* Nonzero means print parse trace. It is left uninitialized so that |
14224 |
- multiple parsers can coexist. */ |
14225 |
-int yydebug; |
14226 |
-#else /* !YYDEBUG */ |
14227 |
-# define YYDPRINTF(Args) |
14228 |
-# define YY_SYMBOL_PRINT(Title, Type, Value, Location) |
14229 |
-# define YY_STACK_PRINT(Bottom, Top) |
14230 |
-# define YY_REDUCE_PRINT(Rule) |
14231 |
-#endif /* !YYDEBUG */ |
14232 |
- |
14233 |
- |
14234 |
-/* YYINITDEPTH -- initial size of the parser's stacks. */ |
14235 |
-#ifndef YYINITDEPTH |
14236 |
-# define YYINITDEPTH 200 |
14237 |
-#endif |
14238 |
- |
14239 |
-/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only |
14240 |
- if the built-in stack extension method is used). |
14241 |
- |
14242 |
- Do not make this value too large; the results are undefined if |
14243 |
- YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) |
14244 |
- evaluated with infinite-precision integer arithmetic. */ |
14245 |
- |
14246 |
-#ifndef YYMAXDEPTH |
14247 |
-# define YYMAXDEPTH 10000 |
14248 |
-#endif |
14249 |
- |
14250 |
- |
14251 |
-#if YYERROR_VERBOSE |
14252 |
- |
14253 |
-# ifndef yystrlen |
14254 |
-# if defined __GLIBC__ && defined _STRING_H |
14255 |
-# define yystrlen strlen |
14256 |
-# else |
14257 |
-/* Return the length of YYSTR. */ |
14258 |
-static YYSIZE_T |
14259 |
-yystrlen (const char *yystr) |
14260 |
-{ |
14261 |
- YYSIZE_T yylen; |
14262 |
- for (yylen = 0; yystr[yylen]; yylen++) |
14263 |
- continue; |
14264 |
- return yylen; |
14265 |
-} |
14266 |
-# endif |
14267 |
-# endif |
14268 |
- |
14269 |
-# ifndef yystpcpy |
14270 |
-# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE |
14271 |
-# define yystpcpy stpcpy |
14272 |
-# else |
14273 |
-/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in |
14274 |
- YYDEST. */ |
14275 |
-static char * |
14276 |
-yystpcpy (char *yydest, const char *yysrc) |
14277 |
-{ |
14278 |
- char *yyd = yydest; |
14279 |
- const char *yys = yysrc; |
14280 |
- |
14281 |
- while ((*yyd++ = *yys++) != '\0') |
14282 |
- continue; |
14283 |
- |
14284 |
- return yyd - 1; |
14285 |
-} |
14286 |
-# endif |
14287 |
-# endif |
14288 |
- |
14289 |
-# ifndef yytnamerr |
14290 |
-/* Copy to YYRES the contents of YYSTR after stripping away unnecessary |
14291 |
- quotes and backslashes, so that it's suitable for yyerror. The |
14292 |
- heuristic is that double-quoting is unnecessary unless the string |
14293 |
- contains an apostrophe, a comma, or backslash (other than |
14294 |
- backslash-backslash). YYSTR is taken from yytname. If YYRES is |
14295 |
- null, do not copy; instead, return the length of what the result |
14296 |
- would have been. */ |
14297 |
-static YYSIZE_T |
14298 |
-yytnamerr (char *yyres, const char *yystr) |
14299 |
-{ |
14300 |
- if (*yystr == '"') |
14301 |
- { |
14302 |
- YYSIZE_T yyn = 0; |
14303 |
- char const *yyp = yystr; |
14304 |
- |
14305 |
- for (;;) |
14306 |
- switch (*++yyp) |
14307 |
- { |
14308 |
- case '\'': |
14309 |
- case ',': |
14310 |
- goto do_not_strip_quotes; |
14311 |
- |
14312 |
- case '\\': |
14313 |
- if (*++yyp != '\\') |
14314 |
- goto do_not_strip_quotes; |
14315 |
- else |
14316 |
- goto append; |
14317 |
- |
14318 |
- append: |
14319 |
- default: |
14320 |
- if (yyres) |
14321 |
- yyres[yyn] = *yyp; |
14322 |
- yyn++; |
14323 |
- break; |
14324 |
- |
14325 |
- case '"': |
14326 |
- if (yyres) |
14327 |
- yyres[yyn] = '\0'; |
14328 |
- return yyn; |
14329 |
- } |
14330 |
- do_not_strip_quotes: ; |
14331 |
- } |
14332 |
- |
14333 |
- if (! yyres) |
14334 |
- return yystrlen (yystr); |
14335 |
- |
14336 |
- return (YYSIZE_T) (yystpcpy (yyres, yystr) - yyres); |
14337 |
-} |
14338 |
-# endif |
14339 |
- |
14340 |
-/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message |
14341 |
- about the unexpected token YYTOKEN for the state stack whose top is |
14342 |
- YYSSP. |
14343 |
- |
14344 |
- Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is |
14345 |
- not large enough to hold the message. In that case, also set |
14346 |
- *YYMSG_ALLOC to the required number of bytes. Return 2 if the |
14347 |
- required number of bytes is too large to store. */ |
14348 |
-static int |
14349 |
-yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, |
14350 |
- yytype_int16 *yyssp, int yytoken) |
14351 |
-{ |
14352 |
- YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]); |
14353 |
- YYSIZE_T yysize = yysize0; |
14354 |
- enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; |
14355 |
- /* Internationalized format string. */ |
14356 |
- const char *yyformat = YY_NULLPTR; |
14357 |
- /* Arguments of yyformat. */ |
14358 |
- char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; |
14359 |
- /* Number of reported tokens (one for the "unexpected", one per |
14360 |
- "expected"). */ |
14361 |
- int yycount = 0; |
14362 |
- |
14363 |
- /* There are many possibilities here to consider: |
14364 |
- - If this state is a consistent state with a default action, then |
14365 |
- the only way this function was invoked is if the default action |
14366 |
- is an error action. In that case, don't check for expected |
14367 |
- tokens because there are none. |
14368 |
- - The only way there can be no lookahead present (in yychar) is if |
14369 |
- this state is a consistent state with a default action. Thus, |
14370 |
- detecting the absence of a lookahead is sufficient to determine |
14371 |
- that there is no unexpected or expected token to report. In that |
14372 |
- case, just report a simple "syntax error". |
14373 |
- - Don't assume there isn't a lookahead just because this state is a |
14374 |
- consistent state with a default action. There might have been a |
14375 |
- previous inconsistent state, consistent state with a non-default |
14376 |
- action, or user semantic action that manipulated yychar. |
14377 |
- - Of course, the expected token list depends on states to have |
14378 |
- correct lookahead information, and it depends on the parser not |
14379 |
- to perform extra reductions after fetching a lookahead from the |
14380 |
- scanner and before detecting a syntax error. Thus, state merging |
14381 |
- (from LALR or IELR) and default reductions corrupt the expected |
14382 |
- token list. However, the list is correct for canonical LR with |
14383 |
- one exception: it will still contain any token that will not be |
14384 |
- accepted due to an error action in a later state. |
14385 |
- */ |
14386 |
- if (yytoken != YYEMPTY) |
14387 |
- { |
14388 |
- int yyn = yypact[*yyssp]; |
14389 |
- yyarg[yycount++] = yytname[yytoken]; |
14390 |
- if (!yypact_value_is_default (yyn)) |
14391 |
- { |
14392 |
- /* Start YYX at -YYN if negative to avoid negative indexes in |
14393 |
- YYCHECK. In other words, skip the first -YYN actions for |
14394 |
- this state because they are default actions. */ |
14395 |
- int yyxbegin = yyn < 0 ? -yyn : 0; |
14396 |
- /* Stay within bounds of both yycheck and yytname. */ |
14397 |
- int yychecklim = YYLAST - yyn + 1; |
14398 |
- int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; |
14399 |
- int yyx; |
14400 |
- |
14401 |
- for (yyx = yyxbegin; yyx < yyxend; ++yyx) |
14402 |
- if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR |
14403 |
- && !yytable_value_is_error (yytable[yyx + yyn])) |
14404 |
- { |
14405 |
- if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) |
14406 |
- { |
14407 |
- yycount = 1; |
14408 |
- yysize = yysize0; |
14409 |
- break; |
14410 |
- } |
14411 |
- yyarg[yycount++] = yytname[yyx]; |
14412 |
- { |
14413 |
- YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]); |
14414 |
- if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) |
14415 |
- yysize = yysize1; |
14416 |
- else |
14417 |
- return 2; |
14418 |
- } |
14419 |
- } |
14420 |
- } |
14421 |
- } |
14422 |
- |
14423 |
- switch (yycount) |
14424 |
- { |
14425 |
-# define YYCASE_(N, S) \ |
14426 |
- case N: \ |
14427 |
- yyformat = S; \ |
14428 |
- break |
14429 |
- default: /* Avoid compiler warnings. */ |
14430 |
- YYCASE_(0, YY_("syntax error")); |
14431 |
- YYCASE_(1, YY_("syntax error, unexpected %s")); |
14432 |
- YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); |
14433 |
- YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); |
14434 |
- YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); |
14435 |
- YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); |
14436 |
-# undef YYCASE_ |
14437 |
- } |
14438 |
- |
14439 |
- { |
14440 |
- YYSIZE_T yysize1 = yysize + yystrlen (yyformat); |
14441 |
- if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) |
14442 |
- yysize = yysize1; |
14443 |
- else |
14444 |
- return 2; |
14445 |
- } |
14446 |
- |
14447 |
- if (*yymsg_alloc < yysize) |
14448 |
- { |
14449 |
- *yymsg_alloc = 2 * yysize; |
14450 |
- if (! (yysize <= *yymsg_alloc |
14451 |
- && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) |
14452 |
- *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; |
14453 |
- return 1; |
14454 |
- } |
14455 |
- |
14456 |
- /* Avoid sprintf, as that infringes on the user's name space. |
14457 |
- Don't have undefined behavior even if the translation |
14458 |
- produced a string with the wrong number of "%s"s. */ |
14459 |
- { |
14460 |
- char *yyp = *yymsg; |
14461 |
- int yyi = 0; |
14462 |
- while ((*yyp = *yyformat) != '\0') |
14463 |
- if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) |
14464 |
- { |
14465 |
- yyp += yytnamerr (yyp, yyarg[yyi++]); |
14466 |
- yyformat += 2; |
14467 |
- } |
14468 |
- else |
14469 |
- { |
14470 |
- yyp++; |
14471 |
- yyformat++; |
14472 |
- } |
14473 |
- } |
14474 |
- return 0; |
14475 |
-} |
14476 |
-#endif /* YYERROR_VERBOSE */ |
14477 |
- |
14478 |
-/*-----------------------------------------------. |
14479 |
-| Release the memory associated to this symbol. | |
14480 |
-`-----------------------------------------------*/ |
14481 |
- |
14482 |
-static void |
14483 |
-yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, mem_collector * mc, VirtualMachine * vm, vector<int> * img_ids, char ** errmsg, yyscan_t scanner) |
14484 |
-{ |
14485 |
- YYUSE (yyvaluep); |
14486 |
- YYUSE (yylocationp); |
14487 |
- YYUSE (mc); |
14488 |
- YYUSE (vm); |
14489 |
- YYUSE (img_ids); |
14490 |
- YYUSE (errmsg); |
14491 |
- YYUSE (scanner); |
14492 |
- if (!yymsg) |
14493 |
- yymsg = "Deleting"; |
14494 |
- YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); |
14495 |
- |
14496 |
- YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
14497 |
- YYUSE (yytype); |
14498 |
- YY_IGNORE_MAYBE_UNINITIALIZED_END |
14499 |
-} |
14500 |
- |
14501 |
- |
14502 |
- |
14503 |
- |
14504 |
-/*----------. |
14505 |
-| yyparse. | |
14506 |
-`----------*/ |
14507 |
- |
14508 |
-int |
14509 |
-yyparse (mem_collector * mc, VirtualMachine * vm, vector<int> * img_ids, char ** errmsg, yyscan_t scanner) |
14510 |
-{ |
14511 |
-/* The lookahead symbol. */ |
14512 |
-int yychar; |
14513 |
- |
14514 |
- |
14515 |
-/* The semantic value of the lookahead symbol. */ |
14516 |
-/* Default value used for initialization, for pacifying older GCCs |
14517 |
- or non-GCC compilers. */ |
14518 |
-YY_INITIAL_VALUE (static YYSTYPE yyval_default;) |
14519 |
-YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); |
14520 |
- |
14521 |
-/* Location data for the lookahead symbol. */ |
14522 |
-static YYLTYPE yyloc_default |
14523 |
-# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL |
14524 |
- = { 1, 1, 1, 1 } |
14525 |
-# endif |
14526 |
-; |
14527 |
-YYLTYPE yylloc = yyloc_default; |
14528 |
- |
14529 |
- /* Number of syntax errors so far. */ |
14530 |
- int yynerrs; |
14531 |
- |
14532 |
- int yystate; |
14533 |
- /* Number of tokens to shift before error messages enabled. */ |
14534 |
- int yyerrstatus; |
14535 |
- |
14536 |
- /* The stacks and their tools: |
14537 |
- 'yyss': related to states. |
14538 |
- 'yyvs': related to semantic values. |
14539 |
- 'yyls': related to locations. |
14540 |
- |
14541 |
- Refer to the stacks through separate pointers, to allow yyoverflow |
14542 |
- to reallocate them elsewhere. */ |
14543 |
- |
14544 |
- /* The state stack. */ |
14545 |
- yytype_int16 yyssa[YYINITDEPTH]; |
14546 |
- yytype_int16 *yyss; |
14547 |
- yytype_int16 *yyssp; |
14548 |
- |
14549 |
- /* The semantic value stack. */ |
14550 |
- YYSTYPE yyvsa[YYINITDEPTH]; |
14551 |
- YYSTYPE *yyvs; |
14552 |
- YYSTYPE *yyvsp; |
14553 |
- |
14554 |
- /* The location stack. */ |
14555 |
- YYLTYPE yylsa[YYINITDEPTH]; |
14556 |
- YYLTYPE *yyls; |
14557 |
- YYLTYPE *yylsp; |
14558 |
- |
14559 |
- /* The locations where the error started and ended. */ |
14560 |
- YYLTYPE yyerror_range[3]; |
14561 |
- |
14562 |
- YYSIZE_T yystacksize; |
14563 |
- |
14564 |
- int yyn; |
14565 |
- int yyresult; |
14566 |
- /* Lookahead token as an internal (translated) token number. */ |
14567 |
- int yytoken = 0; |
14568 |
- /* The variables used to return semantic value and location from the |
14569 |
- action routines. */ |
14570 |
- YYSTYPE yyval; |
14571 |
- YYLTYPE yyloc; |
14572 |
- |
14573 |
-#if YYERROR_VERBOSE |
14574 |
- /* Buffer for error messages, and its allocated size. */ |
14575 |
- char yymsgbuf[128]; |
14576 |
- char *yymsg = yymsgbuf; |
14577 |
- YYSIZE_T yymsg_alloc = sizeof yymsgbuf; |
14578 |
-#endif |
14579 |
- |
14580 |
-#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) |
14581 |
- |
14582 |
- /* The number of symbols on the RHS of the reduced rule. |
14583 |
- Keep to zero when no symbol should be popped. */ |
14584 |
- int yylen = 0; |
14585 |
- |
14586 |
- yyssp = yyss = yyssa; |
14587 |
- yyvsp = yyvs = yyvsa; |
14588 |
- yylsp = yyls = yylsa; |
14589 |
- yystacksize = YYINITDEPTH; |
14590 |
- |
14591 |
- YYDPRINTF ((stderr, "Starting parse\n")); |
14592 |
- |
14593 |
- yystate = 0; |
14594 |
- yyerrstatus = 0; |
14595 |
- yynerrs = 0; |
14596 |
- yychar = YYEMPTY; /* Cause a token to be read. */ |
14597 |
- yylsp[0] = yylloc; |
14598 |
- goto yysetstate; |
14599 |
- |
14600 |
- |
14601 |
-/*------------------------------------------------------------. |
14602 |
-| yynewstate -- push a new state, which is found in yystate. | |
14603 |
-`------------------------------------------------------------*/ |
14604 |
-yynewstate: |
14605 |
- /* In all cases, when you get here, the value and location stacks |
14606 |
- have just been pushed. So pushing a state here evens the stacks. */ |
14607 |
- yyssp++; |
14608 |
- |
14609 |
- |
14610 |
-/*--------------------------------------------------------------------. |
14611 |
-| yynewstate -- set current state (the top of the stack) to yystate. | |
14612 |
-`--------------------------------------------------------------------*/ |
14613 |
-yysetstate: |
14614 |
- YYDPRINTF ((stderr, "Entering state %d\n", yystate)); |
14615 |
- YY_ASSERT (0 <= yystate && yystate < YYNSTATES); |
14616 |
- *yyssp = (yytype_int16) yystate; |
14617 |
- |
14618 |
- if (yyss + yystacksize - 1 <= yyssp) |
14619 |
-#if !defined yyoverflow && !defined YYSTACK_RELOCATE |
14620 |
- goto yyexhaustedlab; |
14621 |
-#else |
14622 |
- { |
14623 |
- /* Get the current used size of the three stacks, in elements. */ |
14624 |
- YYSIZE_T yysize = (YYSIZE_T) (yyssp - yyss + 1); |
14625 |
- |
14626 |
-# if defined yyoverflow |
14627 |
- { |
14628 |
- /* Give user a chance to reallocate the stack. Use copies of |
14629 |
- these so that the &'s don't force the real ones into |
14630 |
- memory. */ |
14631 |
- YYSTYPE *yyvs1 = yyvs; |
14632 |
- yytype_int16 *yyss1 = yyss; |
14633 |
- YYLTYPE *yyls1 = yyls; |
14634 |
- |
14635 |
- /* Each stack pointer address is followed by the size of the |
14636 |
- data in use in that stack, in bytes. This used to be a |
14637 |
- conditional around just the two extra args, but that might |
14638 |
- be undefined if yyoverflow is a macro. */ |
14639 |
- yyoverflow (YY_("memory exhausted"), |
14640 |
- &yyss1, yysize * sizeof (*yyssp), |
14641 |
- &yyvs1, yysize * sizeof (*yyvsp), |
14642 |
- &yyls1, yysize * sizeof (*yylsp), |
14643 |
- &yystacksize); |
14644 |
- yyss = yyss1; |
14645 |
- yyvs = yyvs1; |
14646 |
- yyls = yyls1; |
14647 |
- } |
14648 |
-# else /* defined YYSTACK_RELOCATE */ |
14649 |
- /* Extend the stack our own way. */ |
14650 |
- if (YYMAXDEPTH <= yystacksize) |
14651 |
- goto yyexhaustedlab; |
14652 |
- yystacksize *= 2; |
14653 |
- if (YYMAXDEPTH < yystacksize) |
14654 |
- yystacksize = YYMAXDEPTH; |
14655 |
- |
14656 |
- { |
14657 |
- yytype_int16 *yyss1 = yyss; |
14658 |
- union yyalloc *yyptr = |
14659 |
- (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); |
14660 |
- if (! yyptr) |
14661 |
- goto yyexhaustedlab; |
14662 |
- YYSTACK_RELOCATE (yyss_alloc, yyss); |
14663 |
- YYSTACK_RELOCATE (yyvs_alloc, yyvs); |
14664 |
- YYSTACK_RELOCATE (yyls_alloc, yyls); |
14665 |
-# undef YYSTACK_RELOCATE |
14666 |
- if (yyss1 != yyssa) |
14667 |
- YYSTACK_FREE (yyss1); |
14668 |
- } |
14669 |
-# endif |
14670 |
- |
14671 |
- yyssp = yyss + yysize - 1; |
14672 |
- yyvsp = yyvs + yysize - 1; |
14673 |
- yylsp = yyls + yysize - 1; |
14674 |
- |
14675 |
- YYDPRINTF ((stderr, "Stack size increased to %lu\n", |
14676 |
- (unsigned long) yystacksize)); |
14677 |
- |
14678 |
- if (yyss + yystacksize - 1 <= yyssp) |
14679 |
- YYABORT; |
14680 |
- } |
14681 |
-#endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */ |
14682 |
- |
14683 |
- if (yystate == YYFINAL) |
14684 |
- YYACCEPT; |
14685 |
- |
14686 |
- goto yybackup; |
14687 |
- |
14688 |
- |
14689 |
-/*-----------. |
14690 |
-| yybackup. | |
14691 |
-`-----------*/ |
14692 |
-yybackup: |
14693 |
- /* Do appropriate processing given the current state. Read a |
14694 |
- lookahead token if we need one and don't already have one. */ |
14695 |
- |
14696 |
- /* First try to decide what to do without reference to lookahead token. */ |
14697 |
- yyn = yypact[yystate]; |
14698 |
- if (yypact_value_is_default (yyn)) |
14699 |
- goto yydefault; |
14700 |
- |
14701 |
- /* Not known => get a lookahead token if don't already have one. */ |
14702 |
- |
14703 |
- /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ |
14704 |
- if (yychar == YYEMPTY) |
14705 |
- { |
14706 |
- YYDPRINTF ((stderr, "Reading a token: ")); |
14707 |
- yychar = yylex (&yylval, &yylloc, mc, scanner); |
14708 |
- } |
14709 |
- |
14710 |
- if (yychar <= YYEOF) |
14711 |
- { |
14712 |
- yychar = yytoken = YYEOF; |
14713 |
- YYDPRINTF ((stderr, "Now at end of input.\n")); |
14714 |
- } |
14715 |
- else |
14716 |
- { |
14717 |
- yytoken = YYTRANSLATE (yychar); |
14718 |
- YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); |
14719 |
- } |
14720 |
- |
14721 |
- /* If the proper action on seeing token YYTOKEN is to reduce or to |
14722 |
- detect an error, take that action. */ |
14723 |
- yyn += yytoken; |
14724 |
- if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) |
14725 |
- goto yydefault; |
14726 |
- yyn = yytable[yyn]; |
14727 |
- if (yyn <= 0) |
14728 |
- { |
14729 |
- if (yytable_value_is_error (yyn)) |
14730 |
- goto yyerrlab; |
14731 |
- yyn = -yyn; |
14732 |
- goto yyreduce; |
14733 |
- } |
14734 |
- |
14735 |
- /* Count tokens shifted since error; after three, turn off error |
14736 |
- status. */ |
14737 |
- if (yyerrstatus) |
14738 |
- yyerrstatus--; |
14739 |
- |
14740 |
- /* Shift the lookahead token. */ |
14741 |
- YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); |
14742 |
- |
14743 |
- /* Discard the shifted token. */ |
14744 |
- yychar = YYEMPTY; |
14745 |
- |
14746 |
- yystate = yyn; |
14747 |
- YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
14748 |
- *++yyvsp = yylval; |
14749 |
- YY_IGNORE_MAYBE_UNINITIALIZED_END |
14750 |
- *++yylsp = yylloc; |
14751 |
- goto yynewstate; |
14752 |
- |
14753 |
- |
14754 |
-/*-----------------------------------------------------------. |
14755 |
-| yydefault -- do the default action for the current state. | |
14756 |
-`-----------------------------------------------------------*/ |
14757 |
-yydefault: |
14758 |
- yyn = yydefact[yystate]; |
14759 |
- if (yyn == 0) |
14760 |
- goto yyerrlab; |
14761 |
- goto yyreduce; |
14762 |
- |
14763 |
- |
14764 |
-/*-----------------------------. |
14765 |
-| yyreduce -- do a reduction. | |
14766 |
-`-----------------------------*/ |
14767 |
-yyreduce: |
14768 |
- /* yyn is the number of a rule to reduce with. */ |
14769 |
- yylen = yyr2[yyn]; |
14770 |
- |
14771 |
- /* If YYLEN is nonzero, implement the default value of the action: |
14772 |
- '$$ = $1'. |
14773 |
- |
14774 |
- Otherwise, the following line sets YYVAL to garbage. |
14775 |
- This behavior is undocumented and Bison |
14776 |
- users should not rely upon it. Assigning to YYVAL |
14777 |
- unconditionally makes the parser a bit smaller, and it avoids a |
14778 |
- GCC warning that YYVAL may be used uninitialized. */ |
14779 |
- yyval = yyvsp[1-yylen]; |
14780 |
- |
14781 |
- /* Default location. */ |
14782 |
- YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen); |
14783 |
- yyerror_range[1] = yyloc; |
14784 |
- YY_REDUCE_PRINT (yyn); |
14785 |
- switch (yyn) |
14786 |
- { |
14787 |
- case 4: |
14788 |
-#line 235 "vm_file_var_syntax.y" |
14789 |
- { |
14790 |
- string file((yyvsp[-6].val_str)); |
14791 |
- string var1((yyvsp[-4].val_str)); |
14792 |
- string val1((yyvsp[-2].val_str)); |
14793 |
- |
14794 |
- string result; |
14795 |
- |
14796 |
- one_util::toupper(file); |
14797 |
- one_util::toupper(var1); |
14798 |
- |
14799 |
- if (get_image_path(vm, file, var1, val1, "", "", img_ids, result) == -1) |
14800 |
- { |
14801 |
- img_ids->clear(); |
14802 |
- *errmsg = strdup(result.c_str()); |
14803 |
- YYABORT; |
14804 |
- } |
14805 |
- } |
14806 |
-#line 1549 "vm_file_var_syntax.cc" |
14807 |
- break; |
14808 |
- |
14809 |
- case 5: |
14810 |
-#line 253 "vm_file_var_syntax.y" |
14811 |
- { |
14812 |
- string file((yyvsp[-10].val_str)); |
14813 |
- string var1((yyvsp[-8].val_str)); |
14814 |
- string val1((yyvsp[-6].val_str)); |
14815 |
- string var2((yyvsp[-4].val_str)); |
14816 |
- string val2((yyvsp[-2].val_str)); |
14817 |
- |
14818 |
- string result; |
14819 |
- |
14820 |
- one_util::toupper(file); |
14821 |
- one_util::toupper(var1); |
14822 |
- one_util::toupper(var2); |
14823 |
- |
14824 |
- if (get_image_path(vm, file, var1, val1, var2, val2, img_ids, result) == -1) |
14825 |
- { |
14826 |
- img_ids->clear(); |
14827 |
- *errmsg = strdup(result.c_str()); |
14828 |
- YYABORT; |
14829 |
- } |
14830 |
- } |
14831 |
-#line 1574 "vm_file_var_syntax.cc" |
14832 |
- break; |
14833 |
- |
14834 |
- |
14835 |
-#line 1578 "vm_file_var_syntax.cc" |
14836 |
- |
14837 |
- default: break; |
14838 |
- } |
14839 |
- /* User semantic actions sometimes alter yychar, and that requires |
14840 |
- that yytoken be updated with the new translation. We take the |
14841 |
- approach of translating immediately before every use of yytoken. |
14842 |
- One alternative is translating here after every semantic action, |
14843 |
- but that translation would be missed if the semantic action invokes |
14844 |
- YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or |
14845 |
- if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an |
14846 |
- incorrect destructor might then be invoked immediately. In the |
14847 |
- case of YYERROR or YYBACKUP, subsequent parser actions might lead |
14848 |
- to an incorrect destructor call or verbose syntax error message |
14849 |
- before the lookahead is translated. */ |
14850 |
- YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); |
14851 |
- |
14852 |
- YYPOPSTACK (yylen); |
14853 |
- yylen = 0; |
14854 |
- YY_STACK_PRINT (yyss, yyssp); |
14855 |
- |
14856 |
- *++yyvsp = yyval; |
14857 |
- *++yylsp = yyloc; |
14858 |
- |
14859 |
- /* Now 'shift' the result of the reduction. Determine what state |
14860 |
- that goes to, based on the state we popped back to and the rule |
14861 |
- number reduced by. */ |
14862 |
- { |
14863 |
- const int yylhs = yyr1[yyn] - YYNTOKENS; |
14864 |
- const int yyi = yypgoto[yylhs] + *yyssp; |
14865 |
- yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp |
14866 |
- ? yytable[yyi] |
14867 |
- : yydefgoto[yylhs]); |
14868 |
- } |
14869 |
- |
14870 |
- goto yynewstate; |
14871 |
- |
14872 |
- |
14873 |
-/*--------------------------------------. |
14874 |
-| yyerrlab -- here on detecting error. | |
14875 |
-`--------------------------------------*/ |
14876 |
-yyerrlab: |
14877 |
- /* Make sure we have latest lookahead translation. See comments at |
14878 |
- user semantic actions for why this is necessary. */ |
14879 |
- yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); |
14880 |
- |
14881 |
- /* If not already recovering from an error, report this error. */ |
14882 |
- if (!yyerrstatus) |
14883 |
- { |
14884 |
- ++yynerrs; |
14885 |
-#if ! YYERROR_VERBOSE |
14886 |
- yyerror (&yylloc, mc, vm, img_ids, errmsg, scanner, YY_("syntax error")); |
14887 |
-#else |
14888 |
-# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ |
14889 |
- yyssp, yytoken) |
14890 |
- { |
14891 |
- char const *yymsgp = YY_("syntax error"); |
14892 |
- int yysyntax_error_status; |
14893 |
- yysyntax_error_status = YYSYNTAX_ERROR; |
14894 |
- if (yysyntax_error_status == 0) |
14895 |
- yymsgp = yymsg; |
14896 |
- else if (yysyntax_error_status == 1) |
14897 |
- { |
14898 |
- if (yymsg != yymsgbuf) |
14899 |
- YYSTACK_FREE (yymsg); |
14900 |
- yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); |
14901 |
- if (!yymsg) |
14902 |
- { |
14903 |
- yymsg = yymsgbuf; |
14904 |
- yymsg_alloc = sizeof yymsgbuf; |
14905 |
- yysyntax_error_status = 2; |
14906 |
- } |
14907 |
- else |
14908 |
- { |
14909 |
- yysyntax_error_status = YYSYNTAX_ERROR; |
14910 |
- yymsgp = yymsg; |
14911 |
- } |
14912 |
- } |
14913 |
- yyerror (&yylloc, mc, vm, img_ids, errmsg, scanner, yymsgp); |
14914 |
- if (yysyntax_error_status == 2) |
14915 |
- goto yyexhaustedlab; |
14916 |
- } |
14917 |
-# undef YYSYNTAX_ERROR |
14918 |
-#endif |
14919 |
- } |
14920 |
- |
14921 |
- yyerror_range[1] = yylloc; |
14922 |
- |
14923 |
- if (yyerrstatus == 3) |
14924 |
- { |
14925 |
- /* If just tried and failed to reuse lookahead token after an |
14926 |
- error, discard it. */ |
14927 |
- |
14928 |
- if (yychar <= YYEOF) |
14929 |
- { |
14930 |
- /* Return failure if at end of input. */ |
14931 |
- if (yychar == YYEOF) |
14932 |
- YYABORT; |
14933 |
- } |
14934 |
- else |
14935 |
- { |
14936 |
- yydestruct ("Error: discarding", |
14937 |
- yytoken, &yylval, &yylloc, mc, vm, img_ids, errmsg, scanner); |
14938 |
- yychar = YYEMPTY; |
14939 |
- } |
14940 |
- } |
14941 |
- |
14942 |
- /* Else will try to reuse lookahead token after shifting the error |
14943 |
- token. */ |
14944 |
- goto yyerrlab1; |
14945 |
- |
14946 |
- |
14947 |
-/*---------------------------------------------------. |
14948 |
-| yyerrorlab -- error raised explicitly by YYERROR. | |
14949 |
-`---------------------------------------------------*/ |
14950 |
-yyerrorlab: |
14951 |
- /* Pacify compilers when the user code never invokes YYERROR and the |
14952 |
- label yyerrorlab therefore never appears in user code. */ |
14953 |
- if (0) |
14954 |
- YYERROR; |
14955 |
- |
14956 |
- /* Do not reclaim the symbols of the rule whose action triggered |
14957 |
- this YYERROR. */ |
14958 |
- YYPOPSTACK (yylen); |
14959 |
- yylen = 0; |
14960 |
- YY_STACK_PRINT (yyss, yyssp); |
14961 |
- yystate = *yyssp; |
14962 |
- goto yyerrlab1; |
14963 |
- |
14964 |
- |
14965 |
-/*-------------------------------------------------------------. |
14966 |
-| yyerrlab1 -- common code for both syntax error and YYERROR. | |
14967 |
-`-------------------------------------------------------------*/ |
14968 |
-yyerrlab1: |
14969 |
- yyerrstatus = 3; /* Each real token shifted decrements this. */ |
14970 |
- |
14971 |
- for (;;) |
14972 |
- { |
14973 |
- yyn = yypact[yystate]; |
14974 |
- if (!yypact_value_is_default (yyn)) |
14975 |
- { |
14976 |
- yyn += YYTERROR; |
14977 |
- if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) |
14978 |
- { |
14979 |
- yyn = yytable[yyn]; |
14980 |
- if (0 < yyn) |
14981 |
- break; |
14982 |
- } |
14983 |
- } |
14984 |
- |
14985 |
- /* Pop the current state because it cannot handle the error token. */ |
14986 |
- if (yyssp == yyss) |
14987 |
- YYABORT; |
14988 |
- |
14989 |
- yyerror_range[1] = *yylsp; |
14990 |
- yydestruct ("Error: popping", |
14991 |
- yystos[yystate], yyvsp, yylsp, mc, vm, img_ids, errmsg, scanner); |
14992 |
- YYPOPSTACK (1); |
14993 |
- yystate = *yyssp; |
14994 |
- YY_STACK_PRINT (yyss, yyssp); |
14995 |
- } |
14996 |
- |
14997 |
- YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
14998 |
- *++yyvsp = yylval; |
14999 |
- YY_IGNORE_MAYBE_UNINITIALIZED_END |
15000 |
- |
15001 |
- yyerror_range[2] = yylloc; |
15002 |
- /* Using YYLLOC is tempting, but would change the location of |
15003 |
- the lookahead. YYLOC is available though. */ |
15004 |
- YYLLOC_DEFAULT (yyloc, yyerror_range, 2); |
15005 |
- *++yylsp = yyloc; |
15006 |
- |
15007 |
- /* Shift the error token. */ |
15008 |
- YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); |
15009 |
- |
15010 |
- yystate = yyn; |
15011 |
- goto yynewstate; |
15012 |
- |
15013 |
- |
15014 |
-/*-------------------------------------. |
15015 |
-| yyacceptlab -- YYACCEPT comes here. | |
15016 |
-`-------------------------------------*/ |
15017 |
-yyacceptlab: |
15018 |
- yyresult = 0; |
15019 |
- goto yyreturn; |
15020 |
- |
15021 |
- |
15022 |
-/*-----------------------------------. |
15023 |
-| yyabortlab -- YYABORT comes here. | |
15024 |
-`-----------------------------------*/ |
15025 |
-yyabortlab: |
15026 |
- yyresult = 1; |
15027 |
- goto yyreturn; |
15028 |
- |
15029 |
- |
15030 |
-#if !defined yyoverflow || YYERROR_VERBOSE |
15031 |
-/*-------------------------------------------------. |
15032 |
-| yyexhaustedlab -- memory exhaustion comes here. | |
15033 |
-`-------------------------------------------------*/ |
15034 |
-yyexhaustedlab: |
15035 |
- yyerror (&yylloc, mc, vm, img_ids, errmsg, scanner, YY_("memory exhausted")); |
15036 |
- yyresult = 2; |
15037 |
- /* Fall through. */ |
15038 |
-#endif |
15039 |
- |
15040 |
- |
15041 |
-/*-----------------------------------------------------. |
15042 |
-| yyreturn -- parsing is finished, return the result. | |
15043 |
-`-----------------------------------------------------*/ |
15044 |
-yyreturn: |
15045 |
- if (yychar != YYEMPTY) |
15046 |
- { |
15047 |
- /* Make sure we have latest lookahead translation. See comments at |
15048 |
- user semantic actions for why this is necessary. */ |
15049 |
- yytoken = YYTRANSLATE (yychar); |
15050 |
- yydestruct ("Cleanup: discarding lookahead", |
15051 |
- yytoken, &yylval, &yylloc, mc, vm, img_ids, errmsg, scanner); |
15052 |
- } |
15053 |
- /* Do not reclaim the symbols of the rule whose action triggered |
15054 |
- this YYABORT or YYACCEPT. */ |
15055 |
- YYPOPSTACK (yylen); |
15056 |
- YY_STACK_PRINT (yyss, yyssp); |
15057 |
- while (yyssp != yyss) |
15058 |
- { |
15059 |
- yydestruct ("Cleanup: popping", |
15060 |
- yystos[*yyssp], yyvsp, yylsp, mc, vm, img_ids, errmsg, scanner); |
15061 |
- YYPOPSTACK (1); |
15062 |
- } |
15063 |
-#ifndef yyoverflow |
15064 |
- if (yyss != yyssa) |
15065 |
- YYSTACK_FREE (yyss); |
15066 |
-#endif |
15067 |
-#if YYERROR_VERBOSE |
15068 |
- if (yymsg != yymsgbuf) |
15069 |
- YYSTACK_FREE (yymsg); |
15070 |
-#endif |
15071 |
- return yyresult; |
15072 |
-} |
15073 |
-#line 274 "vm_file_var_syntax.y" |
15074 |
- |
15075 |
- |
15076 |
-void vm_file_var_error( |
15077 |
- YYLTYPE * llocp, |
15078 |
- mem_collector * mc, |
15079 |
- VirtualMachine * vm, |
15080 |
- vector<int> * img_ids, |
15081 |
- char ** error_msg, |
15082 |
- yyscan_t scanner, |
15083 |
- const char * str) |
15084 |
-{ |
15085 |
- int length; |
15086 |
- |
15087 |
- length = strlen(str)+ 64; |
15088 |
- |
15089 |
- *error_msg = (char *) malloc(sizeof(char)*length); |
15090 |
- |
15091 |
- if (*error_msg != 0) |
15092 |
- { |
15093 |
- snprintf(*error_msg, |
15094 |
- length, |
15095 |
- "%s at line %i, columns %i:%i", |
15096 |
- str, |
15097 |
- llocp->first_line, |
15098 |
- llocp->first_column, |
15099 |
- llocp->last_column); |
15100 |
- } |
15101 |
-} |
15102 |
|
15103 |
diff --git a/app-emulation/opennebula/files/opennebula-5.10.1/parsers/vm_file_var_syntax.h b/app-emulation/opennebula/files/opennebula-5.10.1/parsers/vm_file_var_syntax.h |
15104 |
deleted file mode 100644 |
15105 |
index bfa01d3..0000000 |
15106 |
--- a/app-emulation/opennebula/files/opennebula-5.10.1/parsers/vm_file_var_syntax.h |
15107 |
+++ /dev/null |
15108 |
@@ -1,125 +0,0 @@ |
15109 |
-/* A Bison parser, made by GNU Bison 3.4.1. */ |
15110 |
- |
15111 |
-/* Bison interface for Yacc-like parsers in C |
15112 |
- |
15113 |
- Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2019 Free Software Foundation, |
15114 |
- Inc. |
15115 |
- |
15116 |
- This program is free software: you can redistribute it and/or modify |
15117 |
- it under the terms of the GNU General Public License as published by |
15118 |
- the Free Software Foundation, either version 3 of the License, or |
15119 |
- (at your option) any later version. |
15120 |
- |
15121 |
- This program is distributed in the hope that it will be useful, |
15122 |
- but WITHOUT ANY WARRANTY; without even the implied warranty of |
15123 |
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
15124 |
- GNU General Public License for more details. |
15125 |
- |
15126 |
- You should have received a copy of the GNU General Public License |
15127 |
- along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
15128 |
- |
15129 |
-/* As a special exception, you may create a larger work that contains |
15130 |
- part or all of the Bison parser skeleton and distribute that work |
15131 |
- under terms of your choice, so long as that work isn't itself a |
15132 |
- parser generator using the skeleton or a modified version thereof |
15133 |
- as a parser skeleton. Alternatively, if you modify or redistribute |
15134 |
- the parser skeleton itself, you may (at your option) remove this |
15135 |
- special exception, which will cause the skeleton and the resulting |
15136 |
- Bison output files to be licensed under the GNU General Public |
15137 |
- License without this special exception. |
15138 |
- |
15139 |
- This special exception was added by the Free Software Foundation in |
15140 |
- version 2.2 of Bison. */ |
15141 |
- |
15142 |
-/* Undocumented macros, especially those whose name start with YY_, |
15143 |
- are private implementation details. Do not rely on them. */ |
15144 |
- |
15145 |
-#ifndef YY_VM_FILE_VAR_VM_FILE_VAR_SYNTAX_HH_INCLUDED |
15146 |
-# define YY_VM_FILE_VAR_VM_FILE_VAR_SYNTAX_HH_INCLUDED |
15147 |
-/* Debug traces. */ |
15148 |
-#ifndef YYDEBUG |
15149 |
-# define YYDEBUG 0 |
15150 |
-#endif |
15151 |
-#if YYDEBUG |
15152 |
-extern int vm_file_var_debug; |
15153 |
-#endif |
15154 |
-/* "%code requires" blocks. */ |
15155 |
-#line 17 "vm_file_var_syntax.y" |
15156 |
- |
15157 |
-#include <iostream> |
15158 |
-#include <vector> |
15159 |
-#include <string> |
15160 |
-#include <map> |
15161 |
-#include <algorithm> |
15162 |
- |
15163 |
-#include <ctype.h> |
15164 |
-#include <string.h> |
15165 |
- |
15166 |
-#include "ImagePool.h" |
15167 |
-#include "UserPool.h" |
15168 |
-#include "VirtualMachine.h" |
15169 |
-#include "Nebula.h" |
15170 |
- |
15171 |
-#include "mem_collector.h" |
15172 |
- |
15173 |
-typedef void * yyscan_t; |
15174 |
- |
15175 |
-int vm_file_var_parse (VirtualMachine * vm, vector<int> * img_ids, |
15176 |
- char ** errmsg, yyscan_t scanner); |
15177 |
- |
15178 |
-#line 71 "vm_file_var_syntax.hh" |
15179 |
- |
15180 |
-/* Token type. */ |
15181 |
-#ifndef YYTOKENTYPE |
15182 |
-# define YYTOKENTYPE |
15183 |
- enum yytokentype |
15184 |
- { |
15185 |
- EQUAL = 258, |
15186 |
- COMMA = 259, |
15187 |
- OBRACKET = 260, |
15188 |
- CBRACKET = 261, |
15189 |
- EOA = 262, |
15190 |
- STRING = 263, |
15191 |
- VARIABLE = 264, |
15192 |
- RSTRING = 265, |
15193 |
- INTEGER = 266 |
15194 |
- }; |
15195 |
-#endif |
15196 |
- |
15197 |
-/* Value type. */ |
15198 |
-#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED |
15199 |
-union YYSTYPE |
15200 |
-{ |
15201 |
-#line 205 "vm_file_var_syntax.y" |
15202 |
- |
15203 |
- char * val_str; |
15204 |
- int val_int; |
15205 |
- char val_char; |
15206 |
- |
15207 |
-#line 100 "vm_file_var_syntax.hh" |
15208 |
- |
15209 |
-}; |
15210 |
-typedef union YYSTYPE YYSTYPE; |
15211 |
-# define YYSTYPE_IS_TRIVIAL 1 |
15212 |
-# define YYSTYPE_IS_DECLARED 1 |
15213 |
-#endif |
15214 |
- |
15215 |
-/* Location type. */ |
15216 |
-#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED |
15217 |
-typedef struct YYLTYPE YYLTYPE; |
15218 |
-struct YYLTYPE |
15219 |
-{ |
15220 |
- int first_line; |
15221 |
- int first_column; |
15222 |
- int last_line; |
15223 |
- int last_column; |
15224 |
-}; |
15225 |
-# define YYLTYPE_IS_DECLARED 1 |
15226 |
-# define YYLTYPE_IS_TRIVIAL 1 |
15227 |
-#endif |
15228 |
- |
15229 |
- |
15230 |
- |
15231 |
-int vm_file_var_parse (mem_collector * mc, VirtualMachine * vm, vector<int> * img_ids, char ** errmsg, yyscan_t scanner); |
15232 |
- |
15233 |
-#endif /* !YY_VM_FILE_VAR_VM_FILE_VAR_SYNTAX_HH_INCLUDED */ |
15234 |
|
15235 |
diff --git a/app-emulation/opennebula/files/opennebula-5.10.1/parsers/vm_file_var_syntax.y b/app-emulation/opennebula/files/opennebula-5.10.1/parsers/vm_file_var_syntax.y |
15236 |
deleted file mode 100644 |
15237 |
index 6639a72..0000000 |
15238 |
--- a/app-emulation/opennebula/files/opennebula-5.10.1/parsers/vm_file_var_syntax.y |
15239 |
+++ /dev/null |
15240 |
@@ -1,301 +0,0 @@ |
15241 |
-/* -------------------------------------------------------------------------- */ |
15242 |
-/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */ |
15243 |
-/* */ |
15244 |
-/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ |
15245 |
-/* not use this file except in compliance with the License. You may obtain */ |
15246 |
-/* a copy of the License at */ |
15247 |
-/* */ |
15248 |
-/* http://www.apache.org/licenses/LICENSE-2.0 */ |
15249 |
-/* */ |
15250 |
-/* Unless required by applicable law or agreed to in writing, software */ |
15251 |
-/* distributed under the License is distributed on an "AS IS" BASIS, */ |
15252 |
-/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ |
15253 |
-/* See the License for the specific language governing permissions and */ |
15254 |
-/* limitations under the License. */ |
15255 |
-/* -------------------------------------------------------------------------- */ |
15256 |
- |
15257 |
-%code requires { |
15258 |
-#include <iostream> |
15259 |
-#include <vector> |
15260 |
-#include <string> |
15261 |
-#include <map> |
15262 |
-#include <algorithm> |
15263 |
- |
15264 |
-#include <ctype.h> |
15265 |
-#include <string.h> |
15266 |
- |
15267 |
-#include "ImagePool.h" |
15268 |
-#include "UserPool.h" |
15269 |
-#include "VirtualMachine.h" |
15270 |
-#include "Nebula.h" |
15271 |
- |
15272 |
-#include "mem_collector.h" |
15273 |
- |
15274 |
-typedef void * yyscan_t; |
15275 |
- |
15276 |
-int vm_file_var_parse (VirtualMachine * vm, vector<int> * img_ids, |
15277 |
- char ** errmsg, yyscan_t scanner); |
15278 |
-} |
15279 |
- |
15280 |
-%{ |
15281 |
-#include "vm_file_var_syntax.h" |
15282 |
-#include "vm_var_parser.h" |
15283 |
- |
15284 |
-#define YYERROR_VERBOSE |
15285 |
-#define vm_file_var_lex vm_var_lex |
15286 |
- |
15287 |
-void vm_file_var_error(YYLTYPE * llocp, mem_collector * mc, VirtualMachine * vm, |
15288 |
- vector<int> * img_ids, char ** errmsg, yyscan_t scanner, const char * str); |
15289 |
- |
15290 |
-int vm_var_lex(YYSTYPE *lvalp, YYLTYPE *llocp, mem_collector * mc, |
15291 |
- yyscan_t scanner); |
15292 |
- |
15293 |
-int vm_file_var_parse (VirtualMachine * vm, vector<int> * img_ids, |
15294 |
- char ** errmsg, yyscan_t scanner) |
15295 |
-{ |
15296 |
- mem_collector mc; |
15297 |
- int rc; |
15298 |
- |
15299 |
- mem_collector_init(&mc); |
15300 |
- |
15301 |
- rc = vm_file_var_parse(&mc, vm, img_ids, errmsg, scanner); |
15302 |
- |
15303 |
- mem_collector_cleanup(&mc); |
15304 |
- |
15305 |
- return rc; |
15306 |
-} |
15307 |
- |
15308 |
-/* -------------------------------------------------------------------------- */ |
15309 |
-/* -------------------------------------------------------------------------- */ |
15310 |
- |
15311 |
-int get_image_path(VirtualMachine * vm, |
15312 |
- const string& var_name, |
15313 |
- const string& var1, |
15314 |
- const string& val1, |
15315 |
- const string& var2, |
15316 |
- const string& val2, |
15317 |
- vector<int> * img_ids, |
15318 |
- string& error_str) |
15319 |
-{ |
15320 |
- Nebula& nd = Nebula::instance(); |
15321 |
- |
15322 |
- ImagePool * ipool = nd.get_ipool(); |
15323 |
- UserPool * upool = nd.get_upool(); |
15324 |
- Image * img = 0; |
15325 |
- User * user = 0; |
15326 |
- int iid = -1; |
15327 |
- |
15328 |
- PoolObjectAuth perm; |
15329 |
- |
15330 |
- if (var_name != "FILE" ) |
15331 |
- { |
15332 |
- error_str = "Must use FILE variable for attribute."; |
15333 |
- return -1; |
15334 |
- } |
15335 |
- |
15336 |
- if ( var1 == "IMAGE" ) |
15337 |
- { |
15338 |
- int uid = vm->get_uid(); |
15339 |
- |
15340 |
- if ( !var2.empty() ) |
15341 |
- { |
15342 |
- VectorAttribute * vfile; |
15343 |
- map<string,string> file_values; |
15344 |
- |
15345 |
- file_values.insert(make_pair(var1, val1)); |
15346 |
- file_values.insert(make_pair(var2, val2)); |
15347 |
- |
15348 |
- vfile = new VectorAttribute("FILE", file_values); |
15349 |
- |
15350 |
- VirtualMachineDisk file_disk(vfile, 0); |
15351 |
- uid = file_disk.get_uid(uid); |
15352 |
- |
15353 |
- delete vfile; |
15354 |
- } |
15355 |
- |
15356 |
- img = ipool->get_ro(val1, uid); |
15357 |
- |
15358 |
- if ( img == 0 ) |
15359 |
- { |
15360 |
- ostringstream oss; |
15361 |
- oss << "User " << uid << " does not own an image with name: " << val1 |
15362 |
- << " . Set IMAGE_UNAME or IMAGE_UID of owner."; |
15363 |
- |
15364 |
- error_str = oss.str(); |
15365 |
- |
15366 |
- return -1; |
15367 |
- } |
15368 |
- } |
15369 |
- else if ( var1 == "IMAGE_ID" ) |
15370 |
- { |
15371 |
- istringstream is(val1); |
15372 |
- |
15373 |
- is >> iid; |
15374 |
- |
15375 |
- if ( !is.fail() ) |
15376 |
- { |
15377 |
- img = ipool->get_ro(iid); |
15378 |
- } |
15379 |
- |
15380 |
- if ( img == 0 ) |
15381 |
- { |
15382 |
- ostringstream oss; |
15383 |
- oss << "Image with ID: " << iid << " does not exist"; |
15384 |
- |
15385 |
- error_str = oss.str(); |
15386 |
- |
15387 |
- return -1; |
15388 |
- } |
15389 |
- } |
15390 |
- else |
15391 |
- { |
15392 |
- error_str = "Cannot get image, set IMAGE_ID or IMAGE."; |
15393 |
- return -1; |
15394 |
- } |
15395 |
- |
15396 |
- iid = img->get_oid(); |
15397 |
- |
15398 |
- img->get_permissions(perm); |
15399 |
- |
15400 |
- img->unlock();; |
15401 |
- |
15402 |
- set<int> gids; |
15403 |
- |
15404 |
- user = upool->get_ro(vm->get_uid()); |
15405 |
- |
15406 |
- if (user != 0) |
15407 |
- { |
15408 |
- gids = user->get_groups(); |
15409 |
- user->unlock(); |
15410 |
- } |
15411 |
- else |
15412 |
- { |
15413 |
- gids.insert(vm->get_gid()); |
15414 |
- } |
15415 |
- |
15416 |
- AuthRequest ar(vm->get_uid(), gids); |
15417 |
- |
15418 |
- ar.add_auth(AuthRequest::USE, perm); |
15419 |
- |
15420 |
- if (UserPool::authorize(ar) == -1) |
15421 |
- { |
15422 |
- error_str = "User not authorize to use image."; |
15423 |
- return -1; |
15424 |
- } |
15425 |
- |
15426 |
- img_ids->push_back(iid); |
15427 |
- |
15428 |
- return 0; |
15429 |
-} |
15430 |
- |
15431 |
-/* -------------------------------------------------------------------------- */ |
15432 |
-/* -------------------------------------------------------------------------- */ |
15433 |
- |
15434 |
-%} |
15435 |
- |
15436 |
-%parse-param {mem_collector * mc} |
15437 |
-%parse-param {VirtualMachine * vm} |
15438 |
-%parse-param {vector<int> * img_ids} |
15439 |
-%parse-param {char ** errmsg} |
15440 |
-%parse-param {yyscan_t scanner} |
15441 |
- |
15442 |
-%lex-param {mem_collector * mc} |
15443 |
-%lex-param {yyscan_t scanner} |
15444 |
- |
15445 |
-%union { |
15446 |
- char * val_str; |
15447 |
- int val_int; |
15448 |
- char val_char; |
15449 |
-}; |
15450 |
- |
15451 |
-%defines |
15452 |
-%locations |
15453 |
-%pure-parser |
15454 |
-%name-prefix "vm_file_var_" |
15455 |
-%output "vm_file_var_syntax.cc" |
15456 |
- |
15457 |
-%token EQUAL COMMA OBRACKET CBRACKET |
15458 |
- |
15459 |
-%token <val_char> EOA |
15460 |
-%token <val_str> STRING |
15461 |
-%token <val_str> VARIABLE |
15462 |
-%token <val_str> RSTRING |
15463 |
-%token <val_int> INTEGER |
15464 |
-%type <void> vm_variable |
15465 |
-%type <void> vm_string |
15466 |
- |
15467 |
-%% |
15468 |
- |
15469 |
-vm_string: vm_variable |
15470 |
- | vm_string vm_variable |
15471 |
- ; |
15472 |
- |
15473 |
-vm_variable: |
15474 |
- VARIABLE OBRACKET VARIABLE EQUAL STRING CBRACKET EOA |
15475 |
- { |
15476 |
- string file($1); |
15477 |
- string var1($3); |
15478 |
- string val1($5); |
15479 |
- |
15480 |
- string result; |
15481 |
- |
15482 |
- one_util::toupper(file); |
15483 |
- one_util::toupper(var1); |
15484 |
- |
15485 |
- if (get_image_path(vm, file, var1, val1, "", "", img_ids, result) == -1) |
15486 |
- { |
15487 |
- img_ids->clear(); |
15488 |
- *errmsg = strdup(result.c_str()); |
15489 |
- YYABORT; |
15490 |
- } |
15491 |
- } |
15492 |
- | VARIABLE OBRACKET VARIABLE EQUAL STRING COMMA VARIABLE EQUAL STRING CBRACKET EOA |
15493 |
- { |
15494 |
- string file($1); |
15495 |
- string var1($3); |
15496 |
- string val1($5); |
15497 |
- string var2($7); |
15498 |
- string val2($9); |
15499 |
- |
15500 |
- string result; |
15501 |
- |
15502 |
- one_util::toupper(file); |
15503 |
- one_util::toupper(var1); |
15504 |
- one_util::toupper(var2); |
15505 |
- |
15506 |
- if (get_image_path(vm, file, var1, val1, var2, val2, img_ids, result) == -1) |
15507 |
- { |
15508 |
- img_ids->clear(); |
15509 |
- *errmsg = strdup(result.c_str()); |
15510 |
- YYABORT; |
15511 |
- } |
15512 |
- } |
15513 |
- ; |
15514 |
-%% |
15515 |
- |
15516 |
-void vm_file_var_error( |
15517 |
- YYLTYPE * llocp, |
15518 |
- mem_collector * mc, |
15519 |
- VirtualMachine * vm, |
15520 |
- vector<int> * img_ids, |
15521 |
- char ** error_msg, |
15522 |
- yyscan_t scanner, |
15523 |
- const char * str) |
15524 |
-{ |
15525 |
- int length; |
15526 |
- |
15527 |
- length = strlen(str)+ 64; |
15528 |
- |
15529 |
- *error_msg = (char *) malloc(sizeof(char)*length); |
15530 |
- |
15531 |
- if (*error_msg != 0) |
15532 |
- { |
15533 |
- snprintf(*error_msg, |
15534 |
- length, |
15535 |
- "%s at line %i, columns %i:%i", |
15536 |
- str, |
15537 |
- llocp->first_line, |
15538 |
- llocp->first_column, |
15539 |
- llocp->last_column); |
15540 |
- } |
15541 |
-} |
15542 |
|
15543 |
diff --git a/app-emulation/opennebula/files/opennebula-5.10.1/parsers/vm_var_parser.cc b/app-emulation/opennebula/files/opennebula-5.10.1/parsers/vm_var_parser.cc |
15544 |
deleted file mode 100644 |
15545 |
index 0d94e81..0000000 |
15546 |
--- a/app-emulation/opennebula/files/opennebula-5.10.1/parsers/vm_var_parser.cc |
15547 |
+++ /dev/null |
15548 |
@@ -1,2319 +0,0 @@ |
15549 |
-#line 1 "vm_var_parser.cc" |
15550 |
- |
15551 |
-#line 3 "vm_var_parser.cc" |
15552 |
- |
15553 |
-#define YY_INT_ALIGNED short int |
15554 |
- |
15555 |
-/* A lexical scanner generated by flex */ |
15556 |
- |
15557 |
-#define FLEX_SCANNER |
15558 |
-#define YY_FLEX_MAJOR_VERSION 2 |
15559 |
-#define YY_FLEX_MINOR_VERSION 6 |
15560 |
-#define YY_FLEX_SUBMINOR_VERSION 4 |
15561 |
-#if YY_FLEX_SUBMINOR_VERSION > 0 |
15562 |
-#define FLEX_BETA |
15563 |
-#endif |
15564 |
- |
15565 |
-#ifdef yy_create_buffer |
15566 |
-#define vm_var__create_buffer_ALREADY_DEFINED |
15567 |
-#else |
15568 |
-#define yy_create_buffer vm_var__create_buffer |
15569 |
-#endif |
15570 |
- |
15571 |
-#ifdef yy_delete_buffer |
15572 |
-#define vm_var__delete_buffer_ALREADY_DEFINED |
15573 |
-#else |
15574 |
-#define yy_delete_buffer vm_var__delete_buffer |
15575 |
-#endif |
15576 |
- |
15577 |
-#ifdef yy_scan_buffer |
15578 |
-#define vm_var__scan_buffer_ALREADY_DEFINED |
15579 |
-#else |
15580 |
-#define yy_scan_buffer vm_var__scan_buffer |
15581 |
-#endif |
15582 |
- |
15583 |
-#ifdef yy_scan_string |
15584 |
-#define vm_var__scan_string_ALREADY_DEFINED |
15585 |
-#else |
15586 |
-#define yy_scan_string vm_var__scan_string |
15587 |
-#endif |
15588 |
- |
15589 |
-#ifdef yy_scan_bytes |
15590 |
-#define vm_var__scan_bytes_ALREADY_DEFINED |
15591 |
-#else |
15592 |
-#define yy_scan_bytes vm_var__scan_bytes |
15593 |
-#endif |
15594 |
- |
15595 |
-#ifdef yy_init_buffer |
15596 |
-#define vm_var__init_buffer_ALREADY_DEFINED |
15597 |
-#else |
15598 |
-#define yy_init_buffer vm_var__init_buffer |
15599 |
-#endif |
15600 |
- |
15601 |
-#ifdef yy_flush_buffer |
15602 |
-#define vm_var__flush_buffer_ALREADY_DEFINED |
15603 |
-#else |
15604 |
-#define yy_flush_buffer vm_var__flush_buffer |
15605 |
-#endif |
15606 |
- |
15607 |
-#ifdef yy_load_buffer_state |
15608 |
-#define vm_var__load_buffer_state_ALREADY_DEFINED |
15609 |
-#else |
15610 |
-#define yy_load_buffer_state vm_var__load_buffer_state |
15611 |
-#endif |
15612 |
- |
15613 |
-#ifdef yy_switch_to_buffer |
15614 |
-#define vm_var__switch_to_buffer_ALREADY_DEFINED |
15615 |
-#else |
15616 |
-#define yy_switch_to_buffer vm_var__switch_to_buffer |
15617 |
-#endif |
15618 |
- |
15619 |
-#ifdef yypush_buffer_state |
15620 |
-#define vm_var_push_buffer_state_ALREADY_DEFINED |
15621 |
-#else |
15622 |
-#define yypush_buffer_state vm_var_push_buffer_state |
15623 |
-#endif |
15624 |
- |
15625 |
-#ifdef yypop_buffer_state |
15626 |
-#define vm_var_pop_buffer_state_ALREADY_DEFINED |
15627 |
-#else |
15628 |
-#define yypop_buffer_state vm_var_pop_buffer_state |
15629 |
-#endif |
15630 |
- |
15631 |
-#ifdef yyensure_buffer_stack |
15632 |
-#define vm_var_ensure_buffer_stack_ALREADY_DEFINED |
15633 |
-#else |
15634 |
-#define yyensure_buffer_stack vm_var_ensure_buffer_stack |
15635 |
-#endif |
15636 |
- |
15637 |
-#ifdef yylex |
15638 |
-#define vm_var_lex_ALREADY_DEFINED |
15639 |
-#else |
15640 |
-#define yylex vm_var_lex |
15641 |
-#endif |
15642 |
- |
15643 |
-#ifdef yyrestart |
15644 |
-#define vm_var_restart_ALREADY_DEFINED |
15645 |
-#else |
15646 |
-#define yyrestart vm_var_restart |
15647 |
-#endif |
15648 |
- |
15649 |
-#ifdef yylex_init |
15650 |
-#define vm_var_lex_init_ALREADY_DEFINED |
15651 |
-#else |
15652 |
-#define yylex_init vm_var_lex_init |
15653 |
-#endif |
15654 |
- |
15655 |
-#ifdef yylex_init_extra |
15656 |
-#define vm_var_lex_init_extra_ALREADY_DEFINED |
15657 |
-#else |
15658 |
-#define yylex_init_extra vm_var_lex_init_extra |
15659 |
-#endif |
15660 |
- |
15661 |
-#ifdef yylex_destroy |
15662 |
-#define vm_var_lex_destroy_ALREADY_DEFINED |
15663 |
-#else |
15664 |
-#define yylex_destroy vm_var_lex_destroy |
15665 |
-#endif |
15666 |
- |
15667 |
-#ifdef yyget_debug |
15668 |
-#define vm_var_get_debug_ALREADY_DEFINED |
15669 |
-#else |
15670 |
-#define yyget_debug vm_var_get_debug |
15671 |
-#endif |
15672 |
- |
15673 |
-#ifdef yyset_debug |
15674 |
-#define vm_var_set_debug_ALREADY_DEFINED |
15675 |
-#else |
15676 |
-#define yyset_debug vm_var_set_debug |
15677 |
-#endif |
15678 |
- |
15679 |
-#ifdef yyget_extra |
15680 |
-#define vm_var_get_extra_ALREADY_DEFINED |
15681 |
-#else |
15682 |
-#define yyget_extra vm_var_get_extra |
15683 |
-#endif |
15684 |
- |
15685 |
-#ifdef yyset_extra |
15686 |
-#define vm_var_set_extra_ALREADY_DEFINED |
15687 |
-#else |
15688 |
-#define yyset_extra vm_var_set_extra |
15689 |
-#endif |
15690 |
- |
15691 |
-#ifdef yyget_in |
15692 |
-#define vm_var_get_in_ALREADY_DEFINED |
15693 |
-#else |
15694 |
-#define yyget_in vm_var_get_in |
15695 |
-#endif |
15696 |
- |
15697 |
-#ifdef yyset_in |
15698 |
-#define vm_var_set_in_ALREADY_DEFINED |
15699 |
-#else |
15700 |
-#define yyset_in vm_var_set_in |
15701 |
-#endif |
15702 |
- |
15703 |
-#ifdef yyget_out |
15704 |
-#define vm_var_get_out_ALREADY_DEFINED |
15705 |
-#else |
15706 |
-#define yyget_out vm_var_get_out |
15707 |
-#endif |
15708 |
- |
15709 |
-#ifdef yyset_out |
15710 |
-#define vm_var_set_out_ALREADY_DEFINED |
15711 |
-#else |
15712 |
-#define yyset_out vm_var_set_out |
15713 |
-#endif |
15714 |
- |
15715 |
-#ifdef yyget_leng |
15716 |
-#define vm_var_get_leng_ALREADY_DEFINED |
15717 |
-#else |
15718 |
-#define yyget_leng vm_var_get_leng |
15719 |
-#endif |
15720 |
- |
15721 |
-#ifdef yyget_text |
15722 |
-#define vm_var_get_text_ALREADY_DEFINED |
15723 |
-#else |
15724 |
-#define yyget_text vm_var_get_text |
15725 |
-#endif |
15726 |
- |
15727 |
-#ifdef yyget_lineno |
15728 |
-#define vm_var_get_lineno_ALREADY_DEFINED |
15729 |
-#else |
15730 |
-#define yyget_lineno vm_var_get_lineno |
15731 |
-#endif |
15732 |
- |
15733 |
-#ifdef yyset_lineno |
15734 |
-#define vm_var_set_lineno_ALREADY_DEFINED |
15735 |
-#else |
15736 |
-#define yyset_lineno vm_var_set_lineno |
15737 |
-#endif |
15738 |
- |
15739 |
-#ifdef yyget_column |
15740 |
-#define vm_var_get_column_ALREADY_DEFINED |
15741 |
-#else |
15742 |
-#define yyget_column vm_var_get_column |
15743 |
-#endif |
15744 |
- |
15745 |
-#ifdef yyset_column |
15746 |
-#define vm_var_set_column_ALREADY_DEFINED |
15747 |
-#else |
15748 |
-#define yyset_column vm_var_set_column |
15749 |
-#endif |
15750 |
- |
15751 |
-#ifdef yywrap |
15752 |
-#define vm_var_wrap_ALREADY_DEFINED |
15753 |
-#else |
15754 |
-#define yywrap vm_var_wrap |
15755 |
-#endif |
15756 |
- |
15757 |
-#ifdef yyget_lval |
15758 |
-#define vm_var_get_lval_ALREADY_DEFINED |
15759 |
-#else |
15760 |
-#define yyget_lval vm_var_get_lval |
15761 |
-#endif |
15762 |
- |
15763 |
-#ifdef yyset_lval |
15764 |
-#define vm_var_set_lval_ALREADY_DEFINED |
15765 |
-#else |
15766 |
-#define yyset_lval vm_var_set_lval |
15767 |
-#endif |
15768 |
- |
15769 |
-#ifdef yyalloc |
15770 |
-#define vm_var_alloc_ALREADY_DEFINED |
15771 |
-#else |
15772 |
-#define yyalloc vm_var_alloc |
15773 |
-#endif |
15774 |
- |
15775 |
-#ifdef yyrealloc |
15776 |
-#define vm_var_realloc_ALREADY_DEFINED |
15777 |
-#else |
15778 |
-#define yyrealloc vm_var_realloc |
15779 |
-#endif |
15780 |
- |
15781 |
-#ifdef yyfree |
15782 |
-#define vm_var_free_ALREADY_DEFINED |
15783 |
-#else |
15784 |
-#define yyfree vm_var_free |
15785 |
-#endif |
15786 |
- |
15787 |
-/* First, we deal with platform-specific or compiler-specific issues. */ |
15788 |
- |
15789 |
-/* begin standard C headers. */ |
15790 |
-#include <stdio.h> |
15791 |
-#include <string.h> |
15792 |
-#include <errno.h> |
15793 |
-#include <stdlib.h> |
15794 |
- |
15795 |
-/* end standard C headers. */ |
15796 |
- |
15797 |
-/* flex integer type definitions */ |
15798 |
- |
15799 |
-#ifndef FLEXINT_H |
15800 |
-#define FLEXINT_H |
15801 |
- |
15802 |
-/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */ |
15803 |
- |
15804 |
-#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L |
15805 |
- |
15806 |
-/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, |
15807 |
- * if you want the limit (max/min) macros for int types. |
15808 |
- */ |
15809 |
-#ifndef __STDC_LIMIT_MACROS |
15810 |
-#define __STDC_LIMIT_MACROS 1 |
15811 |
-#endif |
15812 |
- |
15813 |
-#include <inttypes.h> |
15814 |
-typedef int8_t flex_int8_t; |
15815 |
-typedef uint8_t flex_uint8_t; |
15816 |
-typedef int16_t flex_int16_t; |
15817 |
-typedef uint16_t flex_uint16_t; |
15818 |
-typedef int32_t flex_int32_t; |
15819 |
-typedef uint32_t flex_uint32_t; |
15820 |
-#else |
15821 |
-typedef signed char flex_int8_t; |
15822 |
-typedef short int flex_int16_t; |
15823 |
-typedef int flex_int32_t; |
15824 |
-typedef unsigned char flex_uint8_t; |
15825 |
-typedef unsigned short int flex_uint16_t; |
15826 |
-typedef unsigned int flex_uint32_t; |
15827 |
- |
15828 |
-/* Limits of integral types. */ |
15829 |
-#ifndef INT8_MIN |
15830 |
-#define INT8_MIN (-128) |
15831 |
-#endif |
15832 |
-#ifndef INT16_MIN |
15833 |
-#define INT16_MIN (-32767-1) |
15834 |
-#endif |
15835 |
-#ifndef INT32_MIN |
15836 |
-#define INT32_MIN (-2147483647-1) |
15837 |
-#endif |
15838 |
-#ifndef INT8_MAX |
15839 |
-#define INT8_MAX (127) |
15840 |
-#endif |
15841 |
-#ifndef INT16_MAX |
15842 |
-#define INT16_MAX (32767) |
15843 |
-#endif |
15844 |
-#ifndef INT32_MAX |
15845 |
-#define INT32_MAX (2147483647) |
15846 |
-#endif |
15847 |
-#ifndef UINT8_MAX |
15848 |
-#define UINT8_MAX (255U) |
15849 |
-#endif |
15850 |
-#ifndef UINT16_MAX |
15851 |
-#define UINT16_MAX (65535U) |
15852 |
-#endif |
15853 |
-#ifndef UINT32_MAX |
15854 |
-#define UINT32_MAX (4294967295U) |
15855 |
-#endif |
15856 |
- |
15857 |
-#ifndef SIZE_MAX |
15858 |
-#define SIZE_MAX (~(size_t)0) |
15859 |
-#endif |
15860 |
- |
15861 |
-#endif /* ! C99 */ |
15862 |
- |
15863 |
-#endif /* ! FLEXINT_H */ |
15864 |
- |
15865 |
-/* begin standard C++ headers. */ |
15866 |
- |
15867 |
-/* TODO: this is always defined, so inline it */ |
15868 |
-#define yyconst const |
15869 |
- |
15870 |
-#if defined(__GNUC__) && __GNUC__ >= 3 |
15871 |
-#define yynoreturn __attribute__((__noreturn__)) |
15872 |
-#else |
15873 |
-#define yynoreturn |
15874 |
-#endif |
15875 |
- |
15876 |
-/* Returned upon end-of-file. */ |
15877 |
-#define YY_NULL 0 |
15878 |
- |
15879 |
-/* Promotes a possibly negative, possibly signed char to an |
15880 |
- * integer in range [0..255] for use as an array index. |
15881 |
- */ |
15882 |
-#define YY_SC_TO_UI(c) ((YY_CHAR) (c)) |
15883 |
- |
15884 |
-/* An opaque pointer. */ |
15885 |
-#ifndef YY_TYPEDEF_YY_SCANNER_T |
15886 |
-#define YY_TYPEDEF_YY_SCANNER_T |
15887 |
-typedef void* yyscan_t; |
15888 |
-#endif |
15889 |
- |
15890 |
-/* For convenience, these vars (plus the bison vars far below) |
15891 |
- are macros in the reentrant scanner. */ |
15892 |
-#define yyin yyg->yyin_r |
15893 |
-#define yyout yyg->yyout_r |
15894 |
-#define yyextra yyg->yyextra_r |
15895 |
-#define yyleng yyg->yyleng_r |
15896 |
-#define yytext yyg->yytext_r |
15897 |
-#define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno) |
15898 |
-#define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column) |
15899 |
-#define yy_flex_debug yyg->yy_flex_debug_r |
15900 |
- |
15901 |
-/* Enter a start condition. This macro really ought to take a parameter, |
15902 |
- * but we do it the disgusting crufty way forced on us by the ()-less |
15903 |
- * definition of BEGIN. |
15904 |
- */ |
15905 |
-#define BEGIN yyg->yy_start = 1 + 2 * |
15906 |
-/* Translate the current start state into a value that can be later handed |
15907 |
- * to BEGIN to return to the state. The YYSTATE alias is for lex |
15908 |
- * compatibility. |
15909 |
- */ |
15910 |
-#define YY_START ((yyg->yy_start - 1) / 2) |
15911 |
-#define YYSTATE YY_START |
15912 |
-/* Action number for EOF rule of a given start state. */ |
15913 |
-#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) |
15914 |
-/* Special action meaning "start processing a new file". */ |
15915 |
-#define YY_NEW_FILE yyrestart( yyin , yyscanner ) |
15916 |
-#define YY_END_OF_BUFFER_CHAR 0 |
15917 |
- |
15918 |
-/* Size of default input buffer. */ |
15919 |
-#ifndef YY_BUF_SIZE |
15920 |
-#ifdef __ia64__ |
15921 |
-/* On IA-64, the buffer size is 16k, not 8k. |
15922 |
- * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. |
15923 |
- * Ditto for the __ia64__ case accordingly. |
15924 |
- */ |
15925 |
-#define YY_BUF_SIZE 32768 |
15926 |
-#else |
15927 |
-#define YY_BUF_SIZE 16384 |
15928 |
-#endif /* __ia64__ */ |
15929 |
-#endif |
15930 |
- |
15931 |
-/* The state buf must be large enough to hold one state per character in the main buffer. |
15932 |
- */ |
15933 |
-#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) |
15934 |
- |
15935 |
-#ifndef YY_TYPEDEF_YY_BUFFER_STATE |
15936 |
-#define YY_TYPEDEF_YY_BUFFER_STATE |
15937 |
-typedef struct yy_buffer_state *YY_BUFFER_STATE; |
15938 |
-#endif |
15939 |
- |
15940 |
-#ifndef YY_TYPEDEF_YY_SIZE_T |
15941 |
-#define YY_TYPEDEF_YY_SIZE_T |
15942 |
-typedef size_t yy_size_t; |
15943 |
-#endif |
15944 |
- |
15945 |
-#define EOB_ACT_CONTINUE_SCAN 0 |
15946 |
-#define EOB_ACT_END_OF_FILE 1 |
15947 |
-#define EOB_ACT_LAST_MATCH 2 |
15948 |
- |
15949 |
- /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires |
15950 |
- * access to the local variable yy_act. Since yyless() is a macro, it would break |
15951 |
- * existing scanners that call yyless() from OUTSIDE yylex. |
15952 |
- * One obvious solution it to make yy_act a global. I tried that, and saw |
15953 |
- * a 5% performance hit in a non-yylineno scanner, because yy_act is |
15954 |
- * normally declared as a register variable-- so it is not worth it. |
15955 |
- */ |
15956 |
- #define YY_LESS_LINENO(n) \ |
15957 |
- do { \ |
15958 |
- int yyl;\ |
15959 |
- for ( yyl = n; yyl < yyleng; ++yyl )\ |
15960 |
- if ( yytext[yyl] == '\n' )\ |
15961 |
- --yylineno;\ |
15962 |
- }while(0) |
15963 |
- #define YY_LINENO_REWIND_TO(dst) \ |
15964 |
- do {\ |
15965 |
- const char *p;\ |
15966 |
- for ( p = yy_cp-1; p >= (dst); --p)\ |
15967 |
- if ( *p == '\n' )\ |
15968 |
- --yylineno;\ |
15969 |
- }while(0) |
15970 |
- |
15971 |
-/* Return all but the first "n" matched characters back to the input stream. */ |
15972 |
-#define yyless(n) \ |
15973 |
- do \ |
15974 |
- { \ |
15975 |
- /* Undo effects of setting up yytext. */ \ |
15976 |
- int yyless_macro_arg = (n); \ |
15977 |
- YY_LESS_LINENO(yyless_macro_arg);\ |
15978 |
- *yy_cp = yyg->yy_hold_char; \ |
15979 |
- YY_RESTORE_YY_MORE_OFFSET \ |
15980 |
- yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ |
15981 |
- YY_DO_BEFORE_ACTION; /* set up yytext again */ \ |
15982 |
- } \ |
15983 |
- while ( 0 ) |
15984 |
-#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner ) |
15985 |
- |
15986 |
-#ifndef YY_STRUCT_YY_BUFFER_STATE |
15987 |
-#define YY_STRUCT_YY_BUFFER_STATE |
15988 |
-struct yy_buffer_state |
15989 |
- { |
15990 |
- FILE *yy_input_file; |
15991 |
- |
15992 |
- char *yy_ch_buf; /* input buffer */ |
15993 |
- char *yy_buf_pos; /* current position in input buffer */ |
15994 |
- |
15995 |
- /* Size of input buffer in bytes, not including room for EOB |
15996 |
- * characters. |
15997 |
- */ |
15998 |
- int yy_buf_size; |
15999 |
- |
16000 |
- /* Number of characters read into yy_ch_buf, not including EOB |
16001 |
- * characters. |
16002 |
- */ |
16003 |
- int yy_n_chars; |
16004 |
- |
16005 |
- /* Whether we "own" the buffer - i.e., we know we created it, |
16006 |
- * and can realloc() it to grow it, and should free() it to |
16007 |
- * delete it. |
16008 |
- */ |
16009 |
- int yy_is_our_buffer; |
16010 |
- |
16011 |
- /* Whether this is an "interactive" input source; if so, and |
16012 |
- * if we're using stdio for input, then we want to use getc() |
16013 |
- * instead of fread(), to make sure we stop fetching input after |
16014 |
- * each newline. |
16015 |
- */ |
16016 |
- int yy_is_interactive; |
16017 |
- |
16018 |
- /* Whether we're considered to be at the beginning of a line. |
16019 |
- * If so, '^' rules will be active on the next match, otherwise |
16020 |
- * not. |
16021 |
- */ |
16022 |
- int yy_at_bol; |
16023 |
- |
16024 |
- int yy_bs_lineno; /**< The line count. */ |
16025 |
- int yy_bs_column; /**< The column count. */ |
16026 |
- |
16027 |
- /* Whether to try to fill the input buffer when we reach the |
16028 |
- * end of it. |
16029 |
- */ |
16030 |
- int yy_fill_buffer; |
16031 |
- |
16032 |
- int yy_buffer_status; |
16033 |
- |
16034 |
-#define YY_BUFFER_NEW 0 |
16035 |
-#define YY_BUFFER_NORMAL 1 |
16036 |
- /* When an EOF's been seen but there's still some text to process |
16037 |
- * then we mark the buffer as YY_EOF_PENDING, to indicate that we |
16038 |
- * shouldn't try reading from the input source any more. We might |
16039 |
- * still have a bunch of tokens to match, though, because of |
16040 |
- * possible backing-up. |
16041 |
- * |
16042 |
- * When we actually see the EOF, we change the status to "new" |
16043 |
- * (via yyrestart()), so that the user can continue scanning by |
16044 |
- * just pointing yyin at a new input file. |
16045 |
- */ |
16046 |
-#define YY_BUFFER_EOF_PENDING 2 |
16047 |
- |
16048 |
- }; |
16049 |
-#endif /* !YY_STRUCT_YY_BUFFER_STATE */ |
16050 |
- |
16051 |
-/* We provide macros for accessing buffer states in case in the |
16052 |
- * future we want to put the buffer states in a more general |
16053 |
- * "scanner state". |
16054 |
- * |
16055 |
- * Returns the top of the stack, or NULL. |
16056 |
- */ |
16057 |
-#define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \ |
16058 |
- ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \ |
16059 |
- : NULL) |
16060 |
-/* Same as previous macro, but useful when we know that the buffer stack is not |
16061 |
- * NULL or when we need an lvalue. For internal use only. |
16062 |
- */ |
16063 |
-#define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] |
16064 |
- |
16065 |
-void yyrestart ( FILE *input_file , yyscan_t yyscanner ); |
16066 |
-void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); |
16067 |
-YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner ); |
16068 |
-void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); |
16069 |
-void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); |
16070 |
-void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); |
16071 |
-void yypop_buffer_state ( yyscan_t yyscanner ); |
16072 |
- |
16073 |
-static void yyensure_buffer_stack ( yyscan_t yyscanner ); |
16074 |
-static void yy_load_buffer_state ( yyscan_t yyscanner ); |
16075 |
-static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file , yyscan_t yyscanner ); |
16076 |
-#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER , yyscanner) |
16077 |
- |
16078 |
-YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner ); |
16079 |
-YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner ); |
16080 |
-YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len , yyscan_t yyscanner ); |
16081 |
- |
16082 |
-void *yyalloc ( yy_size_t , yyscan_t yyscanner ); |
16083 |
-void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner ); |
16084 |
-void yyfree ( void * , yyscan_t yyscanner ); |
16085 |
- |
16086 |
-#define yy_new_buffer yy_create_buffer |
16087 |
-#define yy_set_interactive(is_interactive) \ |
16088 |
- { \ |
16089 |
- if ( ! YY_CURRENT_BUFFER ){ \ |
16090 |
- yyensure_buffer_stack (yyscanner); \ |
16091 |
- YY_CURRENT_BUFFER_LVALUE = \ |
16092 |
- yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \ |
16093 |
- } \ |
16094 |
- YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ |
16095 |
- } |
16096 |
-#define yy_set_bol(at_bol) \ |
16097 |
- { \ |
16098 |
- if ( ! YY_CURRENT_BUFFER ){\ |
16099 |
- yyensure_buffer_stack (yyscanner); \ |
16100 |
- YY_CURRENT_BUFFER_LVALUE = \ |
16101 |
- yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \ |
16102 |
- } \ |
16103 |
- YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ |
16104 |
- } |
16105 |
-#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) |
16106 |
- |
16107 |
-/* Begin user sect3 */ |
16108 |
-typedef flex_uint8_t YY_CHAR; |
16109 |
- |
16110 |
-typedef int yy_state_type; |
16111 |
- |
16112 |
-#define yytext_ptr yytext_r |
16113 |
- |
16114 |
-static yy_state_type yy_get_previous_state ( yyscan_t yyscanner ); |
16115 |
-static yy_state_type yy_try_NUL_trans ( yy_state_type current_state , yyscan_t yyscanner); |
16116 |
-static int yy_get_next_buffer ( yyscan_t yyscanner ); |
16117 |
-static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner ); |
16118 |
- |
16119 |
-/* Done after the current pattern has been matched and before the |
16120 |
- * corresponding action - sets up yytext. |
16121 |
- */ |
16122 |
-#define YY_DO_BEFORE_ACTION \ |
16123 |
- yyg->yytext_ptr = yy_bp; \ |
16124 |
- yyleng = (int) (yy_cp - yy_bp); \ |
16125 |
- yyg->yy_hold_char = *yy_cp; \ |
16126 |
- *yy_cp = '\0'; \ |
16127 |
- yyg->yy_c_buf_p = yy_cp; |
16128 |
-#define YY_NUM_RULES 12 |
16129 |
-#define YY_END_OF_BUFFER 13 |
16130 |
-/* This struct is not used in this scanner, |
16131 |
- but its presence is necessary. */ |
16132 |
-struct yy_trans_info |
16133 |
- { |
16134 |
- flex_int32_t yy_verify; |
16135 |
- flex_int32_t yy_nxt; |
16136 |
- }; |
16137 |
-static const flex_int16_t yy_accept[36] = |
16138 |
- { 0, |
16139 |
- 0, 0, 0, 0, 0, 0, 13, 1, 2, 12, |
16140 |
- 11, 11, 12, 10, 4, 7, 3, 5, 6, 12, |
16141 |
- 9, 1, 0, 0, 4, 3, 6, 4, 7, 3, |
16142 |
- 5, 0, 8, 9, 0 |
16143 |
- } ; |
16144 |
- |
16145 |
-static const YY_CHAR yy_ec[256] = |
16146 |
- { 0, |
16147 |
- 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, |
16148 |
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
16149 |
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
16150 |
- 1, 2, 1, 4, 1, 5, 1, 1, 1, 1, |
16151 |
- 1, 1, 1, 6, 1, 1, 1, 7, 7, 7, |
16152 |
- 7, 7, 7, 7, 7, 7, 7, 1, 1, 1, |
16153 |
- 8, 1, 1, 1, 7, 7, 7, 7, 7, 7, |
16154 |
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, |
16155 |
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, |
16156 |
- 9, 10, 11, 1, 12, 1, 7, 7, 7, 7, |
16157 |
- |
16158 |
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, |
16159 |
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, |
16160 |
- 7, 7, 1, 1, 1, 1, 1, 1, 1, 1, |
16161 |
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
16162 |
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
16163 |
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
16164 |
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
16165 |
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
16166 |
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
16167 |
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
16168 |
- |
16169 |
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
16170 |
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
16171 |
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
16172 |
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
16173 |
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
16174 |
- 1, 1, 1, 1, 1 |
16175 |
- } ; |
16176 |
- |
16177 |
-static const YY_CHAR yy_meta[13] = |
16178 |
- { 0, |
16179 |
- 1, 1, 1, 1, 2, 1, 3, 1, 1, 1, |
16180 |
- 1, 3 |
16181 |
- } ; |
16182 |
- |
16183 |
-static const flex_int16_t yy_base[41] = |
16184 |
- { 0, |
16185 |
- 0, 6, 16, 0, 25, 29, 45, 34, 59, 37, |
16186 |
- 59, 35, 59, 59, 38, 0, 37, 36, 59, 31, |
16187 |
- 27, 21, 25, 0, 13, 12, 59, 11, 0, 10, |
16188 |
- 7, 4, 59, 0, 59, 46, 49, 52, 0, 55 |
16189 |
- } ; |
16190 |
- |
16191 |
-static const flex_int16_t yy_def[41] = |
16192 |
- { 0, |
16193 |
- 36, 36, 35, 3, 37, 37, 35, 38, 35, 38, |
16194 |
- 35, 35, 35, 35, 35, 39, 35, 35, 35, 40, |
16195 |
- 35, 38, 38, 12, 35, 35, 35, 35, 39, 35, |
16196 |
- 35, 40, 35, 35, 0, 35, 35, 35, 35, 35 |
16197 |
- } ; |
16198 |
- |
16199 |
-static const flex_int16_t yy_nxt[72] = |
16200 |
- { 0, |
16201 |
- 35, 35, 29, 35, 9, 35, 34, 33, 31, 10, |
16202 |
- 9, 30, 28, 30, 28, 10, 11, 12, 13, 11, |
16203 |
- 14, 15, 16, 17, 18, 11, 19, 16, 20, 22, |
16204 |
- 23, 21, 20, 34, 33, 21, 24, 31, 30, 28, |
16205 |
- 25, 22, 26, 23, 35, 27, 8, 8, 8, 13, |
16206 |
- 13, 13, 22, 35, 22, 32, 32, 32, 7, 35, |
16207 |
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, |
16208 |
- 35 |
16209 |
- } ; |
16210 |
- |
16211 |
-static const flex_int16_t yy_chk[72] = |
16212 |
- { 0, |
16213 |
- 0, 0, 39, 0, 1, 0, 34, 32, 31, 1, |
16214 |
- 2, 30, 28, 26, 25, 2, 3, 3, 3, 3, |
16215 |
- 3, 3, 3, 3, 3, 3, 3, 3, 5, 23, |
16216 |
- 22, 5, 6, 21, 20, 6, 12, 18, 17, 15, |
16217 |
- 12, 10, 12, 8, 7, 12, 36, 36, 36, 37, |
16218 |
- 37, 37, 38, 0, 38, 40, 40, 40, 35, 35, |
16219 |
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, |
16220 |
- 35 |
16221 |
- } ; |
16222 |
- |
16223 |
-/* Table of booleans, true if rule could match eol. */ |
16224 |
-static const flex_int32_t yy_rule_can_match_eol[13] = |
16225 |
- { 0, |
16226 |
-1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, }; |
16227 |
- |
16228 |
-/* The intent behind this definition is that it'll catch |
16229 |
- * any uses of REJECT which flex missed. |
16230 |
- */ |
16231 |
-#define REJECT reject_used_but_not_detected |
16232 |
-#define yymore() yymore_used_but_not_detected |
16233 |
-#define YY_MORE_ADJ 0 |
16234 |
-#define YY_RESTORE_YY_MORE_OFFSET |
16235 |
-#line 1 "vm_var_parser.l" |
16236 |
-/* -------------------------------------------------------------------------- */ |
16237 |
-/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */ |
16238 |
-/* */ |
16239 |
-/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ |
16240 |
-/* not use this file except in compliance with the License. You may obtain */ |
16241 |
-/* a copy of the License at */ |
16242 |
-/* */ |
16243 |
-/* http://www.apache.org/licenses/LICENSE-2.0 */ |
16244 |
-/* */ |
16245 |
-/* Unless required by applicable law or agreed to in writing, software */ |
16246 |
-/* distributed under the License is distributed on an "AS IS" BASIS, */ |
16247 |
-/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ |
16248 |
-/* See the License for the specific language governing permissions and */ |
16249 |
-/* limitations under the License. */ |
16250 |
-/* -------------------------------------------------------------------------- */ |
16251 |
-#line 18 "vm_var_parser.l" |
16252 |
-#include <stdio.h> |
16253 |
-#include <stdlib.h> |
16254 |
-#include <string.h> |
16255 |
-#include <pthread.h> |
16256 |
- |
16257 |
-#include "vm_var_syntax.h" |
16258 |
-#include "vm_file_var_syntax.h" |
16259 |
-#include "mem_collector.h" |
16260 |
- |
16261 |
-#define YY_NO_INPUT |
16262 |
- |
16263 |
-#define YY_DECL int vm_var_lex (YYSTYPE *yylval_param, YYLTYPE *llocp, \ |
16264 |
- mem_collector *mc, yyscan_t yyscanner) |
16265 |
- |
16266 |
-#define YY_USER_ACTION llocp->first_line = yylineno; \ |
16267 |
- llocp->first_column = llocp->last_column; \ |
16268 |
- llocp->last_column += yyleng; |
16269 |
-#line 721 "vm_var_parser.cc" |
16270 |
- |
16271 |
-#line 723 "vm_var_parser.cc" |
16272 |
- |
16273 |
-#define INITIAL 0 |
16274 |
-#define VAR 1 |
16275 |
-#define VALUE 2 |
16276 |
- |
16277 |
-#ifndef YY_NO_UNISTD_H |
16278 |
-/* Special case for "unistd.h", since it is non-ANSI. We include it way |
16279 |
- * down here because we want the user's section 1 to have been scanned first. |
16280 |
- * The user has a chance to override it with an option. |
16281 |
- */ |
16282 |
-#include <unistd.h> |
16283 |
-#endif |
16284 |
- |
16285 |
-#ifndef YY_EXTRA_TYPE |
16286 |
-#define YY_EXTRA_TYPE void * |
16287 |
-#endif |
16288 |
- |
16289 |
-/* Holds the entire state of the reentrant scanner. */ |
16290 |
-struct yyguts_t |
16291 |
- { |
16292 |
- |
16293 |
- /* User-defined. Not touched by flex. */ |
16294 |
- YY_EXTRA_TYPE yyextra_r; |
16295 |
- |
16296 |
- /* The rest are the same as the globals declared in the non-reentrant scanner. */ |
16297 |
- FILE *yyin_r, *yyout_r; |
16298 |
- size_t yy_buffer_stack_top; /**< index of top of stack. */ |
16299 |
- size_t yy_buffer_stack_max; /**< capacity of stack. */ |
16300 |
- YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ |
16301 |
- char yy_hold_char; |
16302 |
- int yy_n_chars; |
16303 |
- int yyleng_r; |
16304 |
- char *yy_c_buf_p; |
16305 |
- int yy_init; |
16306 |
- int yy_start; |
16307 |
- int yy_did_buffer_switch_on_eof; |
16308 |
- int yy_start_stack_ptr; |
16309 |
- int yy_start_stack_depth; |
16310 |
- int *yy_start_stack; |
16311 |
- yy_state_type yy_last_accepting_state; |
16312 |
- char* yy_last_accepting_cpos; |
16313 |
- |
16314 |
- int yylineno_r; |
16315 |
- int yy_flex_debug_r; |
16316 |
- |
16317 |
- char *yytext_r; |
16318 |
- int yy_more_flag; |
16319 |
- int yy_more_len; |
16320 |
- |
16321 |
- YYSTYPE * yylval_r; |
16322 |
- |
16323 |
- }; /* end struct yyguts_t */ |
16324 |
- |
16325 |
-static int yy_init_globals ( yyscan_t yyscanner ); |
16326 |
- |
16327 |
- /* This must go here because YYSTYPE and YYLTYPE are included |
16328 |
- * from bison output in section 1.*/ |
16329 |
- # define yylval yyg->yylval_r |
16330 |
- |
16331 |
-int yylex_init (yyscan_t* scanner); |
16332 |
- |
16333 |
-int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner); |
16334 |
- |
16335 |
-/* Accessor methods to globals. |
16336 |
- These are made visible to non-reentrant scanners for convenience. */ |
16337 |
- |
16338 |
-int yylex_destroy ( yyscan_t yyscanner ); |
16339 |
- |
16340 |
-int yyget_debug ( yyscan_t yyscanner ); |
16341 |
- |
16342 |
-void yyset_debug ( int debug_flag , yyscan_t yyscanner ); |
16343 |
- |
16344 |
-YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner ); |
16345 |
- |
16346 |
-void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner ); |
16347 |
- |
16348 |
-FILE *yyget_in ( yyscan_t yyscanner ); |
16349 |
- |
16350 |
-void yyset_in ( FILE * _in_str , yyscan_t yyscanner ); |
16351 |
- |
16352 |
-FILE *yyget_out ( yyscan_t yyscanner ); |
16353 |
- |
16354 |
-void yyset_out ( FILE * _out_str , yyscan_t yyscanner ); |
16355 |
- |
16356 |
- int yyget_leng ( yyscan_t yyscanner ); |
16357 |
- |
16358 |
-char *yyget_text ( yyscan_t yyscanner ); |
16359 |
- |
16360 |
-int yyget_lineno ( yyscan_t yyscanner ); |
16361 |
- |
16362 |
-void yyset_lineno ( int _line_number , yyscan_t yyscanner ); |
16363 |
- |
16364 |
-int yyget_column ( yyscan_t yyscanner ); |
16365 |
- |
16366 |
-void yyset_column ( int _column_no , yyscan_t yyscanner ); |
16367 |
- |
16368 |
-YYSTYPE * yyget_lval ( yyscan_t yyscanner ); |
16369 |
- |
16370 |
-void yyset_lval ( YYSTYPE * yylval_param , yyscan_t yyscanner ); |
16371 |
- |
16372 |
-/* Macros after this point can all be overridden by user definitions in |
16373 |
- * section 1. |
16374 |
- */ |
16375 |
- |
16376 |
-#ifndef YY_SKIP_YYWRAP |
16377 |
-#ifdef __cplusplus |
16378 |
-extern "C" int yywrap ( yyscan_t yyscanner ); |
16379 |
-#else |
16380 |
-extern int yywrap ( yyscan_t yyscanner ); |
16381 |
-#endif |
16382 |
-#endif |
16383 |
- |
16384 |
-#ifndef YY_NO_UNPUT |
16385 |
- |
16386 |
-#endif |
16387 |
- |
16388 |
-#ifndef yytext_ptr |
16389 |
-static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner); |
16390 |
-#endif |
16391 |
- |
16392 |
-#ifdef YY_NEED_STRLEN |
16393 |
-static int yy_flex_strlen ( const char * , yyscan_t yyscanner); |
16394 |
-#endif |
16395 |
- |
16396 |
-#ifndef YY_NO_INPUT |
16397 |
-#ifdef __cplusplus |
16398 |
-static int yyinput ( yyscan_t yyscanner ); |
16399 |
-#else |
16400 |
-static int input ( yyscan_t yyscanner ); |
16401 |
-#endif |
16402 |
- |
16403 |
-#endif |
16404 |
- |
16405 |
-/* Amount of stuff to slurp up with each read. */ |
16406 |
-#ifndef YY_READ_BUF_SIZE |
16407 |
-#ifdef __ia64__ |
16408 |
-/* On IA-64, the buffer size is 16k, not 8k */ |
16409 |
-#define YY_READ_BUF_SIZE 16384 |
16410 |
-#else |
16411 |
-#define YY_READ_BUF_SIZE 8192 |
16412 |
-#endif /* __ia64__ */ |
16413 |
-#endif |
16414 |
- |
16415 |
-/* Copy whatever the last rule matched to the standard output. */ |
16416 |
-#ifndef ECHO |
16417 |
-/* This used to be an fputs(), but since the string might contain NUL's, |
16418 |
- * we now use fwrite(). |
16419 |
- */ |
16420 |
-#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0) |
16421 |
-#endif |
16422 |
- |
16423 |
-/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, |
16424 |
- * is returned in "result". |
16425 |
- */ |
16426 |
-#ifndef YY_INPUT |
16427 |
-#define YY_INPUT(buf,result,max_size) \ |
16428 |
- if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ |
16429 |
- { \ |
16430 |
- int c = '*'; \ |
16431 |
- int n; \ |
16432 |
- for ( n = 0; n < max_size && \ |
16433 |
- (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ |
16434 |
- buf[n] = (char) c; \ |
16435 |
- if ( c == '\n' ) \ |
16436 |
- buf[n++] = (char) c; \ |
16437 |
- if ( c == EOF && ferror( yyin ) ) \ |
16438 |
- YY_FATAL_ERROR( "input in flex scanner failed" ); \ |
16439 |
- result = n; \ |
16440 |
- } \ |
16441 |
- else \ |
16442 |
- { \ |
16443 |
- errno=0; \ |
16444 |
- while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \ |
16445 |
- { \ |
16446 |
- if( errno != EINTR) \ |
16447 |
- { \ |
16448 |
- YY_FATAL_ERROR( "input in flex scanner failed" ); \ |
16449 |
- break; \ |
16450 |
- } \ |
16451 |
- errno=0; \ |
16452 |
- clearerr(yyin); \ |
16453 |
- } \ |
16454 |
- }\ |
16455 |
-\ |
16456 |
- |
16457 |
-#endif |
16458 |
- |
16459 |
-/* No semi-colon after return; correct usage is to write "yyterminate();" - |
16460 |
- * we don't want an extra ';' after the "return" because that will cause |
16461 |
- * some compilers to complain about unreachable statements. |
16462 |
- */ |
16463 |
-#ifndef yyterminate |
16464 |
-#define yyterminate() return YY_NULL |
16465 |
-#endif |
16466 |
- |
16467 |
-/* Number of entries by which start-condition stack grows. */ |
16468 |
-#ifndef YY_START_STACK_INCR |
16469 |
-#define YY_START_STACK_INCR 25 |
16470 |
-#endif |
16471 |
- |
16472 |
-/* Report a fatal error. */ |
16473 |
-#ifndef YY_FATAL_ERROR |
16474 |
-#define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner) |
16475 |
-#endif |
16476 |
- |
16477 |
-/* end tables serialization structures and prototypes */ |
16478 |
- |
16479 |
-/* Default declaration of generated scanner - a define so the user can |
16480 |
- * easily add parameters. |
16481 |
- */ |
16482 |
-#ifndef YY_DECL |
16483 |
-#define YY_DECL_IS_OURS 1 |
16484 |
- |
16485 |
-extern int yylex \ |
16486 |
- (YYSTYPE * yylval_param , yyscan_t yyscanner); |
16487 |
- |
16488 |
-#define YY_DECL int yylex \ |
16489 |
- (YYSTYPE * yylval_param , yyscan_t yyscanner) |
16490 |
-#endif /* !YY_DECL */ |
16491 |
- |
16492 |
-/* Code executed at the beginning of each rule, after yytext and yyleng |
16493 |
- * have been set up. |
16494 |
- */ |
16495 |
-#ifndef YY_USER_ACTION |
16496 |
-#define YY_USER_ACTION |
16497 |
-#endif |
16498 |
- |
16499 |
-/* Code executed at the end of each rule. */ |
16500 |
-#ifndef YY_BREAK |
16501 |
-#define YY_BREAK /*LINTED*/break; |
16502 |
-#endif |
16503 |
- |
16504 |
-#define YY_RULE_SETUP \ |
16505 |
- YY_USER_ACTION |
16506 |
- |
16507 |
-/** The main scanner function which does all the work. |
16508 |
- */ |
16509 |
-YY_DECL |
16510 |
-{ |
16511 |
- yy_state_type yy_current_state; |
16512 |
- char *yy_cp, *yy_bp; |
16513 |
- int yy_act; |
16514 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
16515 |
- |
16516 |
- yylval = yylval_param; |
16517 |
- |
16518 |
- if ( !yyg->yy_init ) |
16519 |
- { |
16520 |
- yyg->yy_init = 1; |
16521 |
- |
16522 |
-#ifdef YY_USER_INIT |
16523 |
- YY_USER_INIT; |
16524 |
-#endif |
16525 |
- |
16526 |
- if ( ! yyg->yy_start ) |
16527 |
- yyg->yy_start = 1; /* first start state */ |
16528 |
- |
16529 |
- if ( ! yyin ) |
16530 |
- yyin = stdin; |
16531 |
- |
16532 |
- if ( ! yyout ) |
16533 |
- yyout = stdout; |
16534 |
- |
16535 |
- if ( ! YY_CURRENT_BUFFER ) { |
16536 |
- yyensure_buffer_stack (yyscanner); |
16537 |
- YY_CURRENT_BUFFER_LVALUE = |
16538 |
- yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); |
16539 |
- } |
16540 |
- |
16541 |
- yy_load_buffer_state( yyscanner ); |
16542 |
- } |
16543 |
- |
16544 |
- { |
16545 |
-#line 47 "vm_var_parser.l" |
16546 |
- |
16547 |
- |
16548 |
-#line 50 "vm_var_parser.l" |
16549 |
- /* ------------------------------------------------------------------------- */ |
16550 |
- /* Just copy the string verbatim till we find a variable (starts with $) */ |
16551 |
- /* ------------------------------------------------------------------------- */ |
16552 |
- |
16553 |
-#line 1005 "vm_var_parser.cc" |
16554 |
- |
16555 |
- while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ |
16556 |
- { |
16557 |
- yy_cp = yyg->yy_c_buf_p; |
16558 |
- |
16559 |
- /* Support of yytext. */ |
16560 |
- *yy_cp = yyg->yy_hold_char; |
16561 |
- |
16562 |
- /* yy_bp points to the position in yy_ch_buf of the start of |
16563 |
- * the current run. |
16564 |
- */ |
16565 |
- yy_bp = yy_cp; |
16566 |
- |
16567 |
- yy_current_state = yyg->yy_start; |
16568 |
-yy_match: |
16569 |
- do |
16570 |
- { |
16571 |
- YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; |
16572 |
- if ( yy_accept[yy_current_state] ) |
16573 |
- { |
16574 |
- yyg->yy_last_accepting_state = yy_current_state; |
16575 |
- yyg->yy_last_accepting_cpos = yy_cp; |
16576 |
- } |
16577 |
- while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) |
16578 |
- { |
16579 |
- yy_current_state = (int) yy_def[yy_current_state]; |
16580 |
- if ( yy_current_state >= 36 ) |
16581 |
- yy_c = yy_meta[yy_c]; |
16582 |
- } |
16583 |
- yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; |
16584 |
- ++yy_cp; |
16585 |
- } |
16586 |
- while ( yy_base[yy_current_state] != 59 ); |
16587 |
- |
16588 |
-yy_find_action: |
16589 |
- yy_act = yy_accept[yy_current_state]; |
16590 |
- if ( yy_act == 0 ) |
16591 |
- { /* have to back up */ |
16592 |
- yy_cp = yyg->yy_last_accepting_cpos; |
16593 |
- yy_current_state = yyg->yy_last_accepting_state; |
16594 |
- yy_act = yy_accept[yy_current_state]; |
16595 |
- } |
16596 |
- |
16597 |
- YY_DO_BEFORE_ACTION; |
16598 |
- |
16599 |
- if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] ) |
16600 |
- { |
16601 |
- int yyl; |
16602 |
- for ( yyl = 0; yyl < yyleng; ++yyl ) |
16603 |
- if ( yytext[yyl] == '\n' ) |
16604 |
- |
16605 |
- do{ yylineno++; |
16606 |
- yycolumn=0; |
16607 |
- }while(0) |
16608 |
-; |
16609 |
- } |
16610 |
- |
16611 |
-do_action: /* This label is used only to access EOF actions. */ |
16612 |
- |
16613 |
- switch ( yy_act ) |
16614 |
- { /* beginning of action switch */ |
16615 |
- case 0: /* must back up */ |
16616 |
- /* undo the effects of YY_DO_BEFORE_ACTION */ |
16617 |
- *yy_cp = yyg->yy_hold_char; |
16618 |
- yy_cp = yyg->yy_last_accepting_cpos; |
16619 |
- yy_current_state = yyg->yy_last_accepting_state; |
16620 |
- goto yy_find_action; |
16621 |
- |
16622 |
-case 1: |
16623 |
-/* rule 1 can match eol */ |
16624 |
-YY_RULE_SETUP |
16625 |
-#line 54 "vm_var_parser.l" |
16626 |
-{ yylval_param->val_str = mem_collector_strdup(mc,yytext); return RSTRING;} |
16627 |
- YY_BREAK |
16628 |
-/* ------------------------------------------------------------------------- */ |
16629 |
-/* Parse variables in the form: */ |
16630 |
-/* $VARIABLE */ |
16631 |
-/* $VARIABLE[ATTR] */ |
16632 |
-/* $VARIABLE[ATTR,ATTR=VALUE] */ |
16633 |
-/* $NUM.CONTEXT_VARIABLE */ |
16634 |
-/* ------------------------------------------------------------------------- */ |
16635 |
-case 2: |
16636 |
-YY_RULE_SETUP |
16637 |
-#line 64 "vm_var_parser.l" |
16638 |
-{ BEGIN VAR;} |
16639 |
- YY_BREAK |
16640 |
-case 3: |
16641 |
-YY_RULE_SETUP |
16642 |
-#line 66 "vm_var_parser.l" |
16643 |
-{ BEGIN VALUE; return EQUAL; } |
16644 |
- YY_BREAK |
16645 |
-case 4: |
16646 |
-YY_RULE_SETUP |
16647 |
-#line 67 "vm_var_parser.l" |
16648 |
-{ return COMMA;} |
16649 |
- YY_BREAK |
16650 |
-case 5: |
16651 |
-YY_RULE_SETUP |
16652 |
-#line 68 "vm_var_parser.l" |
16653 |
-{ return OBRACKET;} |
16654 |
- YY_BREAK |
16655 |
-case 6: |
16656 |
-YY_RULE_SETUP |
16657 |
-#line 69 "vm_var_parser.l" |
16658 |
-{ return CBRACKET;} |
16659 |
- YY_BREAK |
16660 |
-case 7: |
16661 |
-YY_RULE_SETUP |
16662 |
-#line 71 "vm_var_parser.l" |
16663 |
-{ yylval_param->val_str = |
16664 |
- mem_collector_strdup(mc,yytext); |
16665 |
- return VARIABLE;} |
16666 |
- YY_BREAK |
16667 |
-case 8: |
16668 |
-/* rule 8 can match eol */ |
16669 |
-YY_RULE_SETUP |
16670 |
-#line 75 "vm_var_parser.l" |
16671 |
-{ yylval_param->val_str = |
16672 |
- mem_collector_strdup(mc,yytext+1); |
16673 |
- yylval_param->val_str[yyleng-2] = '\0'; |
16674 |
- BEGIN(VAR); |
16675 |
- return STRING;} |
16676 |
- YY_BREAK |
16677 |
-case 9: |
16678 |
-YY_RULE_SETUP |
16679 |
-#line 81 "vm_var_parser.l" |
16680 |
-{ yylval_param->val_str = |
16681 |
- mem_collector_strdup(mc,yytext); |
16682 |
- BEGIN(VAR); |
16683 |
- return STRING;} |
16684 |
- YY_BREAK |
16685 |
-case 10: |
16686 |
-YY_RULE_SETUP |
16687 |
-#line 86 "vm_var_parser.l" |
16688 |
-{ yylval_param->val_char = '\0'; |
16689 |
- return EOA;} |
16690 |
- YY_BREAK |
16691 |
-case 11: |
16692 |
-YY_RULE_SETUP |
16693 |
-#line 89 "vm_var_parser.l" |
16694 |
-{ yylval_param->val_char = *yytext; |
16695 |
- BEGIN(INITIAL); |
16696 |
- return EOA;} |
16697 |
- YY_BREAK |
16698 |
-case YY_STATE_EOF(VAR): |
16699 |
-#line 93 "vm_var_parser.l" |
16700 |
-{ yylval_param->val_char = '\0'; |
16701 |
- BEGIN(INITIAL); |
16702 |
- return EOA;} |
16703 |
- YY_BREAK |
16704 |
-case 12: |
16705 |
-YY_RULE_SETUP |
16706 |
-#line 96 "vm_var_parser.l" |
16707 |
-ECHO; |
16708 |
- YY_BREAK |
16709 |
-#line 1161 "vm_var_parser.cc" |
16710 |
-case YY_STATE_EOF(INITIAL): |
16711 |
-case YY_STATE_EOF(VALUE): |
16712 |
- yyterminate(); |
16713 |
- |
16714 |
- case YY_END_OF_BUFFER: |
16715 |
- { |
16716 |
- /* Amount of text matched not including the EOB char. */ |
16717 |
- int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1; |
16718 |
- |
16719 |
- /* Undo the effects of YY_DO_BEFORE_ACTION. */ |
16720 |
- *yy_cp = yyg->yy_hold_char; |
16721 |
- YY_RESTORE_YY_MORE_OFFSET |
16722 |
- |
16723 |
- if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) |
16724 |
- { |
16725 |
- /* We're scanning a new file or input source. It's |
16726 |
- * possible that this happened because the user |
16727 |
- * just pointed yyin at a new source and called |
16728 |
- * yylex(). If so, then we have to assure |
16729 |
- * consistency between YY_CURRENT_BUFFER and our |
16730 |
- * globals. Here is the right place to do so, because |
16731 |
- * this is the first action (other than possibly a |
16732 |
- * back-up) that will match for the new input source. |
16733 |
- */ |
16734 |
- yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; |
16735 |
- YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; |
16736 |
- YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; |
16737 |
- } |
16738 |
- |
16739 |
- /* Note that here we test for yy_c_buf_p "<=" to the position |
16740 |
- * of the first EOB in the buffer, since yy_c_buf_p will |
16741 |
- * already have been incremented past the NUL character |
16742 |
- * (since all states make transitions on EOB to the |
16743 |
- * end-of-buffer state). Contrast this with the test |
16744 |
- * in input(). |
16745 |
- */ |
16746 |
- if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) |
16747 |
- { /* This was really a NUL. */ |
16748 |
- yy_state_type yy_next_state; |
16749 |
- |
16750 |
- yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; |
16751 |
- |
16752 |
- yy_current_state = yy_get_previous_state( yyscanner ); |
16753 |
- |
16754 |
- /* Okay, we're now positioned to make the NUL |
16755 |
- * transition. We couldn't have |
16756 |
- * yy_get_previous_state() go ahead and do it |
16757 |
- * for us because it doesn't know how to deal |
16758 |
- * with the possibility of jamming (and we don't |
16759 |
- * want to build jamming into it because then it |
16760 |
- * will run more slowly). |
16761 |
- */ |
16762 |
- |
16763 |
- yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner); |
16764 |
- |
16765 |
- yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; |
16766 |
- |
16767 |
- if ( yy_next_state ) |
16768 |
- { |
16769 |
- /* Consume the NUL. */ |
16770 |
- yy_cp = ++yyg->yy_c_buf_p; |
16771 |
- yy_current_state = yy_next_state; |
16772 |
- goto yy_match; |
16773 |
- } |
16774 |
- |
16775 |
- else |
16776 |
- { |
16777 |
- yy_cp = yyg->yy_c_buf_p; |
16778 |
- goto yy_find_action; |
16779 |
- } |
16780 |
- } |
16781 |
- |
16782 |
- else switch ( yy_get_next_buffer( yyscanner ) ) |
16783 |
- { |
16784 |
- case EOB_ACT_END_OF_FILE: |
16785 |
- { |
16786 |
- yyg->yy_did_buffer_switch_on_eof = 0; |
16787 |
- |
16788 |
- if ( yywrap( yyscanner ) ) |
16789 |
- { |
16790 |
- /* Note: because we've taken care in |
16791 |
- * yy_get_next_buffer() to have set up |
16792 |
- * yytext, we can now set up |
16793 |
- * yy_c_buf_p so that if some total |
16794 |
- * hoser (like flex itself) wants to |
16795 |
- * call the scanner after we return the |
16796 |
- * YY_NULL, it'll still work - another |
16797 |
- * YY_NULL will get returned. |
16798 |
- */ |
16799 |
- yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ; |
16800 |
- |
16801 |
- yy_act = YY_STATE_EOF(YY_START); |
16802 |
- goto do_action; |
16803 |
- } |
16804 |
- |
16805 |
- else |
16806 |
- { |
16807 |
- if ( ! yyg->yy_did_buffer_switch_on_eof ) |
16808 |
- YY_NEW_FILE; |
16809 |
- } |
16810 |
- break; |
16811 |
- } |
16812 |
- |
16813 |
- case EOB_ACT_CONTINUE_SCAN: |
16814 |
- yyg->yy_c_buf_p = |
16815 |
- yyg->yytext_ptr + yy_amount_of_matched_text; |
16816 |
- |
16817 |
- yy_current_state = yy_get_previous_state( yyscanner ); |
16818 |
- |
16819 |
- yy_cp = yyg->yy_c_buf_p; |
16820 |
- yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; |
16821 |
- goto yy_match; |
16822 |
- |
16823 |
- case EOB_ACT_LAST_MATCH: |
16824 |
- yyg->yy_c_buf_p = |
16825 |
- &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]; |
16826 |
- |
16827 |
- yy_current_state = yy_get_previous_state( yyscanner ); |
16828 |
- |
16829 |
- yy_cp = yyg->yy_c_buf_p; |
16830 |
- yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; |
16831 |
- goto yy_find_action; |
16832 |
- } |
16833 |
- break; |
16834 |
- } |
16835 |
- |
16836 |
- default: |
16837 |
- YY_FATAL_ERROR( |
16838 |
- "fatal flex scanner internal error--no action found" ); |
16839 |
- } /* end of action switch */ |
16840 |
- } /* end of scanning one token */ |
16841 |
- } /* end of user's declarations */ |
16842 |
-} /* end of yylex */ |
16843 |
- |
16844 |
-/* yy_get_next_buffer - try to read in a new buffer |
16845 |
- * |
16846 |
- * Returns a code representing an action: |
16847 |
- * EOB_ACT_LAST_MATCH - |
16848 |
- * EOB_ACT_CONTINUE_SCAN - continue scanning from current position |
16849 |
- * EOB_ACT_END_OF_FILE - end of file |
16850 |
- */ |
16851 |
-static int yy_get_next_buffer (yyscan_t yyscanner) |
16852 |
-{ |
16853 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
16854 |
- char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; |
16855 |
- char *source = yyg->yytext_ptr; |
16856 |
- int number_to_move, i; |
16857 |
- int ret_val; |
16858 |
- |
16859 |
- if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] ) |
16860 |
- YY_FATAL_ERROR( |
16861 |
- "fatal flex scanner internal error--end of buffer missed" ); |
16862 |
- |
16863 |
- if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) |
16864 |
- { /* Don't try to fill the buffer, so this is an EOF. */ |
16865 |
- if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 ) |
16866 |
- { |
16867 |
- /* We matched a single character, the EOB, so |
16868 |
- * treat this as a final EOF. |
16869 |
- */ |
16870 |
- return EOB_ACT_END_OF_FILE; |
16871 |
- } |
16872 |
- |
16873 |
- else |
16874 |
- { |
16875 |
- /* We matched some text prior to the EOB, first |
16876 |
- * process it. |
16877 |
- */ |
16878 |
- return EOB_ACT_LAST_MATCH; |
16879 |
- } |
16880 |
- } |
16881 |
- |
16882 |
- /* Try to read more data. */ |
16883 |
- |
16884 |
- /* First move last chars to start of buffer. */ |
16885 |
- number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr - 1); |
16886 |
- |
16887 |
- for ( i = 0; i < number_to_move; ++i ) |
16888 |
- *(dest++) = *(source++); |
16889 |
- |
16890 |
- if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) |
16891 |
- /* don't do the read, it's not guaranteed to return an EOF, |
16892 |
- * just force an EOF |
16893 |
- */ |
16894 |
- YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0; |
16895 |
- |
16896 |
- else |
16897 |
- { |
16898 |
- int num_to_read = |
16899 |
- YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; |
16900 |
- |
16901 |
- while ( num_to_read <= 0 ) |
16902 |
- { /* Not enough room in the buffer - grow it. */ |
16903 |
- |
16904 |
- /* just a shorter name for the current buffer */ |
16905 |
- YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; |
16906 |
- |
16907 |
- int yy_c_buf_p_offset = |
16908 |
- (int) (yyg->yy_c_buf_p - b->yy_ch_buf); |
16909 |
- |
16910 |
- if ( b->yy_is_our_buffer ) |
16911 |
- { |
16912 |
- int new_size = b->yy_buf_size * 2; |
16913 |
- |
16914 |
- if ( new_size <= 0 ) |
16915 |
- b->yy_buf_size += b->yy_buf_size / 8; |
16916 |
- else |
16917 |
- b->yy_buf_size *= 2; |
16918 |
- |
16919 |
- b->yy_ch_buf = (char *) |
16920 |
- /* Include room in for 2 EOB chars. */ |
16921 |
- yyrealloc( (void *) b->yy_ch_buf, |
16922 |
- (yy_size_t) (b->yy_buf_size + 2) , yyscanner ); |
16923 |
- } |
16924 |
- else |
16925 |
- /* Can't grow it, we don't own it. */ |
16926 |
- b->yy_ch_buf = NULL; |
16927 |
- |
16928 |
- if ( ! b->yy_ch_buf ) |
16929 |
- YY_FATAL_ERROR( |
16930 |
- "fatal error - scanner input buffer overflow" ); |
16931 |
- |
16932 |
- yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; |
16933 |
- |
16934 |
- num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - |
16935 |
- number_to_move - 1; |
16936 |
- |
16937 |
- } |
16938 |
- |
16939 |
- if ( num_to_read > YY_READ_BUF_SIZE ) |
16940 |
- num_to_read = YY_READ_BUF_SIZE; |
16941 |
- |
16942 |
- /* Read in more data. */ |
16943 |
- YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), |
16944 |
- yyg->yy_n_chars, num_to_read ); |
16945 |
- |
16946 |
- YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; |
16947 |
- } |
16948 |
- |
16949 |
- if ( yyg->yy_n_chars == 0 ) |
16950 |
- { |
16951 |
- if ( number_to_move == YY_MORE_ADJ ) |
16952 |
- { |
16953 |
- ret_val = EOB_ACT_END_OF_FILE; |
16954 |
- yyrestart( yyin , yyscanner); |
16955 |
- } |
16956 |
- |
16957 |
- else |
16958 |
- { |
16959 |
- ret_val = EOB_ACT_LAST_MATCH; |
16960 |
- YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = |
16961 |
- YY_BUFFER_EOF_PENDING; |
16962 |
- } |
16963 |
- } |
16964 |
- |
16965 |
- else |
16966 |
- ret_val = EOB_ACT_CONTINUE_SCAN; |
16967 |
- |
16968 |
- if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { |
16969 |
- /* Extend the array by 50%, plus the number we really need. */ |
16970 |
- int new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); |
16971 |
- YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc( |
16972 |
- (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size , yyscanner ); |
16973 |
- if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) |
16974 |
- YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); |
16975 |
- /* "- 2" to take care of EOB's */ |
16976 |
- YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2); |
16977 |
- } |
16978 |
- |
16979 |
- yyg->yy_n_chars += number_to_move; |
16980 |
- YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR; |
16981 |
- YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; |
16982 |
- |
16983 |
- yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; |
16984 |
- |
16985 |
- return ret_val; |
16986 |
-} |
16987 |
- |
16988 |
-/* yy_get_previous_state - get the state just before the EOB char was reached */ |
16989 |
- |
16990 |
- static yy_state_type yy_get_previous_state (yyscan_t yyscanner) |
16991 |
-{ |
16992 |
- yy_state_type yy_current_state; |
16993 |
- char *yy_cp; |
16994 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
16995 |
- |
16996 |
- yy_current_state = yyg->yy_start; |
16997 |
- |
16998 |
- for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp ) |
16999 |
- { |
17000 |
- YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); |
17001 |
- if ( yy_accept[yy_current_state] ) |
17002 |
- { |
17003 |
- yyg->yy_last_accepting_state = yy_current_state; |
17004 |
- yyg->yy_last_accepting_cpos = yy_cp; |
17005 |
- } |
17006 |
- while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) |
17007 |
- { |
17008 |
- yy_current_state = (int) yy_def[yy_current_state]; |
17009 |
- if ( yy_current_state >= 36 ) |
17010 |
- yy_c = yy_meta[yy_c]; |
17011 |
- } |
17012 |
- yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; |
17013 |
- } |
17014 |
- |
17015 |
- return yy_current_state; |
17016 |
-} |
17017 |
- |
17018 |
-/* yy_try_NUL_trans - try to make a transition on the NUL character |
17019 |
- * |
17020 |
- * synopsis |
17021 |
- * next_state = yy_try_NUL_trans( current_state ); |
17022 |
- */ |
17023 |
- static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner) |
17024 |
-{ |
17025 |
- int yy_is_jam; |
17026 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */ |
17027 |
- char *yy_cp = yyg->yy_c_buf_p; |
17028 |
- |
17029 |
- YY_CHAR yy_c = 1; |
17030 |
- if ( yy_accept[yy_current_state] ) |
17031 |
- { |
17032 |
- yyg->yy_last_accepting_state = yy_current_state; |
17033 |
- yyg->yy_last_accepting_cpos = yy_cp; |
17034 |
- } |
17035 |
- while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) |
17036 |
- { |
17037 |
- yy_current_state = (int) yy_def[yy_current_state]; |
17038 |
- if ( yy_current_state >= 36 ) |
17039 |
- yy_c = yy_meta[yy_c]; |
17040 |
- } |
17041 |
- yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; |
17042 |
- yy_is_jam = (yy_current_state == 35); |
17043 |
- |
17044 |
- (void)yyg; |
17045 |
- return yy_is_jam ? 0 : yy_current_state; |
17046 |
-} |
17047 |
- |
17048 |
-#ifndef YY_NO_UNPUT |
17049 |
- |
17050 |
-#endif |
17051 |
- |
17052 |
-#ifndef YY_NO_INPUT |
17053 |
-#ifdef __cplusplus |
17054 |
- static int yyinput (yyscan_t yyscanner) |
17055 |
-#else |
17056 |
- static int input (yyscan_t yyscanner) |
17057 |
-#endif |
17058 |
- |
17059 |
-{ |
17060 |
- int c; |
17061 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
17062 |
- |
17063 |
- *yyg->yy_c_buf_p = yyg->yy_hold_char; |
17064 |
- |
17065 |
- if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) |
17066 |
- { |
17067 |
- /* yy_c_buf_p now points to the character we want to return. |
17068 |
- * If this occurs *before* the EOB characters, then it's a |
17069 |
- * valid NUL; if not, then we've hit the end of the buffer. |
17070 |
- */ |
17071 |
- if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) |
17072 |
- /* This was really a NUL. */ |
17073 |
- *yyg->yy_c_buf_p = '\0'; |
17074 |
- |
17075 |
- else |
17076 |
- { /* need more input */ |
17077 |
- int offset = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr); |
17078 |
- ++yyg->yy_c_buf_p; |
17079 |
- |
17080 |
- switch ( yy_get_next_buffer( yyscanner ) ) |
17081 |
- { |
17082 |
- case EOB_ACT_LAST_MATCH: |
17083 |
- /* This happens because yy_g_n_b() |
17084 |
- * sees that we've accumulated a |
17085 |
- * token and flags that we need to |
17086 |
- * try matching the token before |
17087 |
- * proceeding. But for input(), |
17088 |
- * there's no matching to consider. |
17089 |
- * So convert the EOB_ACT_LAST_MATCH |
17090 |
- * to EOB_ACT_END_OF_FILE. |
17091 |
- */ |
17092 |
- |
17093 |
- /* Reset buffer status. */ |
17094 |
- yyrestart( yyin , yyscanner); |
17095 |
- |
17096 |
- /*FALLTHROUGH*/ |
17097 |
- |
17098 |
- case EOB_ACT_END_OF_FILE: |
17099 |
- { |
17100 |
- if ( yywrap( yyscanner ) ) |
17101 |
- return 0; |
17102 |
- |
17103 |
- if ( ! yyg->yy_did_buffer_switch_on_eof ) |
17104 |
- YY_NEW_FILE; |
17105 |
-#ifdef __cplusplus |
17106 |
- return yyinput(yyscanner); |
17107 |
-#else |
17108 |
- return input(yyscanner); |
17109 |
-#endif |
17110 |
- } |
17111 |
- |
17112 |
- case EOB_ACT_CONTINUE_SCAN: |
17113 |
- yyg->yy_c_buf_p = yyg->yytext_ptr + offset; |
17114 |
- break; |
17115 |
- } |
17116 |
- } |
17117 |
- } |
17118 |
- |
17119 |
- c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */ |
17120 |
- *yyg->yy_c_buf_p = '\0'; /* preserve yytext */ |
17121 |
- yyg->yy_hold_char = *++yyg->yy_c_buf_p; |
17122 |
- |
17123 |
- if ( c == '\n' ) |
17124 |
- |
17125 |
- do{ yylineno++; |
17126 |
- yycolumn=0; |
17127 |
- }while(0) |
17128 |
-; |
17129 |
- |
17130 |
- return c; |
17131 |
-} |
17132 |
-#endif /* ifndef YY_NO_INPUT */ |
17133 |
- |
17134 |
-/** Immediately switch to a different input stream. |
17135 |
- * @param input_file A readable stream. |
17136 |
- * @param yyscanner The scanner object. |
17137 |
- * @note This function does not reset the start condition to @c INITIAL . |
17138 |
- */ |
17139 |
- void yyrestart (FILE * input_file , yyscan_t yyscanner) |
17140 |
-{ |
17141 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
17142 |
- |
17143 |
- if ( ! YY_CURRENT_BUFFER ){ |
17144 |
- yyensure_buffer_stack (yyscanner); |
17145 |
- YY_CURRENT_BUFFER_LVALUE = |
17146 |
- yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); |
17147 |
- } |
17148 |
- |
17149 |
- yy_init_buffer( YY_CURRENT_BUFFER, input_file , yyscanner); |
17150 |
- yy_load_buffer_state( yyscanner ); |
17151 |
-} |
17152 |
- |
17153 |
-/** Switch to a different input buffer. |
17154 |
- * @param new_buffer The new input buffer. |
17155 |
- * @param yyscanner The scanner object. |
17156 |
- */ |
17157 |
- void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) |
17158 |
-{ |
17159 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
17160 |
- |
17161 |
- /* TODO. We should be able to replace this entire function body |
17162 |
- * with |
17163 |
- * yypop_buffer_state(); |
17164 |
- * yypush_buffer_state(new_buffer); |
17165 |
- */ |
17166 |
- yyensure_buffer_stack (yyscanner); |
17167 |
- if ( YY_CURRENT_BUFFER == new_buffer ) |
17168 |
- return; |
17169 |
- |
17170 |
- if ( YY_CURRENT_BUFFER ) |
17171 |
- { |
17172 |
- /* Flush out information for old buffer. */ |
17173 |
- *yyg->yy_c_buf_p = yyg->yy_hold_char; |
17174 |
- YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; |
17175 |
- YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; |
17176 |
- } |
17177 |
- |
17178 |
- YY_CURRENT_BUFFER_LVALUE = new_buffer; |
17179 |
- yy_load_buffer_state( yyscanner ); |
17180 |
- |
17181 |
- /* We don't actually know whether we did this switch during |
17182 |
- * EOF (yywrap()) processing, but the only time this flag |
17183 |
- * is looked at is after yywrap() is called, so it's safe |
17184 |
- * to go ahead and always set it. |
17185 |
- */ |
17186 |
- yyg->yy_did_buffer_switch_on_eof = 1; |
17187 |
-} |
17188 |
- |
17189 |
-static void yy_load_buffer_state (yyscan_t yyscanner) |
17190 |
-{ |
17191 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
17192 |
- yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; |
17193 |
- yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; |
17194 |
- yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; |
17195 |
- yyg->yy_hold_char = *yyg->yy_c_buf_p; |
17196 |
-} |
17197 |
- |
17198 |
-/** Allocate and initialize an input buffer state. |
17199 |
- * @param file A readable stream. |
17200 |
- * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. |
17201 |
- * @param yyscanner The scanner object. |
17202 |
- * @return the allocated buffer state. |
17203 |
- */ |
17204 |
- YY_BUFFER_STATE yy_create_buffer (FILE * file, int size , yyscan_t yyscanner) |
17205 |
-{ |
17206 |
- YY_BUFFER_STATE b; |
17207 |
- |
17208 |
- b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner ); |
17209 |
- if ( ! b ) |
17210 |
- YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); |
17211 |
- |
17212 |
- b->yy_buf_size = size; |
17213 |
- |
17214 |
- /* yy_ch_buf has to be 2 characters longer than the size given because |
17215 |
- * we need to put in 2 end-of-buffer characters. |
17216 |
- */ |
17217 |
- b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) , yyscanner ); |
17218 |
- if ( ! b->yy_ch_buf ) |
17219 |
- YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); |
17220 |
- |
17221 |
- b->yy_is_our_buffer = 1; |
17222 |
- |
17223 |
- yy_init_buffer( b, file , yyscanner); |
17224 |
- |
17225 |
- return b; |
17226 |
-} |
17227 |
- |
17228 |
-/** Destroy the buffer. |
17229 |
- * @param b a buffer created with yy_create_buffer() |
17230 |
- * @param yyscanner The scanner object. |
17231 |
- */ |
17232 |
- void yy_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) |
17233 |
-{ |
17234 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
17235 |
- |
17236 |
- if ( ! b ) |
17237 |
- return; |
17238 |
- |
17239 |
- if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ |
17240 |
- YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; |
17241 |
- |
17242 |
- if ( b->yy_is_our_buffer ) |
17243 |
- yyfree( (void *) b->yy_ch_buf , yyscanner ); |
17244 |
- |
17245 |
- yyfree( (void *) b , yyscanner ); |
17246 |
-} |
17247 |
- |
17248 |
-/* Initializes or reinitializes a buffer. |
17249 |
- * This function is sometimes called more than once on the same buffer, |
17250 |
- * such as during a yyrestart() or at EOF. |
17251 |
- */ |
17252 |
- static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner) |
17253 |
- |
17254 |
-{ |
17255 |
- int oerrno = errno; |
17256 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
17257 |
- |
17258 |
- yy_flush_buffer( b , yyscanner); |
17259 |
- |
17260 |
- b->yy_input_file = file; |
17261 |
- b->yy_fill_buffer = 1; |
17262 |
- |
17263 |
- /* If b is the current buffer, then yy_init_buffer was _probably_ |
17264 |
- * called from yyrestart() or through yy_get_next_buffer. |
17265 |
- * In that case, we don't want to reset the lineno or column. |
17266 |
- */ |
17267 |
- if (b != YY_CURRENT_BUFFER){ |
17268 |
- b->yy_bs_lineno = 1; |
17269 |
- b->yy_bs_column = 0; |
17270 |
- } |
17271 |
- |
17272 |
- b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; |
17273 |
- |
17274 |
- errno = oerrno; |
17275 |
-} |
17276 |
- |
17277 |
-/** Discard all buffered characters. On the next scan, YY_INPUT will be called. |
17278 |
- * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. |
17279 |
- * @param yyscanner The scanner object. |
17280 |
- */ |
17281 |
- void yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) |
17282 |
-{ |
17283 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
17284 |
- if ( ! b ) |
17285 |
- return; |
17286 |
- |
17287 |
- b->yy_n_chars = 0; |
17288 |
- |
17289 |
- /* We always need two end-of-buffer characters. The first causes |
17290 |
- * a transition to the end-of-buffer state. The second causes |
17291 |
- * a jam in that state. |
17292 |
- */ |
17293 |
- b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; |
17294 |
- b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; |
17295 |
- |
17296 |
- b->yy_buf_pos = &b->yy_ch_buf[0]; |
17297 |
- |
17298 |
- b->yy_at_bol = 1; |
17299 |
- b->yy_buffer_status = YY_BUFFER_NEW; |
17300 |
- |
17301 |
- if ( b == YY_CURRENT_BUFFER ) |
17302 |
- yy_load_buffer_state( yyscanner ); |
17303 |
-} |
17304 |
- |
17305 |
-/** Pushes the new state onto the stack. The new state becomes |
17306 |
- * the current state. This function will allocate the stack |
17307 |
- * if necessary. |
17308 |
- * @param new_buffer The new state. |
17309 |
- * @param yyscanner The scanner object. |
17310 |
- */ |
17311 |
-void yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) |
17312 |
-{ |
17313 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
17314 |
- if (new_buffer == NULL) |
17315 |
- return; |
17316 |
- |
17317 |
- yyensure_buffer_stack(yyscanner); |
17318 |
- |
17319 |
- /* This block is copied from yy_switch_to_buffer. */ |
17320 |
- if ( YY_CURRENT_BUFFER ) |
17321 |
- { |
17322 |
- /* Flush out information for old buffer. */ |
17323 |
- *yyg->yy_c_buf_p = yyg->yy_hold_char; |
17324 |
- YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; |
17325 |
- YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; |
17326 |
- } |
17327 |
- |
17328 |
- /* Only push if top exists. Otherwise, replace top. */ |
17329 |
- if (YY_CURRENT_BUFFER) |
17330 |
- yyg->yy_buffer_stack_top++; |
17331 |
- YY_CURRENT_BUFFER_LVALUE = new_buffer; |
17332 |
- |
17333 |
- /* copied from yy_switch_to_buffer. */ |
17334 |
- yy_load_buffer_state( yyscanner ); |
17335 |
- yyg->yy_did_buffer_switch_on_eof = 1; |
17336 |
-} |
17337 |
- |
17338 |
-/** Removes and deletes the top of the stack, if present. |
17339 |
- * The next element becomes the new top. |
17340 |
- * @param yyscanner The scanner object. |
17341 |
- */ |
17342 |
-void yypop_buffer_state (yyscan_t yyscanner) |
17343 |
-{ |
17344 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
17345 |
- if (!YY_CURRENT_BUFFER) |
17346 |
- return; |
17347 |
- |
17348 |
- yy_delete_buffer(YY_CURRENT_BUFFER , yyscanner); |
17349 |
- YY_CURRENT_BUFFER_LVALUE = NULL; |
17350 |
- if (yyg->yy_buffer_stack_top > 0) |
17351 |
- --yyg->yy_buffer_stack_top; |
17352 |
- |
17353 |
- if (YY_CURRENT_BUFFER) { |
17354 |
- yy_load_buffer_state( yyscanner ); |
17355 |
- yyg->yy_did_buffer_switch_on_eof = 1; |
17356 |
- } |
17357 |
-} |
17358 |
- |
17359 |
-/* Allocates the stack if it does not exist. |
17360 |
- * Guarantees space for at least one push. |
17361 |
- */ |
17362 |
-static void yyensure_buffer_stack (yyscan_t yyscanner) |
17363 |
-{ |
17364 |
- yy_size_t num_to_alloc; |
17365 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
17366 |
- |
17367 |
- if (!yyg->yy_buffer_stack) { |
17368 |
- |
17369 |
- /* First allocation is just for 2 elements, since we don't know if this |
17370 |
- * scanner will even need a stack. We use 2 instead of 1 to avoid an |
17371 |
- * immediate realloc on the next call. |
17372 |
- */ |
17373 |
- num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ |
17374 |
- yyg->yy_buffer_stack = (struct yy_buffer_state**)yyalloc |
17375 |
- (num_to_alloc * sizeof(struct yy_buffer_state*) |
17376 |
- , yyscanner); |
17377 |
- if ( ! yyg->yy_buffer_stack ) |
17378 |
- YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); |
17379 |
- |
17380 |
- memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*)); |
17381 |
- |
17382 |
- yyg->yy_buffer_stack_max = num_to_alloc; |
17383 |
- yyg->yy_buffer_stack_top = 0; |
17384 |
- return; |
17385 |
- } |
17386 |
- |
17387 |
- if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){ |
17388 |
- |
17389 |
- /* Increase the buffer to prepare for a possible push. */ |
17390 |
- yy_size_t grow_size = 8 /* arbitrary grow size */; |
17391 |
- |
17392 |
- num_to_alloc = yyg->yy_buffer_stack_max + grow_size; |
17393 |
- yyg->yy_buffer_stack = (struct yy_buffer_state**)yyrealloc |
17394 |
- (yyg->yy_buffer_stack, |
17395 |
- num_to_alloc * sizeof(struct yy_buffer_state*) |
17396 |
- , yyscanner); |
17397 |
- if ( ! yyg->yy_buffer_stack ) |
17398 |
- YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); |
17399 |
- |
17400 |
- /* zero only the new slots.*/ |
17401 |
- memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*)); |
17402 |
- yyg->yy_buffer_stack_max = num_to_alloc; |
17403 |
- } |
17404 |
-} |
17405 |
- |
17406 |
-/** Setup the input buffer state to scan directly from a user-specified character buffer. |
17407 |
- * @param base the character buffer |
17408 |
- * @param size the size in bytes of the character buffer |
17409 |
- * @param yyscanner The scanner object. |
17410 |
- * @return the newly allocated buffer state object. |
17411 |
- */ |
17412 |
-YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) |
17413 |
-{ |
17414 |
- YY_BUFFER_STATE b; |
17415 |
- |
17416 |
- if ( size < 2 || |
17417 |
- base[size-2] != YY_END_OF_BUFFER_CHAR || |
17418 |
- base[size-1] != YY_END_OF_BUFFER_CHAR ) |
17419 |
- /* They forgot to leave room for the EOB's. */ |
17420 |
- return NULL; |
17421 |
- |
17422 |
- b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner ); |
17423 |
- if ( ! b ) |
17424 |
- YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); |
17425 |
- |
17426 |
- b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */ |
17427 |
- b->yy_buf_pos = b->yy_ch_buf = base; |
17428 |
- b->yy_is_our_buffer = 0; |
17429 |
- b->yy_input_file = NULL; |
17430 |
- b->yy_n_chars = b->yy_buf_size; |
17431 |
- b->yy_is_interactive = 0; |
17432 |
- b->yy_at_bol = 1; |
17433 |
- b->yy_fill_buffer = 0; |
17434 |
- b->yy_buffer_status = YY_BUFFER_NEW; |
17435 |
- |
17436 |
- yy_switch_to_buffer( b , yyscanner ); |
17437 |
- |
17438 |
- return b; |
17439 |
-} |
17440 |
- |
17441 |
-/** Setup the input buffer state to scan a string. The next call to yylex() will |
17442 |
- * scan from a @e copy of @a str. |
17443 |
- * @param yystr a NUL-terminated string to scan |
17444 |
- * @param yyscanner The scanner object. |
17445 |
- * @return the newly allocated buffer state object. |
17446 |
- * @note If you want to scan bytes that may contain NUL values, then use |
17447 |
- * yy_scan_bytes() instead. |
17448 |
- */ |
17449 |
-YY_BUFFER_STATE yy_scan_string (const char * yystr , yyscan_t yyscanner) |
17450 |
-{ |
17451 |
- |
17452 |
- return yy_scan_bytes( yystr, (int) strlen(yystr) , yyscanner); |
17453 |
-} |
17454 |
- |
17455 |
-/** Setup the input buffer state to scan the given bytes. The next call to yylex() will |
17456 |
- * scan from a @e copy of @a bytes. |
17457 |
- * @param yybytes the byte buffer to scan |
17458 |
- * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. |
17459 |
- * @param yyscanner The scanner object. |
17460 |
- * @return the newly allocated buffer state object. |
17461 |
- */ |
17462 |
-YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len , yyscan_t yyscanner) |
17463 |
-{ |
17464 |
- YY_BUFFER_STATE b; |
17465 |
- char *buf; |
17466 |
- yy_size_t n; |
17467 |
- int i; |
17468 |
- |
17469 |
- /* Get memory for full buffer, including space for trailing EOB's. */ |
17470 |
- n = (yy_size_t) (_yybytes_len + 2); |
17471 |
- buf = (char *) yyalloc( n , yyscanner ); |
17472 |
- if ( ! buf ) |
17473 |
- YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); |
17474 |
- |
17475 |
- for ( i = 0; i < _yybytes_len; ++i ) |
17476 |
- buf[i] = yybytes[i]; |
17477 |
- |
17478 |
- buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; |
17479 |
- |
17480 |
- b = yy_scan_buffer( buf, n , yyscanner); |
17481 |
- if ( ! b ) |
17482 |
- YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); |
17483 |
- |
17484 |
- /* It's okay to grow etc. this buffer, and we should throw it |
17485 |
- * away when we're done. |
17486 |
- */ |
17487 |
- b->yy_is_our_buffer = 1; |
17488 |
- |
17489 |
- return b; |
17490 |
-} |
17491 |
- |
17492 |
-#ifndef YY_EXIT_FAILURE |
17493 |
-#define YY_EXIT_FAILURE 2 |
17494 |
-#endif |
17495 |
- |
17496 |
-static void yynoreturn yy_fatal_error (const char* msg , yyscan_t yyscanner) |
17497 |
-{ |
17498 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
17499 |
- (void)yyg; |
17500 |
- fprintf( stderr, "%s\n", msg ); |
17501 |
- exit( YY_EXIT_FAILURE ); |
17502 |
-} |
17503 |
- |
17504 |
-/* Redefine yyless() so it works in section 3 code. */ |
17505 |
- |
17506 |
-#undef yyless |
17507 |
-#define yyless(n) \ |
17508 |
- do \ |
17509 |
- { \ |
17510 |
- /* Undo effects of setting up yytext. */ \ |
17511 |
- int yyless_macro_arg = (n); \ |
17512 |
- YY_LESS_LINENO(yyless_macro_arg);\ |
17513 |
- yytext[yyleng] = yyg->yy_hold_char; \ |
17514 |
- yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ |
17515 |
- yyg->yy_hold_char = *yyg->yy_c_buf_p; \ |
17516 |
- *yyg->yy_c_buf_p = '\0'; \ |
17517 |
- yyleng = yyless_macro_arg; \ |
17518 |
- } \ |
17519 |
- while ( 0 ) |
17520 |
- |
17521 |
-/* Accessor methods (get/set functions) to struct members. */ |
17522 |
- |
17523 |
-/** Get the user-defined data for this scanner. |
17524 |
- * @param yyscanner The scanner object. |
17525 |
- */ |
17526 |
-YY_EXTRA_TYPE yyget_extra (yyscan_t yyscanner) |
17527 |
-{ |
17528 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
17529 |
- return yyextra; |
17530 |
-} |
17531 |
- |
17532 |
-/** Get the current line number. |
17533 |
- * @param yyscanner The scanner object. |
17534 |
- */ |
17535 |
-int yyget_lineno (yyscan_t yyscanner) |
17536 |
-{ |
17537 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
17538 |
- |
17539 |
- if (! YY_CURRENT_BUFFER) |
17540 |
- return 0; |
17541 |
- |
17542 |
- return yylineno; |
17543 |
-} |
17544 |
- |
17545 |
-/** Get the current column number. |
17546 |
- * @param yyscanner The scanner object. |
17547 |
- */ |
17548 |
-int yyget_column (yyscan_t yyscanner) |
17549 |
-{ |
17550 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
17551 |
- |
17552 |
- if (! YY_CURRENT_BUFFER) |
17553 |
- return 0; |
17554 |
- |
17555 |
- return yycolumn; |
17556 |
-} |
17557 |
- |
17558 |
-/** Get the input stream. |
17559 |
- * @param yyscanner The scanner object. |
17560 |
- */ |
17561 |
-FILE *yyget_in (yyscan_t yyscanner) |
17562 |
-{ |
17563 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
17564 |
- return yyin; |
17565 |
-} |
17566 |
- |
17567 |
-/** Get the output stream. |
17568 |
- * @param yyscanner The scanner object. |
17569 |
- */ |
17570 |
-FILE *yyget_out (yyscan_t yyscanner) |
17571 |
-{ |
17572 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
17573 |
- return yyout; |
17574 |
-} |
17575 |
- |
17576 |
-/** Get the length of the current token. |
17577 |
- * @param yyscanner The scanner object. |
17578 |
- */ |
17579 |
-int yyget_leng (yyscan_t yyscanner) |
17580 |
-{ |
17581 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
17582 |
- return yyleng; |
17583 |
-} |
17584 |
- |
17585 |
-/** Get the current token. |
17586 |
- * @param yyscanner The scanner object. |
17587 |
- */ |
17588 |
- |
17589 |
-char *yyget_text (yyscan_t yyscanner) |
17590 |
-{ |
17591 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
17592 |
- return yytext; |
17593 |
-} |
17594 |
- |
17595 |
-/** Set the user-defined data. This data is never touched by the scanner. |
17596 |
- * @param user_defined The data to be associated with this scanner. |
17597 |
- * @param yyscanner The scanner object. |
17598 |
- */ |
17599 |
-void yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner) |
17600 |
-{ |
17601 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
17602 |
- yyextra = user_defined ; |
17603 |
-} |
17604 |
- |
17605 |
-/** Set the current line number. |
17606 |
- * @param _line_number line number |
17607 |
- * @param yyscanner The scanner object. |
17608 |
- */ |
17609 |
-void yyset_lineno (int _line_number , yyscan_t yyscanner) |
17610 |
-{ |
17611 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
17612 |
- |
17613 |
- /* lineno is only valid if an input buffer exists. */ |
17614 |
- if (! YY_CURRENT_BUFFER ) |
17615 |
- YY_FATAL_ERROR( "yyset_lineno called with no buffer" ); |
17616 |
- |
17617 |
- yylineno = _line_number; |
17618 |
-} |
17619 |
- |
17620 |
-/** Set the current column. |
17621 |
- * @param _column_no column number |
17622 |
- * @param yyscanner The scanner object. |
17623 |
- */ |
17624 |
-void yyset_column (int _column_no , yyscan_t yyscanner) |
17625 |
-{ |
17626 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
17627 |
- |
17628 |
- /* column is only valid if an input buffer exists. */ |
17629 |
- if (! YY_CURRENT_BUFFER ) |
17630 |
- YY_FATAL_ERROR( "yyset_column called with no buffer" ); |
17631 |
- |
17632 |
- yycolumn = _column_no; |
17633 |
-} |
17634 |
- |
17635 |
-/** Set the input stream. This does not discard the current |
17636 |
- * input buffer. |
17637 |
- * @param _in_str A readable stream. |
17638 |
- * @param yyscanner The scanner object. |
17639 |
- * @see yy_switch_to_buffer |
17640 |
- */ |
17641 |
-void yyset_in (FILE * _in_str , yyscan_t yyscanner) |
17642 |
-{ |
17643 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
17644 |
- yyin = _in_str ; |
17645 |
-} |
17646 |
- |
17647 |
-void yyset_out (FILE * _out_str , yyscan_t yyscanner) |
17648 |
-{ |
17649 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
17650 |
- yyout = _out_str ; |
17651 |
-} |
17652 |
- |
17653 |
-int yyget_debug (yyscan_t yyscanner) |
17654 |
-{ |
17655 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
17656 |
- return yy_flex_debug; |
17657 |
-} |
17658 |
- |
17659 |
-void yyset_debug (int _bdebug , yyscan_t yyscanner) |
17660 |
-{ |
17661 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
17662 |
- yy_flex_debug = _bdebug ; |
17663 |
-} |
17664 |
- |
17665 |
-/* Accessor methods for yylval and yylloc */ |
17666 |
- |
17667 |
-YYSTYPE * yyget_lval (yyscan_t yyscanner) |
17668 |
-{ |
17669 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
17670 |
- return yylval; |
17671 |
-} |
17672 |
- |
17673 |
-void yyset_lval (YYSTYPE * yylval_param , yyscan_t yyscanner) |
17674 |
-{ |
17675 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
17676 |
- yylval = yylval_param; |
17677 |
-} |
17678 |
- |
17679 |
-/* User-visible API */ |
17680 |
- |
17681 |
-/* yylex_init is special because it creates the scanner itself, so it is |
17682 |
- * the ONLY reentrant function that doesn't take the scanner as the last argument. |
17683 |
- * That's why we explicitly handle the declaration, instead of using our macros. |
17684 |
- */ |
17685 |
-int yylex_init(yyscan_t* ptr_yy_globals) |
17686 |
-{ |
17687 |
- if (ptr_yy_globals == NULL){ |
17688 |
- errno = EINVAL; |
17689 |
- return 1; |
17690 |
- } |
17691 |
- |
17692 |
- *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), NULL ); |
17693 |
- |
17694 |
- if (*ptr_yy_globals == NULL){ |
17695 |
- errno = ENOMEM; |
17696 |
- return 1; |
17697 |
- } |
17698 |
- |
17699 |
- /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ |
17700 |
- memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); |
17701 |
- |
17702 |
- return yy_init_globals ( *ptr_yy_globals ); |
17703 |
-} |
17704 |
- |
17705 |
-/* yylex_init_extra has the same functionality as yylex_init, but follows the |
17706 |
- * convention of taking the scanner as the last argument. Note however, that |
17707 |
- * this is a *pointer* to a scanner, as it will be allocated by this call (and |
17708 |
- * is the reason, too, why this function also must handle its own declaration). |
17709 |
- * The user defined value in the first argument will be available to yyalloc in |
17710 |
- * the yyextra field. |
17711 |
- */ |
17712 |
-int yylex_init_extra( YY_EXTRA_TYPE yy_user_defined, yyscan_t* ptr_yy_globals ) |
17713 |
-{ |
17714 |
- struct yyguts_t dummy_yyguts; |
17715 |
- |
17716 |
- yyset_extra (yy_user_defined, &dummy_yyguts); |
17717 |
- |
17718 |
- if (ptr_yy_globals == NULL){ |
17719 |
- errno = EINVAL; |
17720 |
- return 1; |
17721 |
- } |
17722 |
- |
17723 |
- *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts ); |
17724 |
- |
17725 |
- if (*ptr_yy_globals == NULL){ |
17726 |
- errno = ENOMEM; |
17727 |
- return 1; |
17728 |
- } |
17729 |
- |
17730 |
- /* By setting to 0xAA, we expose bugs in |
17731 |
- yy_init_globals. Leave at 0x00 for releases. */ |
17732 |
- memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); |
17733 |
- |
17734 |
- yyset_extra (yy_user_defined, *ptr_yy_globals); |
17735 |
- |
17736 |
- return yy_init_globals ( *ptr_yy_globals ); |
17737 |
-} |
17738 |
- |
17739 |
-static int yy_init_globals (yyscan_t yyscanner) |
17740 |
-{ |
17741 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
17742 |
- /* Initialization is the same as for the non-reentrant scanner. |
17743 |
- * This function is called from yylex_destroy(), so don't allocate here. |
17744 |
- */ |
17745 |
- |
17746 |
- yyg->yy_buffer_stack = NULL; |
17747 |
- yyg->yy_buffer_stack_top = 0; |
17748 |
- yyg->yy_buffer_stack_max = 0; |
17749 |
- yyg->yy_c_buf_p = NULL; |
17750 |
- yyg->yy_init = 0; |
17751 |
- yyg->yy_start = 0; |
17752 |
- |
17753 |
- yyg->yy_start_stack_ptr = 0; |
17754 |
- yyg->yy_start_stack_depth = 0; |
17755 |
- yyg->yy_start_stack = NULL; |
17756 |
- |
17757 |
-/* Defined in main.c */ |
17758 |
-#ifdef YY_STDINIT |
17759 |
- yyin = stdin; |
17760 |
- yyout = stdout; |
17761 |
-#else |
17762 |
- yyin = NULL; |
17763 |
- yyout = NULL; |
17764 |
-#endif |
17765 |
- |
17766 |
- /* For future reference: Set errno on error, since we are called by |
17767 |
- * yylex_init() |
17768 |
- */ |
17769 |
- return 0; |
17770 |
-} |
17771 |
- |
17772 |
-/* yylex_destroy is for both reentrant and non-reentrant scanners. */ |
17773 |
-int yylex_destroy (yyscan_t yyscanner) |
17774 |
-{ |
17775 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
17776 |
- |
17777 |
- /* Pop the buffer stack, destroying each element. */ |
17778 |
- while(YY_CURRENT_BUFFER){ |
17779 |
- yy_delete_buffer( YY_CURRENT_BUFFER , yyscanner ); |
17780 |
- YY_CURRENT_BUFFER_LVALUE = NULL; |
17781 |
- yypop_buffer_state(yyscanner); |
17782 |
- } |
17783 |
- |
17784 |
- /* Destroy the stack itself. */ |
17785 |
- yyfree(yyg->yy_buffer_stack , yyscanner); |
17786 |
- yyg->yy_buffer_stack = NULL; |
17787 |
- |
17788 |
- /* Destroy the start condition stack. */ |
17789 |
- yyfree( yyg->yy_start_stack , yyscanner ); |
17790 |
- yyg->yy_start_stack = NULL; |
17791 |
- |
17792 |
- /* Reset the globals. This is important in a non-reentrant scanner so the next time |
17793 |
- * yylex() is called, initialization will occur. */ |
17794 |
- yy_init_globals( yyscanner); |
17795 |
- |
17796 |
- /* Destroy the main struct (reentrant only). */ |
17797 |
- yyfree ( yyscanner , yyscanner ); |
17798 |
- yyscanner = NULL; |
17799 |
- return 0; |
17800 |
-} |
17801 |
- |
17802 |
-/* |
17803 |
- * Internal utility routines. |
17804 |
- */ |
17805 |
- |
17806 |
-#ifndef yytext_ptr |
17807 |
-static void yy_flex_strncpy (char* s1, const char * s2, int n , yyscan_t yyscanner) |
17808 |
-{ |
17809 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
17810 |
- (void)yyg; |
17811 |
- |
17812 |
- int i; |
17813 |
- for ( i = 0; i < n; ++i ) |
17814 |
- s1[i] = s2[i]; |
17815 |
-} |
17816 |
-#endif |
17817 |
- |
17818 |
-#ifdef YY_NEED_STRLEN |
17819 |
-static int yy_flex_strlen (const char * s , yyscan_t yyscanner) |
17820 |
-{ |
17821 |
- int n; |
17822 |
- for ( n = 0; s[n]; ++n ) |
17823 |
- ; |
17824 |
- |
17825 |
- return n; |
17826 |
-} |
17827 |
-#endif |
17828 |
- |
17829 |
-void *yyalloc (yy_size_t size , yyscan_t yyscanner) |
17830 |
-{ |
17831 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
17832 |
- (void)yyg; |
17833 |
- return malloc(size); |
17834 |
-} |
17835 |
- |
17836 |
-void *yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner) |
17837 |
-{ |
17838 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
17839 |
- (void)yyg; |
17840 |
- |
17841 |
- /* The cast to (char *) in the following accommodates both |
17842 |
- * implementations that use char* generic pointers, and those |
17843 |
- * that use void* generic pointers. It works with the latter |
17844 |
- * because both ANSI C and C++ allow castless assignment from |
17845 |
- * any pointer type to void*, and deal with argument conversions |
17846 |
- * as though doing an assignment. |
17847 |
- */ |
17848 |
- return realloc(ptr, size); |
17849 |
-} |
17850 |
- |
17851 |
-void yyfree (void * ptr , yyscan_t yyscanner) |
17852 |
-{ |
17853 |
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
17854 |
- (void)yyg; |
17855 |
- free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ |
17856 |
-} |
17857 |
- |
17858 |
-#define YYTABLES_NAME "yytables" |
17859 |
- |
17860 |
-#line 96 "vm_var_parser.l" |
17861 |
- |
17862 |
- |
17863 |
-int vm_var_wrap(yyscan_t scanner) |
17864 |
-{ |
17865 |
- return 1; |
17866 |
-} |
17867 |
- |
17868 |
|
17869 |
diff --git a/app-emulation/opennebula/files/opennebula-5.10.1/parsers/vm_var_parser.h b/app-emulation/opennebula/files/opennebula-5.10.1/parsers/vm_var_parser.h |
17870 |
deleted file mode 100644 |
17871 |
index a2b85a7..0000000 |
17872 |
--- a/app-emulation/opennebula/files/opennebula-5.10.1/parsers/vm_var_parser.h |
17873 |
+++ /dev/null |
17874 |
@@ -1,719 +0,0 @@ |
17875 |
-#ifndef vm_var_HEADER_H |
17876 |
-#define vm_var_HEADER_H 1 |
17877 |
-#define vm_var_IN_HEADER 1 |
17878 |
- |
17879 |
-#line 5 "vm_var_parser.h" |
17880 |
- |
17881 |
-#line 7 "vm_var_parser.h" |
17882 |
- |
17883 |
-#define YY_INT_ALIGNED short int |
17884 |
- |
17885 |
-/* A lexical scanner generated by flex */ |
17886 |
- |
17887 |
-#define FLEX_SCANNER |
17888 |
-#define YY_FLEX_MAJOR_VERSION 2 |
17889 |
-#define YY_FLEX_MINOR_VERSION 6 |
17890 |
-#define YY_FLEX_SUBMINOR_VERSION 4 |
17891 |
-#if YY_FLEX_SUBMINOR_VERSION > 0 |
17892 |
-#define FLEX_BETA |
17893 |
-#endif |
17894 |
- |
17895 |
-#ifdef yy_create_buffer |
17896 |
-#define vm_var__create_buffer_ALREADY_DEFINED |
17897 |
-#else |
17898 |
-#define yy_create_buffer vm_var__create_buffer |
17899 |
-#endif |
17900 |
- |
17901 |
-#ifdef yy_delete_buffer |
17902 |
-#define vm_var__delete_buffer_ALREADY_DEFINED |
17903 |
-#else |
17904 |
-#define yy_delete_buffer vm_var__delete_buffer |
17905 |
-#endif |
17906 |
- |
17907 |
-#ifdef yy_scan_buffer |
17908 |
-#define vm_var__scan_buffer_ALREADY_DEFINED |
17909 |
-#else |
17910 |
-#define yy_scan_buffer vm_var__scan_buffer |
17911 |
-#endif |
17912 |
- |
17913 |
-#ifdef yy_scan_string |
17914 |
-#define vm_var__scan_string_ALREADY_DEFINED |
17915 |
-#else |
17916 |
-#define yy_scan_string vm_var__scan_string |
17917 |
-#endif |
17918 |
- |
17919 |
-#ifdef yy_scan_bytes |
17920 |
-#define vm_var__scan_bytes_ALREADY_DEFINED |
17921 |
-#else |
17922 |
-#define yy_scan_bytes vm_var__scan_bytes |
17923 |
-#endif |
17924 |
- |
17925 |
-#ifdef yy_init_buffer |
17926 |
-#define vm_var__init_buffer_ALREADY_DEFINED |
17927 |
-#else |
17928 |
-#define yy_init_buffer vm_var__init_buffer |
17929 |
-#endif |
17930 |
- |
17931 |
-#ifdef yy_flush_buffer |
17932 |
-#define vm_var__flush_buffer_ALREADY_DEFINED |
17933 |
-#else |
17934 |
-#define yy_flush_buffer vm_var__flush_buffer |
17935 |
-#endif |
17936 |
- |
17937 |
-#ifdef yy_load_buffer_state |
17938 |
-#define vm_var__load_buffer_state_ALREADY_DEFINED |
17939 |
-#else |
17940 |
-#define yy_load_buffer_state vm_var__load_buffer_state |
17941 |
-#endif |
17942 |
- |
17943 |
-#ifdef yy_switch_to_buffer |
17944 |
-#define vm_var__switch_to_buffer_ALREADY_DEFINED |
17945 |
-#else |
17946 |
-#define yy_switch_to_buffer vm_var__switch_to_buffer |
17947 |
-#endif |
17948 |
- |
17949 |
-#ifdef yypush_buffer_state |
17950 |
-#define vm_var_push_buffer_state_ALREADY_DEFINED |
17951 |
-#else |
17952 |
-#define yypush_buffer_state vm_var_push_buffer_state |
17953 |
-#endif |
17954 |
- |
17955 |
-#ifdef yypop_buffer_state |
17956 |
-#define vm_var_pop_buffer_state_ALREADY_DEFINED |
17957 |
-#else |
17958 |
-#define yypop_buffer_state vm_var_pop_buffer_state |
17959 |
-#endif |
17960 |
- |
17961 |
-#ifdef yyensure_buffer_stack |
17962 |
-#define vm_var_ensure_buffer_stack_ALREADY_DEFINED |
17963 |
-#else |
17964 |
-#define yyensure_buffer_stack vm_var_ensure_buffer_stack |
17965 |
-#endif |
17966 |
- |
17967 |
-#ifdef yylex |
17968 |
-#define vm_var_lex_ALREADY_DEFINED |
17969 |
-#else |
17970 |
-#define yylex vm_var_lex |
17971 |
-#endif |
17972 |
- |
17973 |
-#ifdef yyrestart |
17974 |
-#define vm_var_restart_ALREADY_DEFINED |
17975 |
-#else |
17976 |
-#define yyrestart vm_var_restart |
17977 |
-#endif |
17978 |
- |
17979 |
-#ifdef yylex_init |
17980 |
-#define vm_var_lex_init_ALREADY_DEFINED |
17981 |
-#else |
17982 |
-#define yylex_init vm_var_lex_init |
17983 |
-#endif |
17984 |
- |
17985 |
-#ifdef yylex_init_extra |
17986 |
-#define vm_var_lex_init_extra_ALREADY_DEFINED |
17987 |
-#else |
17988 |
-#define yylex_init_extra vm_var_lex_init_extra |
17989 |
-#endif |
17990 |
- |
17991 |
-#ifdef yylex_destroy |
17992 |
-#define vm_var_lex_destroy_ALREADY_DEFINED |
17993 |
-#else |
17994 |
-#define yylex_destroy vm_var_lex_destroy |
17995 |
-#endif |
17996 |
- |
17997 |
-#ifdef yyget_debug |
17998 |
-#define vm_var_get_debug_ALREADY_DEFINED |
17999 |
-#else |
18000 |
-#define yyget_debug vm_var_get_debug |
18001 |
-#endif |
18002 |
- |
18003 |
-#ifdef yyset_debug |
18004 |
-#define vm_var_set_debug_ALREADY_DEFINED |
18005 |
-#else |
18006 |
-#define yyset_debug vm_var_set_debug |
18007 |
-#endif |
18008 |
- |
18009 |
-#ifdef yyget_extra |
18010 |
-#define vm_var_get_extra_ALREADY_DEFINED |
18011 |
-#else |
18012 |
-#define yyget_extra vm_var_get_extra |
18013 |
-#endif |
18014 |
- |
18015 |
-#ifdef yyset_extra |
18016 |
-#define vm_var_set_extra_ALREADY_DEFINED |
18017 |
-#else |
18018 |
-#define yyset_extra vm_var_set_extra |
18019 |
-#endif |
18020 |
- |
18021 |
-#ifdef yyget_in |
18022 |
-#define vm_var_get_in_ALREADY_DEFINED |
18023 |
-#else |
18024 |
-#define yyget_in vm_var_get_in |
18025 |
-#endif |
18026 |
- |
18027 |
-#ifdef yyset_in |
18028 |
-#define vm_var_set_in_ALREADY_DEFINED |
18029 |
-#else |
18030 |
-#define yyset_in vm_var_set_in |
18031 |
-#endif |
18032 |
- |
18033 |
-#ifdef yyget_out |
18034 |
-#define vm_var_get_out_ALREADY_DEFINED |
18035 |
-#else |
18036 |
-#define yyget_out vm_var_get_out |
18037 |
-#endif |
18038 |
- |
18039 |
-#ifdef yyset_out |
18040 |
-#define vm_var_set_out_ALREADY_DEFINED |
18041 |
-#else |
18042 |
-#define yyset_out vm_var_set_out |
18043 |
-#endif |
18044 |
- |
18045 |
-#ifdef yyget_leng |
18046 |
-#define vm_var_get_leng_ALREADY_DEFINED |
18047 |
-#else |
18048 |
-#define yyget_leng vm_var_get_leng |
18049 |
-#endif |
18050 |
- |
18051 |
-#ifdef yyget_text |
18052 |
-#define vm_var_get_text_ALREADY_DEFINED |
18053 |
-#else |
18054 |
-#define yyget_text vm_var_get_text |
18055 |
-#endif |
18056 |
- |
18057 |
-#ifdef yyget_lineno |
18058 |
-#define vm_var_get_lineno_ALREADY_DEFINED |
18059 |
-#else |
18060 |
-#define yyget_lineno vm_var_get_lineno |
18061 |
-#endif |
18062 |
- |
18063 |
-#ifdef yyset_lineno |
18064 |
-#define vm_var_set_lineno_ALREADY_DEFINED |
18065 |
-#else |
18066 |
-#define yyset_lineno vm_var_set_lineno |
18067 |
-#endif |
18068 |
- |
18069 |
-#ifdef yyget_column |
18070 |
-#define vm_var_get_column_ALREADY_DEFINED |
18071 |
-#else |
18072 |
-#define yyget_column vm_var_get_column |
18073 |
-#endif |
18074 |
- |
18075 |
-#ifdef yyset_column |
18076 |
-#define vm_var_set_column_ALREADY_DEFINED |
18077 |
-#else |
18078 |
-#define yyset_column vm_var_set_column |
18079 |
-#endif |
18080 |
- |
18081 |
-#ifdef yywrap |
18082 |
-#define vm_var_wrap_ALREADY_DEFINED |
18083 |
-#else |
18084 |
-#define yywrap vm_var_wrap |
18085 |
-#endif |
18086 |
- |
18087 |
-#ifdef yyget_lval |
18088 |
-#define vm_var_get_lval_ALREADY_DEFINED |
18089 |
-#else |
18090 |
-#define yyget_lval vm_var_get_lval |
18091 |
-#endif |
18092 |
- |
18093 |
-#ifdef yyset_lval |
18094 |
-#define vm_var_set_lval_ALREADY_DEFINED |
18095 |
-#else |
18096 |
-#define yyset_lval vm_var_set_lval |
18097 |
-#endif |
18098 |
- |
18099 |
-#ifdef yyalloc |
18100 |
-#define vm_var_alloc_ALREADY_DEFINED |
18101 |
-#else |
18102 |
-#define yyalloc vm_var_alloc |
18103 |
-#endif |
18104 |
- |
18105 |
-#ifdef yyrealloc |
18106 |
-#define vm_var_realloc_ALREADY_DEFINED |
18107 |
-#else |
18108 |
-#define yyrealloc vm_var_realloc |
18109 |
-#endif |
18110 |
- |
18111 |
-#ifdef yyfree |
18112 |
-#define vm_var_free_ALREADY_DEFINED |
18113 |
-#else |
18114 |
-#define yyfree vm_var_free |
18115 |
-#endif |
18116 |
- |
18117 |
-/* First, we deal with platform-specific or compiler-specific issues. */ |
18118 |
- |
18119 |
-/* begin standard C headers. */ |
18120 |
-#include <stdio.h> |
18121 |
-#include <string.h> |
18122 |
-#include <errno.h> |
18123 |
-#include <stdlib.h> |
18124 |
- |
18125 |
-/* end standard C headers. */ |
18126 |
- |
18127 |
-/* flex integer type definitions */ |
18128 |
- |
18129 |
-#ifndef FLEXINT_H |
18130 |
-#define FLEXINT_H |
18131 |
- |
18132 |
-/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */ |
18133 |
- |
18134 |
-#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L |
18135 |
- |
18136 |
-/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, |
18137 |
- * if you want the limit (max/min) macros for int types. |
18138 |
- */ |
18139 |
-#ifndef __STDC_LIMIT_MACROS |
18140 |
-#define __STDC_LIMIT_MACROS 1 |
18141 |
-#endif |
18142 |
- |
18143 |
-#include <inttypes.h> |
18144 |
-typedef int8_t flex_int8_t; |
18145 |
-typedef uint8_t flex_uint8_t; |
18146 |
-typedef int16_t flex_int16_t; |
18147 |
-typedef uint16_t flex_uint16_t; |
18148 |
-typedef int32_t flex_int32_t; |
18149 |
-typedef uint32_t flex_uint32_t; |
18150 |
-#else |
18151 |
-typedef signed char flex_int8_t; |
18152 |
-typedef short int flex_int16_t; |
18153 |
-typedef int flex_int32_t; |
18154 |
-typedef unsigned char flex_uint8_t; |
18155 |
-typedef unsigned short int flex_uint16_t; |
18156 |
-typedef unsigned int flex_uint32_t; |
18157 |
- |
18158 |
-/* Limits of integral types. */ |
18159 |
-#ifndef INT8_MIN |
18160 |
-#define INT8_MIN (-128) |
18161 |
-#endif |
18162 |
-#ifndef INT16_MIN |
18163 |
-#define INT16_MIN (-32767-1) |
18164 |
-#endif |
18165 |
-#ifndef INT32_MIN |
18166 |
-#define INT32_MIN (-2147483647-1) |
18167 |
-#endif |
18168 |
-#ifndef INT8_MAX |
18169 |
-#define INT8_MAX (127) |
18170 |
-#endif |
18171 |
-#ifndef INT16_MAX |
18172 |
-#define INT16_MAX (32767) |
18173 |
-#endif |
18174 |
-#ifndef INT32_MAX |
18175 |
-#define INT32_MAX (2147483647) |
18176 |
-#endif |
18177 |
-#ifndef UINT8_MAX |
18178 |
-#define UINT8_MAX (255U) |
18179 |
-#endif |
18180 |
-#ifndef UINT16_MAX |
18181 |
-#define UINT16_MAX (65535U) |
18182 |
-#endif |
18183 |
-#ifndef UINT32_MAX |
18184 |
-#define UINT32_MAX (4294967295U) |
18185 |
-#endif |
18186 |
- |
18187 |
-#ifndef SIZE_MAX |
18188 |
-#define SIZE_MAX (~(size_t)0) |
18189 |
-#endif |
18190 |
- |
18191 |
-#endif /* ! C99 */ |
18192 |
- |
18193 |
-#endif /* ! FLEXINT_H */ |
18194 |
- |
18195 |
-/* begin standard C++ headers. */ |
18196 |
- |
18197 |
-/* TODO: this is always defined, so inline it */ |
18198 |
-#define yyconst const |
18199 |
- |
18200 |
-#if defined(__GNUC__) && __GNUC__ >= 3 |
18201 |
-#define yynoreturn __attribute__((__noreturn__)) |
18202 |
-#else |
18203 |
-#define yynoreturn |
18204 |
-#endif |
18205 |
- |
18206 |
-/* An opaque pointer. */ |
18207 |
-#ifndef YY_TYPEDEF_YY_SCANNER_T |
18208 |
-#define YY_TYPEDEF_YY_SCANNER_T |
18209 |
-typedef void* yyscan_t; |
18210 |
-#endif |
18211 |
- |
18212 |
-/* For convenience, these vars (plus the bison vars far below) |
18213 |
- are macros in the reentrant scanner. */ |
18214 |
-#define yyin yyg->yyin_r |
18215 |
-#define yyout yyg->yyout_r |
18216 |
-#define yyextra yyg->yyextra_r |
18217 |
-#define yyleng yyg->yyleng_r |
18218 |
-#define yytext yyg->yytext_r |
18219 |
-#define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno) |
18220 |
-#define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column) |
18221 |
-#define yy_flex_debug yyg->yy_flex_debug_r |
18222 |
- |
18223 |
-/* Size of default input buffer. */ |
18224 |
-#ifndef YY_BUF_SIZE |
18225 |
-#ifdef __ia64__ |
18226 |
-/* On IA-64, the buffer size is 16k, not 8k. |
18227 |
- * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. |
18228 |
- * Ditto for the __ia64__ case accordingly. |
18229 |
- */ |
18230 |
-#define YY_BUF_SIZE 32768 |
18231 |
-#else |
18232 |
-#define YY_BUF_SIZE 16384 |
18233 |
-#endif /* __ia64__ */ |
18234 |
-#endif |
18235 |
- |
18236 |
-#ifndef YY_TYPEDEF_YY_BUFFER_STATE |
18237 |
-#define YY_TYPEDEF_YY_BUFFER_STATE |
18238 |
-typedef struct yy_buffer_state *YY_BUFFER_STATE; |
18239 |
-#endif |
18240 |
- |
18241 |
-#ifndef YY_TYPEDEF_YY_SIZE_T |
18242 |
-#define YY_TYPEDEF_YY_SIZE_T |
18243 |
-typedef size_t yy_size_t; |
18244 |
-#endif |
18245 |
- |
18246 |
-#ifndef YY_STRUCT_YY_BUFFER_STATE |
18247 |
-#define YY_STRUCT_YY_BUFFER_STATE |
18248 |
-struct yy_buffer_state |
18249 |
- { |
18250 |
- FILE *yy_input_file; |
18251 |
- |
18252 |
- char *yy_ch_buf; /* input buffer */ |
18253 |
- char *yy_buf_pos; /* current position in input buffer */ |
18254 |
- |
18255 |
- /* Size of input buffer in bytes, not including room for EOB |
18256 |
- * characters. |
18257 |
- */ |
18258 |
- int yy_buf_size; |
18259 |
- |
18260 |
- /* Number of characters read into yy_ch_buf, not including EOB |
18261 |
- * characters. |
18262 |
- */ |
18263 |
- int yy_n_chars; |
18264 |
- |
18265 |
- /* Whether we "own" the buffer - i.e., we know we created it, |
18266 |
- * and can realloc() it to grow it, and should free() it to |
18267 |
- * delete it. |
18268 |
- */ |
18269 |
- int yy_is_our_buffer; |
18270 |
- |
18271 |
- /* Whether this is an "interactive" input source; if so, and |
18272 |
- * if we're using stdio for input, then we want to use getc() |
18273 |
- * instead of fread(), to make sure we stop fetching input after |
18274 |
- * each newline. |
18275 |
- */ |
18276 |
- int yy_is_interactive; |
18277 |
- |
18278 |
- /* Whether we're considered to be at the beginning of a line. |
18279 |
- * If so, '^' rules will be active on the next match, otherwise |
18280 |
- * not. |
18281 |
- */ |
18282 |
- int yy_at_bol; |
18283 |
- |
18284 |
- int yy_bs_lineno; /**< The line count. */ |
18285 |
- int yy_bs_column; /**< The column count. */ |
18286 |
- |
18287 |
- /* Whether to try to fill the input buffer when we reach the |
18288 |
- * end of it. |
18289 |
- */ |
18290 |
- int yy_fill_buffer; |
18291 |
- |
18292 |
- int yy_buffer_status; |
18293 |
- |
18294 |
- }; |
18295 |
-#endif /* !YY_STRUCT_YY_BUFFER_STATE */ |
18296 |
- |
18297 |
-void yyrestart ( FILE *input_file , yyscan_t yyscanner ); |
18298 |
-void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); |
18299 |
-YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner ); |
18300 |
-void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); |
18301 |
-void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); |
18302 |
-void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); |
18303 |
-void yypop_buffer_state ( yyscan_t yyscanner ); |
18304 |
- |
18305 |
-YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner ); |
18306 |
-YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner ); |
18307 |
-YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len , yyscan_t yyscanner ); |
18308 |
- |
18309 |
-void *yyalloc ( yy_size_t , yyscan_t yyscanner ); |
18310 |
-void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner ); |
18311 |
-void yyfree ( void * , yyscan_t yyscanner ); |
18312 |
- |
18313 |
-/* Begin user sect3 */ |
18314 |
- |
18315 |
-#define yytext_ptr yytext_r |
18316 |
- |
18317 |
-#ifdef YY_HEADER_EXPORT_START_CONDITIONS |
18318 |
-#define INITIAL 0 |
18319 |
-#define VAR 1 |
18320 |
-#define VALUE 2 |
18321 |
- |
18322 |
-#endif |
18323 |
- |
18324 |
-#ifndef YY_NO_UNISTD_H |
18325 |
-/* Special case for "unistd.h", since it is non-ANSI. We include it way |
18326 |
- * down here because we want the user's section 1 to have been scanned first. |
18327 |
- * The user has a chance to override it with an option. |
18328 |
- */ |
18329 |
-#include <unistd.h> |
18330 |
-#endif |
18331 |
- |
18332 |
-#ifndef YY_EXTRA_TYPE |
18333 |
-#define YY_EXTRA_TYPE void * |
18334 |
-#endif |
18335 |
- |
18336 |
-int yylex_init (yyscan_t* scanner); |
18337 |
- |
18338 |
-int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner); |
18339 |
- |
18340 |
-/* Accessor methods to globals. |
18341 |
- These are made visible to non-reentrant scanners for convenience. */ |
18342 |
- |
18343 |
-int yylex_destroy ( yyscan_t yyscanner ); |
18344 |
- |
18345 |
-int yyget_debug ( yyscan_t yyscanner ); |
18346 |
- |
18347 |
-void yyset_debug ( int debug_flag , yyscan_t yyscanner ); |
18348 |
- |
18349 |
-YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner ); |
18350 |
- |
18351 |
-void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner ); |
18352 |
- |
18353 |
-FILE *yyget_in ( yyscan_t yyscanner ); |
18354 |
- |
18355 |
-void yyset_in ( FILE * _in_str , yyscan_t yyscanner ); |
18356 |
- |
18357 |
-FILE *yyget_out ( yyscan_t yyscanner ); |
18358 |
- |
18359 |
-void yyset_out ( FILE * _out_str , yyscan_t yyscanner ); |
18360 |
- |
18361 |
- int yyget_leng ( yyscan_t yyscanner ); |
18362 |
- |
18363 |
-char *yyget_text ( yyscan_t yyscanner ); |
18364 |
- |
18365 |
-int yyget_lineno ( yyscan_t yyscanner ); |
18366 |
- |
18367 |
-void yyset_lineno ( int _line_number , yyscan_t yyscanner ); |
18368 |
- |
18369 |
-int yyget_column ( yyscan_t yyscanner ); |
18370 |
- |
18371 |
-void yyset_column ( int _column_no , yyscan_t yyscanner ); |
18372 |
- |
18373 |
-YYSTYPE * yyget_lval ( yyscan_t yyscanner ); |
18374 |
- |
18375 |
-void yyset_lval ( YYSTYPE * yylval_param , yyscan_t yyscanner ); |
18376 |
- |
18377 |
-/* Macros after this point can all be overridden by user definitions in |
18378 |
- * section 1. |
18379 |
- */ |
18380 |
- |
18381 |
-#ifndef YY_SKIP_YYWRAP |
18382 |
-#ifdef __cplusplus |
18383 |
-extern "C" int yywrap ( yyscan_t yyscanner ); |
18384 |
-#else |
18385 |
-extern int yywrap ( yyscan_t yyscanner ); |
18386 |
-#endif |
18387 |
-#endif |
18388 |
- |
18389 |
-#ifndef yytext_ptr |
18390 |
-static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner); |
18391 |
-#endif |
18392 |
- |
18393 |
-#ifdef YY_NEED_STRLEN |
18394 |
-static int yy_flex_strlen ( const char * , yyscan_t yyscanner); |
18395 |
-#endif |
18396 |
- |
18397 |
-#ifndef YY_NO_INPUT |
18398 |
- |
18399 |
-#endif |
18400 |
- |
18401 |
-/* Amount of stuff to slurp up with each read. */ |
18402 |
-#ifndef YY_READ_BUF_SIZE |
18403 |
-#ifdef __ia64__ |
18404 |
-/* On IA-64, the buffer size is 16k, not 8k */ |
18405 |
-#define YY_READ_BUF_SIZE 16384 |
18406 |
-#else |
18407 |
-#define YY_READ_BUF_SIZE 8192 |
18408 |
-#endif /* __ia64__ */ |
18409 |
-#endif |
18410 |
- |
18411 |
-/* Number of entries by which start-condition stack grows. */ |
18412 |
-#ifndef YY_START_STACK_INCR |
18413 |
-#define YY_START_STACK_INCR 25 |
18414 |
-#endif |
18415 |
- |
18416 |
-/* Default declaration of generated scanner - a define so the user can |
18417 |
- * easily add parameters. |
18418 |
- */ |
18419 |
-#ifndef YY_DECL |
18420 |
-#define YY_DECL_IS_OURS 1 |
18421 |
- |
18422 |
-extern int yylex \ |
18423 |
- (YYSTYPE * yylval_param , yyscan_t yyscanner); |
18424 |
- |
18425 |
-#define YY_DECL int yylex \ |
18426 |
- (YYSTYPE * yylval_param , yyscan_t yyscanner) |
18427 |
-#endif /* !YY_DECL */ |
18428 |
- |
18429 |
-/* yy_get_previous_state - get the state just before the EOB char was reached */ |
18430 |
- |
18431 |
-#undef YY_NEW_FILE |
18432 |
-#undef YY_FLUSH_BUFFER |
18433 |
-#undef yy_set_bol |
18434 |
-#undef yy_new_buffer |
18435 |
-#undef yy_set_interactive |
18436 |
-#undef YY_DO_BEFORE_ACTION |
18437 |
- |
18438 |
-#ifdef YY_DECL_IS_OURS |
18439 |
-#undef YY_DECL_IS_OURS |
18440 |
-#undef YY_DECL |
18441 |
-#endif |
18442 |
- |
18443 |
-#ifndef vm_var__create_buffer_ALREADY_DEFINED |
18444 |
-#undef yy_create_buffer |
18445 |
-#endif |
18446 |
-#ifndef vm_var__delete_buffer_ALREADY_DEFINED |
18447 |
-#undef yy_delete_buffer |
18448 |
-#endif |
18449 |
-#ifndef vm_var__scan_buffer_ALREADY_DEFINED |
18450 |
-#undef yy_scan_buffer |
18451 |
-#endif |
18452 |
-#ifndef vm_var__scan_string_ALREADY_DEFINED |
18453 |
-#undef yy_scan_string |
18454 |
-#endif |
18455 |
-#ifndef vm_var__scan_bytes_ALREADY_DEFINED |
18456 |
-#undef yy_scan_bytes |
18457 |
-#endif |
18458 |
-#ifndef vm_var__init_buffer_ALREADY_DEFINED |
18459 |
-#undef yy_init_buffer |
18460 |
-#endif |
18461 |
-#ifndef vm_var__flush_buffer_ALREADY_DEFINED |
18462 |
-#undef yy_flush_buffer |
18463 |
-#endif |
18464 |
-#ifndef vm_var__load_buffer_state_ALREADY_DEFINED |
18465 |
-#undef yy_load_buffer_state |
18466 |
-#endif |
18467 |
-#ifndef vm_var__switch_to_buffer_ALREADY_DEFINED |
18468 |
-#undef yy_switch_to_buffer |
18469 |
-#endif |
18470 |
-#ifndef vm_var_push_buffer_state_ALREADY_DEFINED |
18471 |
-#undef yypush_buffer_state |
18472 |
-#endif |
18473 |
-#ifndef vm_var_pop_buffer_state_ALREADY_DEFINED |
18474 |
-#undef yypop_buffer_state |
18475 |
-#endif |
18476 |
-#ifndef vm_var_ensure_buffer_stack_ALREADY_DEFINED |
18477 |
-#undef yyensure_buffer_stack |
18478 |
-#endif |
18479 |
-#ifndef vm_var_lex_ALREADY_DEFINED |
18480 |
-#undef yylex |
18481 |
-#endif |
18482 |
-#ifndef vm_var_restart_ALREADY_DEFINED |
18483 |
-#undef yyrestart |
18484 |
-#endif |
18485 |
-#ifndef vm_var_lex_init_ALREADY_DEFINED |
18486 |
-#undef yylex_init |
18487 |
-#endif |
18488 |
-#ifndef vm_var_lex_init_extra_ALREADY_DEFINED |
18489 |
-#undef yylex_init_extra |
18490 |
-#endif |
18491 |
-#ifndef vm_var_lex_destroy_ALREADY_DEFINED |
18492 |
-#undef yylex_destroy |
18493 |
-#endif |
18494 |
-#ifndef vm_var_get_debug_ALREADY_DEFINED |
18495 |
-#undef yyget_debug |
18496 |
-#endif |
18497 |
-#ifndef vm_var_set_debug_ALREADY_DEFINED |
18498 |
-#undef yyset_debug |
18499 |
-#endif |
18500 |
-#ifndef vm_var_get_extra_ALREADY_DEFINED |
18501 |
-#undef yyget_extra |
18502 |
-#endif |
18503 |
-#ifndef vm_var_set_extra_ALREADY_DEFINED |
18504 |
-#undef yyset_extra |
18505 |
-#endif |
18506 |
-#ifndef vm_var_get_in_ALREADY_DEFINED |
18507 |
-#undef yyget_in |
18508 |
-#endif |
18509 |
-#ifndef vm_var_set_in_ALREADY_DEFINED |
18510 |
-#undef yyset_in |
18511 |
-#endif |
18512 |
-#ifndef vm_var_get_out_ALREADY_DEFINED |
18513 |
-#undef yyget_out |
18514 |
-#endif |
18515 |
-#ifndef vm_var_set_out_ALREADY_DEFINED |
18516 |
-#undef yyset_out |
18517 |
-#endif |
18518 |
-#ifndef vm_var_get_leng_ALREADY_DEFINED |
18519 |
-#undef yyget_leng |
18520 |
-#endif |
18521 |
-#ifndef vm_var_get_text_ALREADY_DEFINED |
18522 |
-#undef yyget_text |
18523 |
-#endif |
18524 |
-#ifndef vm_var_get_lineno_ALREADY_DEFINED |
18525 |
-#undef yyget_lineno |
18526 |
-#endif |
18527 |
-#ifndef vm_var_set_lineno_ALREADY_DEFINED |
18528 |
-#undef yyset_lineno |
18529 |
-#endif |
18530 |
-#ifndef vm_var_get_column_ALREADY_DEFINED |
18531 |
-#undef yyget_column |
18532 |
-#endif |
18533 |
-#ifndef vm_var_set_column_ALREADY_DEFINED |
18534 |
-#undef yyset_column |
18535 |
-#endif |
18536 |
-#ifndef vm_var_wrap_ALREADY_DEFINED |
18537 |
-#undef yywrap |
18538 |
-#endif |
18539 |
-#ifndef vm_var_get_lval_ALREADY_DEFINED |
18540 |
-#undef yyget_lval |
18541 |
-#endif |
18542 |
-#ifndef vm_var_set_lval_ALREADY_DEFINED |
18543 |
-#undef yyset_lval |
18544 |
-#endif |
18545 |
-#ifndef vm_var_get_lloc_ALREADY_DEFINED |
18546 |
-#undef yyget_lloc |
18547 |
-#endif |
18548 |
-#ifndef vm_var_set_lloc_ALREADY_DEFINED |
18549 |
-#undef yyset_lloc |
18550 |
-#endif |
18551 |
-#ifndef vm_var_alloc_ALREADY_DEFINED |
18552 |
-#undef yyalloc |
18553 |
-#endif |
18554 |
-#ifndef vm_var_realloc_ALREADY_DEFINED |
18555 |
-#undef yyrealloc |
18556 |
-#endif |
18557 |
-#ifndef vm_var_free_ALREADY_DEFINED |
18558 |
-#undef yyfree |
18559 |
-#endif |
18560 |
-#ifndef vm_var_text_ALREADY_DEFINED |
18561 |
-#undef yytext |
18562 |
-#endif |
18563 |
-#ifndef vm_var_leng_ALREADY_DEFINED |
18564 |
-#undef yyleng |
18565 |
-#endif |
18566 |
-#ifndef vm_var_in_ALREADY_DEFINED |
18567 |
-#undef yyin |
18568 |
-#endif |
18569 |
-#ifndef vm_var_out_ALREADY_DEFINED |
18570 |
-#undef yyout |
18571 |
-#endif |
18572 |
-#ifndef vm_var__flex_debug_ALREADY_DEFINED |
18573 |
-#undef yy_flex_debug |
18574 |
-#endif |
18575 |
-#ifndef vm_var_lineno_ALREADY_DEFINED |
18576 |
-#undef yylineno |
18577 |
-#endif |
18578 |
-#ifndef vm_var_tables_fload_ALREADY_DEFINED |
18579 |
-#undef yytables_fload |
18580 |
-#endif |
18581 |
-#ifndef vm_var_tables_destroy_ALREADY_DEFINED |
18582 |
-#undef yytables_destroy |
18583 |
-#endif |
18584 |
-#ifndef vm_var_TABLES_NAME_ALREADY_DEFINED |
18585 |
-#undef yyTABLES_NAME |
18586 |
-#endif |
18587 |
- |
18588 |
-#line 96 "vm_var_parser.l" |
18589 |
- |
18590 |
- |
18591 |
-#line 717 "vm_var_parser.h" |
18592 |
-#undef vm_var_IN_HEADER |
18593 |
-#endif /* vm_var_HEADER_H */ |
18594 |
|
18595 |
diff --git a/app-emulation/opennebula/files/opennebula-5.10.1/parsers/vm_var_parser.l b/app-emulation/opennebula/files/opennebula-5.10.1/parsers/vm_var_parser.l |
18596 |
deleted file mode 100644 |
18597 |
index ff93f64..0000000 |
18598 |
--- a/app-emulation/opennebula/files/opennebula-5.10.1/parsers/vm_var_parser.l |
18599 |
+++ /dev/null |
18600 |
@@ -1,100 +0,0 @@ |
18601 |
-/* -------------------------------------------------------------------------- */ |
18602 |
-/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */ |
18603 |
-/* */ |
18604 |
-/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ |
18605 |
-/* not use this file except in compliance with the License. You may obtain */ |
18606 |
-/* a copy of the License at */ |
18607 |
-/* */ |
18608 |
-/* http://www.apache.org/licenses/LICENSE-2.0 */ |
18609 |
-/* */ |
18610 |
-/* Unless required by applicable law or agreed to in writing, software */ |
18611 |
-/* distributed under the License is distributed on an "AS IS" BASIS, */ |
18612 |
-/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ |
18613 |
-/* See the License for the specific language governing permissions and */ |
18614 |
-/* limitations under the License. */ |
18615 |
-/* -------------------------------------------------------------------------- */ |
18616 |
- |
18617 |
-%{ |
18618 |
-#include <stdio.h> |
18619 |
-#include <stdlib.h> |
18620 |
-#include <string.h> |
18621 |
-#include <pthread.h> |
18622 |
- |
18623 |
-#include "vm_var_syntax.h" |
18624 |
-#include "vm_file_var_syntax.h" |
18625 |
-#include "mem_collector.h" |
18626 |
- |
18627 |
-#define YY_NO_INPUT |
18628 |
- |
18629 |
-#define YY_DECL int vm_var_lex (YYSTYPE *yylval_param, YYLTYPE *llocp, \ |
18630 |
- mem_collector *mc, yyscan_t yyscanner) |
18631 |
- |
18632 |
-#define YY_USER_ACTION llocp->first_line = yylineno; \ |
18633 |
- llocp->first_column = llocp->last_column; \ |
18634 |
- llocp->last_column += yyleng; |
18635 |
-%} |
18636 |
- |
18637 |
-%option nounput |
18638 |
-%option prefix="vm_var_" |
18639 |
-%option outfile="vm_var_parser.cc" |
18640 |
-%option header-file="vm_var_parser.h" |
18641 |
-%option yylineno |
18642 |
-%option bison-bridge |
18643 |
-%option reentrant |
18644 |
- |
18645 |
-%x VAR |
18646 |
-%x VALUE |
18647 |
-%% |
18648 |
- |
18649 |
- /* ------------------------------------------------------------------------- */ |
18650 |
- /* Just copy the string verbatim till we find a variable (starts with $) */ |
18651 |
- /* ------------------------------------------------------------------------- */ |
18652 |
- |
18653 |
-([^\$\\]|"\\\$"|\\[^\$])+ { yylval_param->val_str = mem_collector_strdup(mc,yytext); return RSTRING;} |
18654 |
- |
18655 |
- /* ------------------------------------------------------------------------- */ |
18656 |
- /* Parse variables in the form: */ |
18657 |
- /* $VARIABLE */ |
18658 |
- /* $VARIABLE[ATTR] */ |
18659 |
- /* $VARIABLE[ATTR,ATTR=VALUE] */ |
18660 |
- /* $NUM.CONTEXT_VARIABLE */ |
18661 |
- /* ------------------------------------------------------------------------- */ |
18662 |
- |
18663 |
-\$ { BEGIN VAR;} |
18664 |
- |
18665 |
-<VAR>[[:blank:]]*=[[:blank:]]* { BEGIN VALUE; return EQUAL; } |
18666 |
-<VAR>[[:blank:]]*,[[:blank:]]* { return COMMA;} |
18667 |
-<VAR>\[[[:blank:]]* { return OBRACKET;} |
18668 |
-<VAR>[[:blank:]]*\] { return CBRACKET;} |
18669 |
- |
18670 |
-<VAR>[[:alnum:]_]+ { yylval_param->val_str = |
18671 |
- mem_collector_strdup(mc,yytext); |
18672 |
- return VARIABLE;} |
18673 |
- |
18674 |
-<VALUE>\"[^\"]*\" { yylval_param->val_str = |
18675 |
- mem_collector_strdup(mc,yytext+1); |
18676 |
- yylval_param->val_str[yyleng-2] = '\0'; |
18677 |
- BEGIN(VAR); |
18678 |
- return STRING;} |
18679 |
- |
18680 |
-<VALUE>[[:alnum:]]+ { yylval_param->val_str = |
18681 |
- mem_collector_strdup(mc,yytext); |
18682 |
- BEGIN(VAR); |
18683 |
- return STRING;} |
18684 |
- |
18685 |
-<VAR>\$ { yylval_param->val_char = '\0'; |
18686 |
- return EOA;} |
18687 |
- |
18688 |
-<VAR>. { yylval_param->val_char = *yytext; |
18689 |
- BEGIN(INITIAL); |
18690 |
- return EOA;} |
18691 |
- |
18692 |
-<VAR><<EOF>> { yylval_param->val_char = '\0'; |
18693 |
- BEGIN(INITIAL); |
18694 |
- return EOA;} |
18695 |
-%% |
18696 |
- |
18697 |
-int vm_var_wrap(yyscan_t scanner) |
18698 |
-{ |
18699 |
- return 1; |
18700 |
-} |
18701 |
|
18702 |
diff --git a/app-emulation/opennebula/files/opennebula-5.10.1/parsers/vm_var_syntax.cc b/app-emulation/opennebula/files/opennebula-5.10.1/parsers/vm_var_syntax.cc |
18703 |
deleted file mode 100644 |
18704 |
index 81df4bd..0000000 |
18705 |
--- a/app-emulation/opennebula/files/opennebula-5.10.1/parsers/vm_var_syntax.cc |
18706 |
+++ /dev/null |
18707 |
@@ -1,2089 +0,0 @@ |
18708 |
-/* A Bison parser, made by GNU Bison 3.4.1. */ |
18709 |
- |
18710 |
-/* Bison implementation for Yacc-like parsers in C |
18711 |
- |
18712 |
- Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2019 Free Software Foundation, |
18713 |
- Inc. |
18714 |
- |
18715 |
- This program is free software: you can redistribute it and/or modify |
18716 |
- it under the terms of the GNU General Public License as published by |
18717 |
- the Free Software Foundation, either version 3 of the License, or |
18718 |
- (at your option) any later version. |
18719 |
- |
18720 |
- This program is distributed in the hope that it will be useful, |
18721 |
- but WITHOUT ANY WARRANTY; without even the implied warranty of |
18722 |
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
18723 |
- GNU General Public License for more details. |
18724 |
- |
18725 |
- You should have received a copy of the GNU General Public License |
18726 |
- along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
18727 |
- |
18728 |
-/* As a special exception, you may create a larger work that contains |
18729 |
- part or all of the Bison parser skeleton and distribute that work |
18730 |
- under terms of your choice, so long as that work isn't itself a |
18731 |
- parser generator using the skeleton or a modified version thereof |
18732 |
- as a parser skeleton. Alternatively, if you modify or redistribute |
18733 |
- the parser skeleton itself, you may (at your option) remove this |
18734 |
- special exception, which will cause the skeleton and the resulting |
18735 |
- Bison output files to be licensed under the GNU General Public |
18736 |
- License without this special exception. |
18737 |
- |
18738 |
- This special exception was added by the Free Software Foundation in |
18739 |
- version 2.2 of Bison. */ |
18740 |
- |
18741 |
-/* C LALR(1) parser skeleton written by Richard Stallman, by |
18742 |
- simplifying the original so-called "semantic" parser. */ |
18743 |
- |
18744 |
-/* All symbols defined below should begin with yy or YY, to avoid |
18745 |
- infringing on user name space. This should be done even for local |
18746 |
- variables, as they might otherwise be expanded by user macros. |
18747 |
- There are some unavoidable exceptions within include files to |
18748 |
- define necessary library symbols; they are noted "INFRINGES ON |
18749 |
- USER NAME SPACE" below. */ |
18750 |
- |
18751 |
-/* Undocumented macros, especially those whose name start with YY_, |
18752 |
- are private implementation details. Do not rely on them. */ |
18753 |
- |
18754 |
-/* Identify Bison output. */ |
18755 |
-#define YYBISON 1 |
18756 |
- |
18757 |
-/* Bison version. */ |
18758 |
-#define YYBISON_VERSION "3.4.1" |
18759 |
- |
18760 |
-/* Skeleton name. */ |
18761 |
-#define YYSKELETON_NAME "yacc.c" |
18762 |
- |
18763 |
-/* Pure parsers. */ |
18764 |
-#define YYPURE 1 |
18765 |
- |
18766 |
-/* Push parsers. */ |
18767 |
-#define YYPUSH 0 |
18768 |
- |
18769 |
-/* Pull parsers. */ |
18770 |
-#define YYPULL 1 |
18771 |
- |
18772 |
- |
18773 |
-/* Substitute the variable and function names. */ |
18774 |
-#define yyparse vm_var_parse |
18775 |
-#define yylex vm_var_lex |
18776 |
-#define yyerror vm_var_error |
18777 |
-#define yydebug vm_var_debug |
18778 |
-#define yynerrs vm_var_nerrs |
18779 |
- |
18780 |
- |
18781 |
-/* First part of user prologue. */ |
18782 |
-#line 39 "vm_var_syntax.y" |
18783 |
- |
18784 |
-#include "vm_var_syntax.h" |
18785 |
-#include "vm_var_parser.h" |
18786 |
- |
18787 |
-#include "NebulaUtil.h" |
18788 |
- |
18789 |
-#define YYERROR_VERBOSE |
18790 |
- |
18791 |
-void vm_var_error(YYLTYPE * llocp, mem_collector * mc, VirtualMachine * vm, |
18792 |
- ostringstream * parsed, char ** errmsg, yyscan_t scanner, const char * str); |
18793 |
- |
18794 |
-int vm_var_lex(YYSTYPE *lvalp, YYLTYPE *llocp, mem_collector * mc, |
18795 |
- yyscan_t scanner); |
18796 |
- |
18797 |
-int vm_var_parse (VirtualMachine * vm, ostringstream * parsed, char ** errmsg, |
18798 |
- yyscan_t scanner) |
18799 |
-{ |
18800 |
- mem_collector mc; |
18801 |
- int rc; |
18802 |
- |
18803 |
- mem_collector_init(&mc); |
18804 |
- |
18805 |
- rc = vm_var_parse(&mc, vm, parsed, errmsg, scanner); |
18806 |
- |
18807 |
- mem_collector_cleanup(&mc); |
18808 |
- |
18809 |
- return rc; |
18810 |
-} |
18811 |
- |
18812 |
-/* -------------------------------------------------------------------------- */ |
18813 |
-/* -------------------------------------------------------------------------- */ |
18814 |
- |
18815 |
-void get_image_attribute(VirtualMachine * vm, |
18816 |
- const string& attr_name, |
18817 |
- const string& img_name, |
18818 |
- const string& img_value, |
18819 |
- string& attr_value) |
18820 |
-{ |
18821 |
- Nebula& nd = Nebula::instance(); |
18822 |
- |
18823 |
- ImagePool * ipool = nd.get_ipool(); |
18824 |
- Image * img; |
18825 |
- int iid = -1; |
18826 |
- |
18827 |
- int num; |
18828 |
- vector<const VectorAttribute *> disks; |
18829 |
- |
18830 |
- attr_value.clear(); |
18831 |
- |
18832 |
- if ( img_name.empty() || (img_name!="IMAGE" && img_name!="IMAGE_ID") ) |
18833 |
- { |
18834 |
- return; |
18835 |
- } |
18836 |
- |
18837 |
- // ---------------------------------------------- |
18838 |
- // Check that the image is in the template, so |
18839 |
- // are sure that we can access the image template |
18840 |
- // ---------------------------------------------- |
18841 |
- num = vm->get_template_attribute("DISK", disks); |
18842 |
- |
18843 |
- for (int i=0; i < num ;i++) |
18844 |
- { |
18845 |
- if ( disks[i]->vector_value(img_name) == img_value ) |
18846 |
- { |
18847 |
- string iid_str = disks[i]->vector_value("IMAGE_ID"); |
18848 |
- istringstream iss(iid_str); |
18849 |
- |
18850 |
- iss >> iid; |
18851 |
- |
18852 |
- if (iss.fail()) |
18853 |
- { |
18854 |
- iid = -1; |
18855 |
- } |
18856 |
- |
18857 |
- break; |
18858 |
- } |
18859 |
- } |
18860 |
- |
18861 |
- if (iid == -1) |
18862 |
- { |
18863 |
- return; |
18864 |
- } |
18865 |
- |
18866 |
- // ---------------------------------------------- |
18867 |
- // Get the attribute template from the image |
18868 |
- // ---------------------------------------------- |
18869 |
- img = ipool->get_ro(iid); |
18870 |
- |
18871 |
- if ( img == 0 ) |
18872 |
- { |
18873 |
- return; |
18874 |
- } |
18875 |
- |
18876 |
- if (attr_name == "TEMPLATE") |
18877 |
- { |
18878 |
- attr_value = img->to_xml64(attr_value); |
18879 |
- } |
18880 |
- else |
18881 |
- { |
18882 |
- img->get_template_attribute(attr_name, attr_value); |
18883 |
- } |
18884 |
- |
18885 |
- img->unlock(); |
18886 |
-} |
18887 |
- |
18888 |
-/* -------------------------------------------------------------------------- */ |
18889 |
-/* -------------------------------------------------------------------------- */ |
18890 |
- |
18891 |
-void get_network_attribute(VirtualMachine * vm, |
18892 |
- const string& attr_name, |
18893 |
- const string& net_name, |
18894 |
- const string& net_value, |
18895 |
- string& attr_value) |
18896 |
-{ |
18897 |
- Nebula& nd = Nebula::instance(); |
18898 |
- |
18899 |
- VirtualNetworkPool * vnpool = nd.get_vnpool(); |
18900 |
- VirtualNetwork * vn; |
18901 |
- int ar_id, vnet_id = -1; |
18902 |
- |
18903 |
- int num; |
18904 |
- vector<const VectorAttribute *> nets; |
18905 |
- |
18906 |
- attr_value.clear(); |
18907 |
- |
18908 |
- if ( net_name.empty() || |
18909 |
- (net_name!="NETWORK" && net_name!="NETWORK_ID" && net_name!="NIC_ID")) |
18910 |
- { |
18911 |
- return; |
18912 |
- } |
18913 |
- |
18914 |
- // ---------------------------------------------- |
18915 |
- // Check that the network is in the template, so |
18916 |
- // are sure that we can access its template |
18917 |
- // ---------------------------------------------- |
18918 |
- num = vm->get_template_attribute("NIC", nets); |
18919 |
- |
18920 |
- for (int i=0; i < num ;i++) |
18921 |
- { |
18922 |
- if ( nets[i]->vector_value(net_name) == net_value ) |
18923 |
- { |
18924 |
- if (nets[i]->vector_value("NETWORK_ID", vnet_id) != 0) |
18925 |
- { |
18926 |
- vnet_id = -1; |
18927 |
- } |
18928 |
- |
18929 |
- if (nets[i]->vector_value("AR_ID", ar_id) != 0) |
18930 |
- { |
18931 |
- vnet_id = -1; |
18932 |
- } |
18933 |
- |
18934 |
- break; |
18935 |
- } |
18936 |
- } |
18937 |
- |
18938 |
- vector<const VectorAttribute *> alias; |
18939 |
- int alias_num = vm->get_template_attribute("NIC_ALIAS", alias); |
18940 |
- |
18941 |
- if (vnet_id == -1 && alias_num == 0) |
18942 |
- { |
18943 |
- return; |
18944 |
- } |
18945 |
- else |
18946 |
- { |
18947 |
- for (int i=0; i < alias_num ;i++) |
18948 |
- { |
18949 |
- if ( alias[i]->vector_value(net_name.c_str()) == net_value ) |
18950 |
- { |
18951 |
- if (alias[i]->vector_value("NETWORK_ID", vnet_id) != 0) |
18952 |
- { |
18953 |
- vnet_id = -1; |
18954 |
- } |
18955 |
- |
18956 |
- if (alias[i]->vector_value("AR_ID", ar_id) != 0) |
18957 |
- { |
18958 |
- vnet_id = -1; |
18959 |
- } |
18960 |
- |
18961 |
- break; |
18962 |
- } |
18963 |
- } |
18964 |
- |
18965 |
- if (vnet_id == -1) |
18966 |
- { |
18967 |
- return; |
18968 |
- } |
18969 |
- } |
18970 |
- |
18971 |
- // ---------------------------------------------- |
18972 |
- // Get the attribute template from the image |
18973 |
- // ---------------------------------------------- |
18974 |
- vn = vnpool->get_ro(vnet_id); |
18975 |
- |
18976 |
- if ( vn == 0 ) |
18977 |
- { |
18978 |
- return; |
18979 |
- } |
18980 |
- |
18981 |
- if (attr_name == "TEMPLATE") |
18982 |
- { |
18983 |
- attr_value = vn->to_xml64(attr_value); |
18984 |
- } |
18985 |
- else |
18986 |
- { |
18987 |
- vn->get_template_attribute(attr_name, attr_value, ar_id); |
18988 |
- } |
18989 |
- |
18990 |
- vn->unlock(); |
18991 |
-} |
18992 |
- |
18993 |
-/* -------------------------------------------------------------------------- */ |
18994 |
-/* -------------------------------------------------------------------------- */ |
18995 |
- |
18996 |
-void get_user_attribute(VirtualMachine * vm, |
18997 |
- const string& attr_name, |
18998 |
- string& attr_value) |
18999 |
-{ |
19000 |
- Nebula& nd = Nebula::instance(); |
19001 |
- |
19002 |
- UserPool * upool = nd.get_upool(); |
19003 |
- User * user; |
19004 |
- |
19005 |
- attr_value.clear(); |
19006 |
- |
19007 |
- user = upool->get_ro(vm->get_uid()); |
19008 |
- |
19009 |
- if ( user == 0 ) |
19010 |
- { |
19011 |
- return; |
19012 |
- } |
19013 |
- |
19014 |
- if (attr_name == "TEMPLATE") |
19015 |
- { |
19016 |
- attr_value = user->to_xml64(attr_value); |
19017 |
- } |
19018 |
- else |
19019 |
- { |
19020 |
- user->get_template_attribute(attr_name, attr_value); |
19021 |
- } |
19022 |
- |
19023 |
- user->unlock(); |
19024 |
-} |
19025 |
- |
19026 |
-/* -------------------------------------------------------------------------- */ |
19027 |
-/* -------------------------------------------------------------------------- */ |
19028 |
- |
19029 |
-void insert_single(VirtualMachine * vm, |
19030 |
- ostringstream& parsed, |
19031 |
- const string& name) |
19032 |
-{ |
19033 |
- string value = ""; |
19034 |
- |
19035 |
- if (name == "TEMPLATE") |
19036 |
- { |
19037 |
- vm->to_xml64(value); |
19038 |
- } |
19039 |
- else if (name == "UID") |
19040 |
- { |
19041 |
- parsed << vm->get_uid(); |
19042 |
- } |
19043 |
- else if (name == "UNAME") |
19044 |
- { |
19045 |
- parsed << vm->get_uname(); |
19046 |
- } |
19047 |
- else if (name == "GID") |
19048 |
- { |
19049 |
- parsed << vm->get_gid(); |
19050 |
- } |
19051 |
- else if (name == "GNAME") |
19052 |
- { |
19053 |
- parsed << vm->get_gname(); |
19054 |
- } |
19055 |
- else if (name == "NAME") |
19056 |
- { |
19057 |
- |
19058 |
- parsed << vm->get_name(); |
19059 |
- } |
19060 |
- else |
19061 |
- { |
19062 |
- |
19063 |
- vm->get_template_attribute(name, value); |
19064 |
- |
19065 |
- if (value.empty()) |
19066 |
- { |
19067 |
- vm->get_user_template_attribute(name, value); |
19068 |
- } |
19069 |
- } |
19070 |
- |
19071 |
- if (!value.empty()) |
19072 |
- { |
19073 |
- parsed << value; |
19074 |
- } |
19075 |
-} |
19076 |
- |
19077 |
-/* -------------------------------------------------------------------------- */ |
19078 |
-/* -------------------------------------------------------------------------- */ |
19079 |
- |
19080 |
-void insert_vector(VirtualMachine * vm, |
19081 |
- ostringstream& parsed, |
19082 |
- const string& name, |
19083 |
- const string& vname, |
19084 |
- const string& vvar, |
19085 |
- const string& vval) |
19086 |
- |
19087 |
-{ |
19088 |
- vector<const VectorAttribute*> values; |
19089 |
- const VectorAttribute * vattr = 0; |
19090 |
- |
19091 |
- int num; |
19092 |
- |
19093 |
- if (name == "NETWORK") |
19094 |
- { |
19095 |
- string value; |
19096 |
- |
19097 |
- get_network_attribute(vm,vname,vvar,vval,value); |
19098 |
- |
19099 |
- if (!value.empty()) |
19100 |
- { |
19101 |
- parsed << value; |
19102 |
- } |
19103 |
- |
19104 |
- return; |
19105 |
- } |
19106 |
- else if (name == "IMAGE") |
19107 |
- { |
19108 |
- string value; |
19109 |
- |
19110 |
- get_image_attribute(vm,vname,vvar,vval,value); |
19111 |
- |
19112 |
- if (!value.empty()) |
19113 |
- { |
19114 |
- parsed << value; |
19115 |
- } |
19116 |
- |
19117 |
- return; |
19118 |
- } |
19119 |
- else if (name == "USER") |
19120 |
- { |
19121 |
- string value; |
19122 |
- |
19123 |
- get_user_attribute(vm, vname, value); |
19124 |
- |
19125 |
- if (!value.empty()) |
19126 |
- { |
19127 |
- parsed << value; |
19128 |
- } |
19129 |
- |
19130 |
- return; |
19131 |
- } |
19132 |
- else |
19133 |
- { |
19134 |
- if ( ( num = vm->get_template_attribute(name, values) ) <= 0 ) |
19135 |
- { |
19136 |
- return; |
19137 |
- } |
19138 |
- |
19139 |
- if ( vvar.empty() ) |
19140 |
- { |
19141 |
- vattr = values[0]; |
19142 |
- } |
19143 |
- else |
19144 |
- { |
19145 |
- for (int i=0 ; i < num ; i++) |
19146 |
- { |
19147 |
- if (values[i]->vector_value(vvar) == vval) |
19148 |
- { |
19149 |
- vattr = values[i]; |
19150 |
- break; |
19151 |
- } |
19152 |
- } |
19153 |
- } |
19154 |
- |
19155 |
- if ( vattr != 0 ) |
19156 |
- { |
19157 |
- parsed << vattr->vector_value(vname); |
19158 |
- } |
19159 |
- } |
19160 |
-} |
19161 |
- |
19162 |
-/* -------------------------------------------------------------------------- */ |
19163 |
-/* -------------------------------------------------------------------------- */ |
19164 |
- |
19165 |
- |
19166 |
-#line 460 "vm_var_syntax.cc" |
19167 |
- |
19168 |
-# ifndef YY_NULLPTR |
19169 |
-# if defined __cplusplus |
19170 |
-# if 201103L <= __cplusplus |
19171 |
-# define YY_NULLPTR nullptr |
19172 |
-# else |
19173 |
-# define YY_NULLPTR 0 |
19174 |
-# endif |
19175 |
-# else |
19176 |
-# define YY_NULLPTR ((void*)0) |
19177 |
-# endif |
19178 |
-# endif |
19179 |
- |
19180 |
-/* Enabling verbose error messages. */ |
19181 |
-#ifdef YYERROR_VERBOSE |
19182 |
-# undef YYERROR_VERBOSE |
19183 |
-# define YYERROR_VERBOSE 1 |
19184 |
-#else |
19185 |
-# define YYERROR_VERBOSE 0 |
19186 |
-#endif |
19187 |
- |
19188 |
-/* Use api.header.include to #include this header |
19189 |
- instead of duplicating it here. */ |
19190 |
-#ifndef YY_VM_VAR_VM_VAR_SYNTAX_HH_INCLUDED |
19191 |
-# define YY_VM_VAR_VM_VAR_SYNTAX_HH_INCLUDED |
19192 |
-/* Debug traces. */ |
19193 |
-#ifndef YYDEBUG |
19194 |
-# define YYDEBUG 0 |
19195 |
-#endif |
19196 |
-#if YYDEBUG |
19197 |
-extern int vm_var_debug; |
19198 |
-#endif |
19199 |
-/* "%code requires" blocks. */ |
19200 |
-#line 17 "vm_var_syntax.y" |
19201 |
- |
19202 |
-#include <iostream> |
19203 |
-#include <sstream> |
19204 |
-#include <string> |
19205 |
-#include <map> |
19206 |
-#include <algorithm> |
19207 |
- |
19208 |
-#include <ctype.h> |
19209 |
-#include <string.h> |
19210 |
- |
19211 |
-#include "VirtualMachinePool.h" |
19212 |
-#include "VirtualMachine.h" |
19213 |
-#include "Nebula.h" |
19214 |
- |
19215 |
-#include "mem_collector.h" |
19216 |
- |
19217 |
-typedef void * yyscan_t; |
19218 |
- |
19219 |
-int vm_var_parse (VirtualMachine * vm, ostringstream * parsed, char ** errmsg, |
19220 |
- yyscan_t scanner); |
19221 |
- |
19222 |
-#line 516 "vm_var_syntax.cc" |
19223 |
- |
19224 |
-/* Token type. */ |
19225 |
-#ifndef YYTOKENTYPE |
19226 |
-# define YYTOKENTYPE |
19227 |
- enum yytokentype |
19228 |
- { |
19229 |
- EQUAL = 258, |
19230 |
- COMMA = 259, |
19231 |
- OBRACKET = 260, |
19232 |
- CBRACKET = 261, |
19233 |
- EOA = 262, |
19234 |
- STRING = 263, |
19235 |
- VARIABLE = 264, |
19236 |
- RSTRING = 265, |
19237 |
- INTEGER = 266 |
19238 |
- }; |
19239 |
-#endif |
19240 |
- |
19241 |
-/* Value type. */ |
19242 |
-#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED |
19243 |
-union YYSTYPE |
19244 |
-{ |
19245 |
-#line 432 "vm_var_syntax.y" |
19246 |
- |
19247 |
- char * val_str; |
19248 |
- int val_int; |
19249 |
- char val_char; |
19250 |
- |
19251 |
-#line 545 "vm_var_syntax.cc" |
19252 |
- |
19253 |
-}; |
19254 |
-typedef union YYSTYPE YYSTYPE; |
19255 |
-# define YYSTYPE_IS_TRIVIAL 1 |
19256 |
-# define YYSTYPE_IS_DECLARED 1 |
19257 |
-#endif |
19258 |
- |
19259 |
-/* Location type. */ |
19260 |
-#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED |
19261 |
-typedef struct YYLTYPE YYLTYPE; |
19262 |
-struct YYLTYPE |
19263 |
-{ |
19264 |
- int first_line; |
19265 |
- int first_column; |
19266 |
- int last_line; |
19267 |
- int last_column; |
19268 |
-}; |
19269 |
-# define YYLTYPE_IS_DECLARED 1 |
19270 |
-# define YYLTYPE_IS_TRIVIAL 1 |
19271 |
-#endif |
19272 |
- |
19273 |
- |
19274 |
- |
19275 |
-int vm_var_parse (mem_collector * mc, VirtualMachine * vm, ostringstream * parsed, char ** errmsg, yyscan_t scanner); |
19276 |
- |
19277 |
-#endif /* !YY_VM_VAR_VM_VAR_SYNTAX_HH_INCLUDED */ |
19278 |
- |
19279 |
- |
19280 |
- |
19281 |
-#ifdef short |
19282 |
-# undef short |
19283 |
-#endif |
19284 |
- |
19285 |
-#ifdef YYTYPE_UINT8 |
19286 |
-typedef YYTYPE_UINT8 yytype_uint8; |
19287 |
-#else |
19288 |
-typedef unsigned char yytype_uint8; |
19289 |
-#endif |
19290 |
- |
19291 |
-#ifdef YYTYPE_INT8 |
19292 |
-typedef YYTYPE_INT8 yytype_int8; |
19293 |
-#else |
19294 |
-typedef signed char yytype_int8; |
19295 |
-#endif |
19296 |
- |
19297 |
-#ifdef YYTYPE_UINT16 |
19298 |
-typedef YYTYPE_UINT16 yytype_uint16; |
19299 |
-#else |
19300 |
-typedef unsigned short yytype_uint16; |
19301 |
-#endif |
19302 |
- |
19303 |
-#ifdef YYTYPE_INT16 |
19304 |
-typedef YYTYPE_INT16 yytype_int16; |
19305 |
-#else |
19306 |
-typedef short yytype_int16; |
19307 |
-#endif |
19308 |
- |
19309 |
-#ifndef YYSIZE_T |
19310 |
-# ifdef __SIZE_TYPE__ |
19311 |
-# define YYSIZE_T __SIZE_TYPE__ |
19312 |
-# elif defined size_t |
19313 |
-# define YYSIZE_T size_t |
19314 |
-# elif ! defined YYSIZE_T |
19315 |
-# include <stddef.h> /* INFRINGES ON USER NAME SPACE */ |
19316 |
-# define YYSIZE_T size_t |
19317 |
-# else |
19318 |
-# define YYSIZE_T unsigned |
19319 |
-# endif |
19320 |
-#endif |
19321 |
- |
19322 |
-#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) |
19323 |
- |
19324 |
-#ifndef YY_ |
19325 |
-# if defined YYENABLE_NLS && YYENABLE_NLS |
19326 |
-# if ENABLE_NLS |
19327 |
-# include <libintl.h> /* INFRINGES ON USER NAME SPACE */ |
19328 |
-# define YY_(Msgid) dgettext ("bison-runtime", Msgid) |
19329 |
-# endif |
19330 |
-# endif |
19331 |
-# ifndef YY_ |
19332 |
-# define YY_(Msgid) Msgid |
19333 |
-# endif |
19334 |
-#endif |
19335 |
- |
19336 |
-#ifndef YY_ATTRIBUTE |
19337 |
-# if (defined __GNUC__ \ |
19338 |
- && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \ |
19339 |
- || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C |
19340 |
-# define YY_ATTRIBUTE(Spec) __attribute__(Spec) |
19341 |
-# else |
19342 |
-# define YY_ATTRIBUTE(Spec) /* empty */ |
19343 |
-# endif |
19344 |
-#endif |
19345 |
- |
19346 |
-#ifndef YY_ATTRIBUTE_PURE |
19347 |
-# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__)) |
19348 |
-#endif |
19349 |
- |
19350 |
-#ifndef YY_ATTRIBUTE_UNUSED |
19351 |
-# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) |
19352 |
-#endif |
19353 |
- |
19354 |
-/* Suppress unused-variable warnings by "using" E. */ |
19355 |
-#if ! defined lint || defined __GNUC__ |
19356 |
-# define YYUSE(E) ((void) (E)) |
19357 |
-#else |
19358 |
-# define YYUSE(E) /* empty */ |
19359 |
-#endif |
19360 |
- |
19361 |
-#if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ |
19362 |
-/* Suppress an incorrect diagnostic about yylval being uninitialized. */ |
19363 |
-# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ |
19364 |
- _Pragma ("GCC diagnostic push") \ |
19365 |
- _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ |
19366 |
- _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") |
19367 |
-# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ |
19368 |
- _Pragma ("GCC diagnostic pop") |
19369 |
-#else |
19370 |
-# define YY_INITIAL_VALUE(Value) Value |
19371 |
-#endif |
19372 |
-#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
19373 |
-# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
19374 |
-# define YY_IGNORE_MAYBE_UNINITIALIZED_END |
19375 |
-#endif |
19376 |
-#ifndef YY_INITIAL_VALUE |
19377 |
-# define YY_INITIAL_VALUE(Value) /* Nothing. */ |
19378 |
-#endif |
19379 |
- |
19380 |
- |
19381 |
-#define YY_ASSERT(E) ((void) (0 && (E))) |
19382 |
- |
19383 |
-#if ! defined yyoverflow || YYERROR_VERBOSE |
19384 |
- |
19385 |
-/* The parser invokes alloca or malloc; define the necessary symbols. */ |
19386 |
- |
19387 |
-# ifdef YYSTACK_USE_ALLOCA |
19388 |
-# if YYSTACK_USE_ALLOCA |
19389 |
-# ifdef __GNUC__ |
19390 |
-# define YYSTACK_ALLOC __builtin_alloca |
19391 |
-# elif defined __BUILTIN_VA_ARG_INCR |
19392 |
-# include <alloca.h> /* INFRINGES ON USER NAME SPACE */ |
19393 |
-# elif defined _AIX |
19394 |
-# define YYSTACK_ALLOC __alloca |
19395 |
-# elif defined _MSC_VER |
19396 |
-# include <malloc.h> /* INFRINGES ON USER NAME SPACE */ |
19397 |
-# define alloca _alloca |
19398 |
-# else |
19399 |
-# define YYSTACK_ALLOC alloca |
19400 |
-# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS |
19401 |
-# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ |
19402 |
- /* Use EXIT_SUCCESS as a witness for stdlib.h. */ |
19403 |
-# ifndef EXIT_SUCCESS |
19404 |
-# define EXIT_SUCCESS 0 |
19405 |
-# endif |
19406 |
-# endif |
19407 |
-# endif |
19408 |
-# endif |
19409 |
-# endif |
19410 |
- |
19411 |
-# ifdef YYSTACK_ALLOC |
19412 |
- /* Pacify GCC's 'empty if-body' warning. */ |
19413 |
-# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) |
19414 |
-# ifndef YYSTACK_ALLOC_MAXIMUM |
19415 |
- /* The OS might guarantee only one guard page at the bottom of the stack, |
19416 |
- and a page size can be as small as 4096 bytes. So we cannot safely |
19417 |
- invoke alloca (N) if N exceeds 4096. Use a slightly smaller number |
19418 |
- to allow for a few compiler-allocated temporary stack slots. */ |
19419 |
-# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ |
19420 |
-# endif |
19421 |
-# else |
19422 |
-# define YYSTACK_ALLOC YYMALLOC |
19423 |
-# define YYSTACK_FREE YYFREE |
19424 |
-# ifndef YYSTACK_ALLOC_MAXIMUM |
19425 |
-# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM |
19426 |
-# endif |
19427 |
-# if (defined __cplusplus && ! defined EXIT_SUCCESS \ |
19428 |
- && ! ((defined YYMALLOC || defined malloc) \ |
19429 |
- && (defined YYFREE || defined free))) |
19430 |
-# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ |
19431 |
-# ifndef EXIT_SUCCESS |
19432 |
-# define EXIT_SUCCESS 0 |
19433 |
-# endif |
19434 |
-# endif |
19435 |
-# ifndef YYMALLOC |
19436 |
-# define YYMALLOC malloc |
19437 |
-# if ! defined malloc && ! defined EXIT_SUCCESS |
19438 |
-void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ |
19439 |
-# endif |
19440 |
-# endif |
19441 |
-# ifndef YYFREE |
19442 |
-# define YYFREE free |
19443 |
-# if ! defined free && ! defined EXIT_SUCCESS |
19444 |
-void free (void *); /* INFRINGES ON USER NAME SPACE */ |
19445 |
-# endif |
19446 |
-# endif |
19447 |
-# endif |
19448 |
-#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ |
19449 |
- |
19450 |
- |
19451 |
-#if (! defined yyoverflow \ |
19452 |
- && (! defined __cplusplus \ |
19453 |
- || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \ |
19454 |
- && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) |
19455 |
- |
19456 |
-/* A type that is properly aligned for any stack member. */ |
19457 |
-union yyalloc |
19458 |
-{ |
19459 |
- yytype_int16 yyss_alloc; |
19460 |
- YYSTYPE yyvs_alloc; |
19461 |
- YYLTYPE yyls_alloc; |
19462 |
-}; |
19463 |
- |
19464 |
-/* The size of the maximum gap between one aligned stack and the next. */ |
19465 |
-# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) |
19466 |
- |
19467 |
-/* The size of an array large to enough to hold all stacks, each with |
19468 |
- N elements. */ |
19469 |
-# define YYSTACK_BYTES(N) \ |
19470 |
- ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \ |
19471 |
- + 2 * YYSTACK_GAP_MAXIMUM) |
19472 |
- |
19473 |
-# define YYCOPY_NEEDED 1 |
19474 |
- |
19475 |
-/* Relocate STACK from its old location to the new one. The |
19476 |
- local variables YYSIZE and YYSTACKSIZE give the old and new number of |
19477 |
- elements in the stack, and YYPTR gives the new location of the |
19478 |
- stack. Advance YYPTR to a properly aligned location for the next |
19479 |
- stack. */ |
19480 |
-# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ |
19481 |
- do \ |
19482 |
- { \ |
19483 |
- YYSIZE_T yynewbytes; \ |
19484 |
- YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ |
19485 |
- Stack = &yyptr->Stack_alloc; \ |
19486 |
- yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ |
19487 |
- yyptr += yynewbytes / sizeof (*yyptr); \ |
19488 |
- } \ |
19489 |
- while (0) |
19490 |
- |
19491 |
-#endif |
19492 |
- |
19493 |
-#if defined YYCOPY_NEEDED && YYCOPY_NEEDED |
19494 |
-/* Copy COUNT objects from SRC to DST. The source and destination do |
19495 |
- not overlap. */ |
19496 |
-# ifndef YYCOPY |
19497 |
-# if defined __GNUC__ && 1 < __GNUC__ |
19498 |
-# define YYCOPY(Dst, Src, Count) \ |
19499 |
- __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) |
19500 |
-# else |
19501 |
-# define YYCOPY(Dst, Src, Count) \ |
19502 |
- do \ |
19503 |
- { \ |
19504 |
- YYSIZE_T yyi; \ |
19505 |
- for (yyi = 0; yyi < (Count); yyi++) \ |
19506 |
- (Dst)[yyi] = (Src)[yyi]; \ |
19507 |
- } \ |
19508 |
- while (0) |
19509 |
-# endif |
19510 |
-# endif |
19511 |
-#endif /* !YYCOPY_NEEDED */ |
19512 |
- |
19513 |
-/* YYFINAL -- State number of the termination state. */ |
19514 |
-#define YYFINAL 7 |
19515 |
-/* YYLAST -- Last index in YYTABLE. */ |
19516 |
-#define YYLAST 18 |
19517 |
- |
19518 |
-/* YYNTOKENS -- Number of terminals. */ |
19519 |
-#define YYNTOKENS 12 |
19520 |
-/* YYNNTS -- Number of nonterminals. */ |
19521 |
-#define YYNNTS 3 |
19522 |
-/* YYNRULES -- Number of rules. */ |
19523 |
-#define YYNRULES 7 |
19524 |
-/* YYNSTATES -- Number of states. */ |
19525 |
-#define YYNSTATES 18 |
19526 |
- |
19527 |
-#define YYUNDEFTOK 2 |
19528 |
-#define YYMAXUTOK 266 |
19529 |
- |
19530 |
-/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM |
19531 |
- as returned by yylex, with out-of-bounds checking. */ |
19532 |
-#define YYTRANSLATE(YYX) \ |
19533 |
- ((unsigned) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) |
19534 |
- |
19535 |
-/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM |
19536 |
- as returned by yylex. */ |
19537 |
-static const yytype_uint8 yytranslate[] = |
19538 |
-{ |
19539 |
- 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
19540 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
19541 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
19542 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
19543 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
19544 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
19545 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
19546 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
19547 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
19548 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
19549 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
19550 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
19551 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
19552 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
19553 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
19554 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
19555 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
19556 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
19557 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
19558 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
19559 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
19560 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
19561 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
19562 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
19563 |
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
19564 |
- 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, |
19565 |
- 5, 6, 7, 8, 9, 10, 11 |
19566 |
-}; |
19567 |
- |
19568 |
-#if YYDEBUG |
19569 |
- /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ |
19570 |
-static const yytype_uint16 yyrline[] = |
19571 |
-{ |
19572 |
- 0, 456, 456, 457, 460, 464, 477, 492 |
19573 |
-}; |
19574 |
-#endif |
19575 |
- |
19576 |
-#if YYDEBUG || YYERROR_VERBOSE || 0 |
19577 |
-/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. |
19578 |
- First, the terminals, then, starting at YYNTOKENS, nonterminals. */ |
19579 |
-static const char *const yytname[] = |
19580 |
-{ |
19581 |
- "$end", "error", "$undefined", "EQUAL", "COMMA", "OBRACKET", "CBRACKET", |
19582 |
- "EOA", "STRING", "VARIABLE", "RSTRING", "INTEGER", "$accept", |
19583 |
- "vm_string", "vm_variable", YY_NULLPTR |
19584 |
-}; |
19585 |
-#endif |
19586 |
- |
19587 |
-# ifdef YYPRINT |
19588 |
-/* YYTOKNUM[NUM] -- (External) token number corresponding to the |
19589 |
- (internal) symbol number NUM (which must be that of a token). */ |
19590 |
-static const yytype_uint16 yytoknum[] = |
19591 |
-{ |
19592 |
- 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, |
19593 |
- 265, 266 |
19594 |
-}; |
19595 |
-# endif |
19596 |
- |
19597 |
-#define YYPACT_NINF -5 |
19598 |
- |
19599 |
-#define yypact_value_is_default(Yystate) \ |
19600 |
- (!!((Yystate) == (-5))) |
19601 |
- |
19602 |
-#define YYTABLE_NINF -1 |
19603 |
- |
19604 |
-#define yytable_value_is_error(Yytable_value) \ |
19605 |
- 0 |
19606 |
- |
19607 |
- /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing |
19608 |
- STATE-NUM. */ |
19609 |
-static const yytype_int8 yypact[] = |
19610 |
-{ |
19611 |
- -3, -4, -5, 0, -5, -1, -5, -5, -5, -2, |
19612 |
- 2, 5, 10, -5, 6, 9, 11, -5 |
19613 |
-}; |
19614 |
- |
19615 |
- /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. |
19616 |
- Performed when YYTABLE does not specify something else to do. Zero |
19617 |
- means the default is an error. */ |
19618 |
-static const yytype_uint8 yydefact[] = |
19619 |
-{ |
19620 |
- 0, 0, 4, 0, 2, 0, 5, 1, 3, 0, |
19621 |
- 0, 0, 0, 6, 0, 0, 0, 7 |
19622 |
-}; |
19623 |
- |
19624 |
- /* YYPGOTO[NTERM-NUM]. */ |
19625 |
-static const yytype_int8 yypgoto[] = |
19626 |
-{ |
19627 |
- -5, -5, 13 |
19628 |
-}; |
19629 |
- |
19630 |
- /* YYDEFGOTO[NTERM-NUM]. */ |
19631 |
-static const yytype_int8 yydefgoto[] = |
19632 |
-{ |
19633 |
- -1, 3, 4 |
19634 |
-}; |
19635 |
- |
19636 |
- /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If |
19637 |
- positive, shift that token. If negative, reduce the rule whose |
19638 |
- number is the opposite. If YYTABLE_NINF, syntax error. */ |
19639 |
-static const yytype_uint8 yytable[] = |
19640 |
-{ |
19641 |
- 7, 5, 10, 6, 11, 0, 1, 2, 9, 1, |
19642 |
- 2, 12, 13, 14, 15, 16, 8, 0, 17 |
19643 |
-}; |
19644 |
- |
19645 |
-static const yytype_int8 yycheck[] = |
19646 |
-{ |
19647 |
- 0, 5, 4, 7, 6, -1, 9, 10, 9, 9, |
19648 |
- 10, 9, 7, 3, 8, 6, 3, -1, 7 |
19649 |
-}; |
19650 |
- |
19651 |
- /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing |
19652 |
- symbol of state STATE-NUM. */ |
19653 |
-static const yytype_uint8 yystos[] = |
19654 |
-{ |
19655 |
- 0, 9, 10, 13, 14, 5, 7, 0, 14, 9, |
19656 |
- 4, 6, 9, 7, 3, 8, 6, 7 |
19657 |
-}; |
19658 |
- |
19659 |
- /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ |
19660 |
-static const yytype_uint8 yyr1[] = |
19661 |
-{ |
19662 |
- 0, 12, 13, 13, 14, 14, 14, 14 |
19663 |
-}; |
19664 |
- |
19665 |
- /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ |
19666 |
-static const yytype_uint8 yyr2[] = |
19667 |
-{ |
19668 |
- 0, 2, 1, 2, 1, 2, 5, 9 |
19669 |
-}; |
19670 |
- |
19671 |
- |
19672 |
-#define yyerrok (yyerrstatus = 0) |
19673 |
-#define yyclearin (yychar = YYEMPTY) |
19674 |
-#define YYEMPTY (-2) |
19675 |
-#define YYEOF 0 |
19676 |
- |
19677 |
-#define YYACCEPT goto yyacceptlab |
19678 |
-#define YYABORT goto yyabortlab |
19679 |
-#define YYERROR goto yyerrorlab |
19680 |
- |
19681 |
- |
19682 |
-#define YYRECOVERING() (!!yyerrstatus) |
19683 |
- |
19684 |
-#define YYBACKUP(Token, Value) \ |
19685 |
- do \ |
19686 |
- if (yychar == YYEMPTY) \ |
19687 |
- { \ |
19688 |
- yychar = (Token); \ |
19689 |
- yylval = (Value); \ |
19690 |
- YYPOPSTACK (yylen); \ |
19691 |
- yystate = *yyssp; \ |
19692 |
- goto yybackup; \ |
19693 |
- } \ |
19694 |
- else \ |
19695 |
- { \ |
19696 |
- yyerror (&yylloc, mc, vm, parsed, errmsg, scanner, YY_("syntax error: cannot back up")); \ |
19697 |
- YYERROR; \ |
19698 |
- } \ |
19699 |
- while (0) |
19700 |
- |
19701 |
-/* Error token number */ |
19702 |
-#define YYTERROR 1 |
19703 |
-#define YYERRCODE 256 |
19704 |
- |
19705 |
- |
19706 |
-/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. |
19707 |
- If N is 0, then set CURRENT to the empty location which ends |
19708 |
- the previous symbol: RHS[0] (always defined). */ |
19709 |
- |
19710 |
-#ifndef YYLLOC_DEFAULT |
19711 |
-# define YYLLOC_DEFAULT(Current, Rhs, N) \ |
19712 |
- do \ |
19713 |
- if (N) \ |
19714 |
- { \ |
19715 |
- (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ |
19716 |
- (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ |
19717 |
- (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ |
19718 |
- (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ |
19719 |
- } \ |
19720 |
- else \ |
19721 |
- { \ |
19722 |
- (Current).first_line = (Current).last_line = \ |
19723 |
- YYRHSLOC (Rhs, 0).last_line; \ |
19724 |
- (Current).first_column = (Current).last_column = \ |
19725 |
- YYRHSLOC (Rhs, 0).last_column; \ |
19726 |
- } \ |
19727 |
- while (0) |
19728 |
-#endif |
19729 |
- |
19730 |
-#define YYRHSLOC(Rhs, K) ((Rhs)[K]) |
19731 |
- |
19732 |
- |
19733 |
-/* Enable debugging if requested. */ |
19734 |
-#if YYDEBUG |
19735 |
- |
19736 |
-# ifndef YYFPRINTF |
19737 |
-# include <stdio.h> /* INFRINGES ON USER NAME SPACE */ |
19738 |
-# define YYFPRINTF fprintf |
19739 |
-# endif |
19740 |
- |
19741 |
-# define YYDPRINTF(Args) \ |
19742 |
-do { \ |
19743 |
- if (yydebug) \ |
19744 |
- YYFPRINTF Args; \ |
19745 |
-} while (0) |
19746 |
- |
19747 |
- |
19748 |
-/* YY_LOCATION_PRINT -- Print the location on the stream. |
19749 |
- This macro was not mandated originally: define only if we know |
19750 |
- we won't break user code: when these are the locations we know. */ |
19751 |
- |
19752 |
-#ifndef YY_LOCATION_PRINT |
19753 |
-# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL |
19754 |
- |
19755 |
-/* Print *YYLOCP on YYO. Private, do not rely on its existence. */ |
19756 |
- |
19757 |
-YY_ATTRIBUTE_UNUSED |
19758 |
-static int |
19759 |
-yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp) |
19760 |
-{ |
19761 |
- int res = 0; |
19762 |
- int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0; |
19763 |
- if (0 <= yylocp->first_line) |
19764 |
- { |
19765 |
- res += YYFPRINTF (yyo, "%d", yylocp->first_line); |
19766 |
- if (0 <= yylocp->first_column) |
19767 |
- res += YYFPRINTF (yyo, ".%d", yylocp->first_column); |
19768 |
- } |
19769 |
- if (0 <= yylocp->last_line) |
19770 |
- { |
19771 |
- if (yylocp->first_line < yylocp->last_line) |
19772 |
- { |
19773 |
- res += YYFPRINTF (yyo, "-%d", yylocp->last_line); |
19774 |
- if (0 <= end_col) |
19775 |
- res += YYFPRINTF (yyo, ".%d", end_col); |
19776 |
- } |
19777 |
- else if (0 <= end_col && yylocp->first_column < end_col) |
19778 |
- res += YYFPRINTF (yyo, "-%d", end_col); |
19779 |
- } |
19780 |
- return res; |
19781 |
- } |
19782 |
- |
19783 |
-# define YY_LOCATION_PRINT(File, Loc) \ |
19784 |
- yy_location_print_ (File, &(Loc)) |
19785 |
- |
19786 |
-# else |
19787 |
-# define YY_LOCATION_PRINT(File, Loc) ((void) 0) |
19788 |
-# endif |
19789 |
-#endif |
19790 |
- |
19791 |
- |
19792 |
-# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ |
19793 |
-do { \ |
19794 |
- if (yydebug) \ |
19795 |
- { \ |
19796 |
- YYFPRINTF (stderr, "%s ", Title); \ |
19797 |
- yy_symbol_print (stderr, \ |
19798 |
- Type, Value, Location, mc, vm, parsed, errmsg, scanner); \ |
19799 |
- YYFPRINTF (stderr, "\n"); \ |
19800 |
- } \ |
19801 |
-} while (0) |
19802 |
- |
19803 |
- |
19804 |
-/*-----------------------------------. |
19805 |
-| Print this symbol's value on YYO. | |
19806 |
-`-----------------------------------*/ |
19807 |
- |
19808 |
-static void |
19809 |
-yy_symbol_value_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, mem_collector * mc, VirtualMachine * vm, ostringstream * parsed, char ** errmsg, yyscan_t scanner) |
19810 |
-{ |
19811 |
- FILE *yyoutput = yyo; |
19812 |
- YYUSE (yyoutput); |
19813 |
- YYUSE (yylocationp); |
19814 |
- YYUSE (mc); |
19815 |
- YYUSE (vm); |
19816 |
- YYUSE (parsed); |
19817 |
- YYUSE (errmsg); |
19818 |
- YYUSE (scanner); |
19819 |
- if (!yyvaluep) |
19820 |
- return; |
19821 |
-# ifdef YYPRINT |
19822 |
- if (yytype < YYNTOKENS) |
19823 |
- YYPRINT (yyo, yytoknum[yytype], *yyvaluep); |
19824 |
-# endif |
19825 |
- YYUSE (yytype); |
19826 |
-} |
19827 |
- |
19828 |
- |
19829 |
-/*---------------------------. |
19830 |
-| Print this symbol on YYO. | |
19831 |
-`---------------------------*/ |
19832 |
- |
19833 |
-static void |
19834 |
-yy_symbol_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, mem_collector * mc, VirtualMachine * vm, ostringstream * parsed, char ** errmsg, yyscan_t scanner) |
19835 |
-{ |
19836 |
- YYFPRINTF (yyo, "%s %s (", |
19837 |
- yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); |
19838 |
- |
19839 |
- YY_LOCATION_PRINT (yyo, *yylocationp); |
19840 |
- YYFPRINTF (yyo, ": "); |
19841 |
- yy_symbol_value_print (yyo, yytype, yyvaluep, yylocationp, mc, vm, parsed, errmsg, scanner); |
19842 |
- YYFPRINTF (yyo, ")"); |
19843 |
-} |
19844 |
- |
19845 |
-/*------------------------------------------------------------------. |
19846 |
-| yy_stack_print -- Print the state stack from its BOTTOM up to its | |
19847 |
-| TOP (included). | |
19848 |
-`------------------------------------------------------------------*/ |
19849 |
- |
19850 |
-static void |
19851 |
-yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) |
19852 |
-{ |
19853 |
- YYFPRINTF (stderr, "Stack now"); |
19854 |
- for (; yybottom <= yytop; yybottom++) |
19855 |
- { |
19856 |
- int yybot = *yybottom; |
19857 |
- YYFPRINTF (stderr, " %d", yybot); |
19858 |
- } |
19859 |
- YYFPRINTF (stderr, "\n"); |
19860 |
-} |
19861 |
- |
19862 |
-# define YY_STACK_PRINT(Bottom, Top) \ |
19863 |
-do { \ |
19864 |
- if (yydebug) \ |
19865 |
- yy_stack_print ((Bottom), (Top)); \ |
19866 |
-} while (0) |
19867 |
- |
19868 |
- |
19869 |
-/*------------------------------------------------. |
19870 |
-| Report that the YYRULE is going to be reduced. | |
19871 |
-`------------------------------------------------*/ |
19872 |
- |
19873 |
-static void |
19874 |
-yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, mem_collector * mc, VirtualMachine * vm, ostringstream * parsed, char ** errmsg, yyscan_t scanner) |
19875 |
-{ |
19876 |
- unsigned long yylno = yyrline[yyrule]; |
19877 |
- int yynrhs = yyr2[yyrule]; |
19878 |
- int yyi; |
19879 |
- YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", |
19880 |
- yyrule - 1, yylno); |
19881 |
- /* The symbols being reduced. */ |
19882 |
- for (yyi = 0; yyi < yynrhs; yyi++) |
19883 |
- { |
19884 |
- YYFPRINTF (stderr, " $%d = ", yyi + 1); |
19885 |
- yy_symbol_print (stderr, |
19886 |
- yystos[yyssp[yyi + 1 - yynrhs]], |
19887 |
- &yyvsp[(yyi + 1) - (yynrhs)] |
19888 |
- , &(yylsp[(yyi + 1) - (yynrhs)]) , mc, vm, parsed, errmsg, scanner); |
19889 |
- YYFPRINTF (stderr, "\n"); |
19890 |
- } |
19891 |
-} |
19892 |
- |
19893 |
-# define YY_REDUCE_PRINT(Rule) \ |
19894 |
-do { \ |
19895 |
- if (yydebug) \ |
19896 |
- yy_reduce_print (yyssp, yyvsp, yylsp, Rule, mc, vm, parsed, errmsg, scanner); \ |
19897 |
-} while (0) |
19898 |
- |
19899 |
-/* Nonzero means print parse trace. It is left uninitialized so that |
19900 |
- multiple parsers can coexist. */ |
19901 |
-int yydebug; |
19902 |
-#else /* !YYDEBUG */ |
19903 |
-# define YYDPRINTF(Args) |
19904 |
-# define YY_SYMBOL_PRINT(Title, Type, Value, Location) |
19905 |
-# define YY_STACK_PRINT(Bottom, Top) |
19906 |
-# define YY_REDUCE_PRINT(Rule) |
19907 |
-#endif /* !YYDEBUG */ |
19908 |
- |
19909 |
- |
19910 |
-/* YYINITDEPTH -- initial size of the parser's stacks. */ |
19911 |
-#ifndef YYINITDEPTH |
19912 |
-# define YYINITDEPTH 200 |
19913 |
-#endif |
19914 |
- |
19915 |
-/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only |
19916 |
- if the built-in stack extension method is used). |
19917 |
- |
19918 |
- Do not make this value too large; the results are undefined if |
19919 |
- YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) |
19920 |
- evaluated with infinite-precision integer arithmetic. */ |
19921 |
- |
19922 |
-#ifndef YYMAXDEPTH |
19923 |
-# define YYMAXDEPTH 10000 |
19924 |
-#endif |
19925 |
- |
19926 |
- |
19927 |
-#if YYERROR_VERBOSE |
19928 |
- |
19929 |
-# ifndef yystrlen |
19930 |
-# if defined __GLIBC__ && defined _STRING_H |
19931 |
-# define yystrlen strlen |
19932 |
-# else |
19933 |
-/* Return the length of YYSTR. */ |
19934 |
-static YYSIZE_T |
19935 |
-yystrlen (const char *yystr) |
19936 |
-{ |
19937 |
- YYSIZE_T yylen; |
19938 |
- for (yylen = 0; yystr[yylen]; yylen++) |
19939 |
- continue; |
19940 |
- return yylen; |
19941 |
-} |
19942 |
-# endif |
19943 |
-# endif |
19944 |
- |
19945 |
-# ifndef yystpcpy |
19946 |
-# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE |
19947 |
-# define yystpcpy stpcpy |
19948 |
-# else |
19949 |
-/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in |
19950 |
- YYDEST. */ |
19951 |
-static char * |
19952 |
-yystpcpy (char *yydest, const char *yysrc) |
19953 |
-{ |
19954 |
- char *yyd = yydest; |
19955 |
- const char *yys = yysrc; |
19956 |
- |
19957 |
- while ((*yyd++ = *yys++) != '\0') |
19958 |
- continue; |
19959 |
- |
19960 |
- return yyd - 1; |
19961 |
-} |
19962 |
-# endif |
19963 |
-# endif |
19964 |
- |
19965 |
-# ifndef yytnamerr |
19966 |
-/* Copy to YYRES the contents of YYSTR after stripping away unnecessary |
19967 |
- quotes and backslashes, so that it's suitable for yyerror. The |
19968 |
- heuristic is that double-quoting is unnecessary unless the string |
19969 |
- contains an apostrophe, a comma, or backslash (other than |
19970 |
- backslash-backslash). YYSTR is taken from yytname. If YYRES is |
19971 |
- null, do not copy; instead, return the length of what the result |
19972 |
- would have been. */ |
19973 |
-static YYSIZE_T |
19974 |
-yytnamerr (char *yyres, const char *yystr) |
19975 |
-{ |
19976 |
- if (*yystr == '"') |
19977 |
- { |
19978 |
- YYSIZE_T yyn = 0; |
19979 |
- char const *yyp = yystr; |
19980 |
- |
19981 |
- for (;;) |
19982 |
- switch (*++yyp) |
19983 |
- { |
19984 |
- case '\'': |
19985 |
- case ',': |
19986 |
- goto do_not_strip_quotes; |
19987 |
- |
19988 |
- case '\\': |
19989 |
- if (*++yyp != '\\') |
19990 |
- goto do_not_strip_quotes; |
19991 |
- else |
19992 |
- goto append; |
19993 |
- |
19994 |
- append: |
19995 |
- default: |
19996 |
- if (yyres) |
19997 |
- yyres[yyn] = *yyp; |
19998 |
- yyn++; |
19999 |
- break; |
20000 |
- |
20001 |
- case '"': |
20002 |
- if (yyres) |
20003 |
- yyres[yyn] = '\0'; |
20004 |
- return yyn; |
20005 |
- } |
20006 |
- do_not_strip_quotes: ; |
20007 |
- } |
20008 |
- |
20009 |
- if (! yyres) |
20010 |
- return yystrlen (yystr); |
20011 |
- |
20012 |
- return (YYSIZE_T) (yystpcpy (yyres, yystr) - yyres); |
20013 |
-} |
20014 |
-# endif |
20015 |
- |
20016 |
-/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message |
20017 |
- about the unexpected token YYTOKEN for the state stack whose top is |
20018 |
- YYSSP. |
20019 |
- |
20020 |
- Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is |
20021 |
- not large enough to hold the message. In that case, also set |
20022 |
- *YYMSG_ALLOC to the required number of bytes. Return 2 if the |
20023 |
- required number of bytes is too large to store. */ |
20024 |
-static int |
20025 |
-yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, |
20026 |
- yytype_int16 *yyssp, int yytoken) |
20027 |
-{ |
20028 |
- YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]); |
20029 |
- YYSIZE_T yysize = yysize0; |
20030 |
- enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; |
20031 |
- /* Internationalized format string. */ |
20032 |
- const char *yyformat = YY_NULLPTR; |
20033 |
- /* Arguments of yyformat. */ |
20034 |
- char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; |
20035 |
- /* Number of reported tokens (one for the "unexpected", one per |
20036 |
- "expected"). */ |
20037 |
- int yycount = 0; |
20038 |
- |
20039 |
- /* There are many possibilities here to consider: |
20040 |
- - If this state is a consistent state with a default action, then |
20041 |
- the only way this function was invoked is if the default action |
20042 |
- is an error action. In that case, don't check for expected |
20043 |
- tokens because there are none. |
20044 |
- - The only way there can be no lookahead present (in yychar) is if |
20045 |
- this state is a consistent state with a default action. Thus, |
20046 |
- detecting the absence of a lookahead is sufficient to determine |
20047 |
- that there is no unexpected or expected token to report. In that |
20048 |
- case, just report a simple "syntax error". |
20049 |
- - Don't assume there isn't a lookahead just because this state is a |
20050 |
- consistent state with a default action. There might have been a |
20051 |
- previous inconsistent state, consistent state with a non-default |
20052 |
- action, or user semantic action that manipulated yychar. |
20053 |
- - Of course, the expected token list depends on states to have |
20054 |
- correct lookahead information, and it depends on the parser not |
20055 |
- to perform extra reductions after fetching a lookahead from the |
20056 |
- scanner and before detecting a syntax error. Thus, state merging |
20057 |
- (from LALR or IELR) and default reductions corrupt the expected |
20058 |
- token list. However, the list is correct for canonical LR with |
20059 |
- one exception: it will still contain any token that will not be |
20060 |
- accepted due to an error action in a later state. |
20061 |
- */ |
20062 |
- if (yytoken != YYEMPTY) |
20063 |
- { |
20064 |
- int yyn = yypact[*yyssp]; |
20065 |
- yyarg[yycount++] = yytname[yytoken]; |
20066 |
- if (!yypact_value_is_default (yyn)) |
20067 |
- { |
20068 |
- /* Start YYX at -YYN if negative to avoid negative indexes in |
20069 |
- YYCHECK. In other words, skip the first -YYN actions for |
20070 |
- this state because they are default actions. */ |
20071 |
- int yyxbegin = yyn < 0 ? -yyn : 0; |
20072 |
- /* Stay within bounds of both yycheck and yytname. */ |
20073 |
- int yychecklim = YYLAST - yyn + 1; |
20074 |
- int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; |
20075 |
- int yyx; |
20076 |
- |
20077 |
- for (yyx = yyxbegin; yyx < yyxend; ++yyx) |
20078 |
- if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR |
20079 |
- && !yytable_value_is_error (yytable[yyx + yyn])) |
20080 |
- { |
20081 |
- if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) |
20082 |
- { |
20083 |
- yycount = 1; |
20084 |
- yysize = yysize0; |
20085 |
- break; |
20086 |
- } |
20087 |
- yyarg[yycount++] = yytname[yyx]; |
20088 |
- { |
20089 |
- YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]); |
20090 |
- if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) |
20091 |
- yysize = yysize1; |
20092 |
- else |
20093 |
- return 2; |
20094 |
- } |
20095 |
- } |
20096 |
- } |
20097 |
- } |
20098 |
- |
20099 |
- switch (yycount) |
20100 |
- { |
20101 |
-# define YYCASE_(N, S) \ |
20102 |
- case N: \ |
20103 |
- yyformat = S; \ |
20104 |
- break |
20105 |
- default: /* Avoid compiler warnings. */ |
20106 |
- YYCASE_(0, YY_("syntax error")); |
20107 |
- YYCASE_(1, YY_("syntax error, unexpected %s")); |
20108 |
- YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); |
20109 |
- YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); |
20110 |
- YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); |
20111 |
- YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); |
20112 |
-# undef YYCASE_ |
20113 |
- } |
20114 |
- |
20115 |
- { |
20116 |
- YYSIZE_T yysize1 = yysize + yystrlen (yyformat); |
20117 |
- if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) |
20118 |
- yysize = yysize1; |
20119 |
- else |
20120 |
- return 2; |
20121 |
- } |
20122 |
- |
20123 |
- if (*yymsg_alloc < yysize) |
20124 |
- { |
20125 |
- *yymsg_alloc = 2 * yysize; |
20126 |
- if (! (yysize <= *yymsg_alloc |
20127 |
- && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) |
20128 |
- *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; |
20129 |
- return 1; |
20130 |
- } |
20131 |
- |
20132 |
- /* Avoid sprintf, as that infringes on the user's name space. |
20133 |
- Don't have undefined behavior even if the translation |
20134 |
- produced a string with the wrong number of "%s"s. */ |
20135 |
- { |
20136 |
- char *yyp = *yymsg; |
20137 |
- int yyi = 0; |
20138 |
- while ((*yyp = *yyformat) != '\0') |
20139 |
- if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) |
20140 |
- { |
20141 |
- yyp += yytnamerr (yyp, yyarg[yyi++]); |
20142 |
- yyformat += 2; |
20143 |
- } |
20144 |
- else |
20145 |
- { |
20146 |
- yyp++; |
20147 |
- yyformat++; |
20148 |
- } |
20149 |
- } |
20150 |
- return 0; |
20151 |
-} |
20152 |
-#endif /* YYERROR_VERBOSE */ |
20153 |
- |
20154 |
-/*-----------------------------------------------. |
20155 |
-| Release the memory associated to this symbol. | |
20156 |
-`-----------------------------------------------*/ |
20157 |
- |
20158 |
-static void |
20159 |
-yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, mem_collector * mc, VirtualMachine * vm, ostringstream * parsed, char ** errmsg, yyscan_t scanner) |
20160 |
-{ |
20161 |
- YYUSE (yyvaluep); |
20162 |
- YYUSE (yylocationp); |
20163 |
- YYUSE (mc); |
20164 |
- YYUSE (vm); |
20165 |
- YYUSE (parsed); |
20166 |
- YYUSE (errmsg); |
20167 |
- YYUSE (scanner); |
20168 |
- if (!yymsg) |
20169 |
- yymsg = "Deleting"; |
20170 |
- YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); |
20171 |
- |
20172 |
- YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
20173 |
- YYUSE (yytype); |
20174 |
- YY_IGNORE_MAYBE_UNINITIALIZED_END |
20175 |
-} |
20176 |
- |
20177 |
- |
20178 |
- |
20179 |
- |
20180 |
-/*----------. |
20181 |
-| yyparse. | |
20182 |
-`----------*/ |
20183 |
- |
20184 |
-int |
20185 |
-yyparse (mem_collector * mc, VirtualMachine * vm, ostringstream * parsed, char ** errmsg, yyscan_t scanner) |
20186 |
-{ |
20187 |
-/* The lookahead symbol. */ |
20188 |
-int yychar; |
20189 |
- |
20190 |
- |
20191 |
-/* The semantic value of the lookahead symbol. */ |
20192 |
-/* Default value used for initialization, for pacifying older GCCs |
20193 |
- or non-GCC compilers. */ |
20194 |
-YY_INITIAL_VALUE (static YYSTYPE yyval_default;) |
20195 |
-YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); |
20196 |
- |
20197 |
-/* Location data for the lookahead symbol. */ |
20198 |
-static YYLTYPE yyloc_default |
20199 |
-# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL |
20200 |
- = { 1, 1, 1, 1 } |
20201 |
-# endif |
20202 |
-; |
20203 |
-YYLTYPE yylloc = yyloc_default; |
20204 |
- |
20205 |
- /* Number of syntax errors so far. */ |
20206 |
- int yynerrs; |
20207 |
- |
20208 |
- int yystate; |
20209 |
- /* Number of tokens to shift before error messages enabled. */ |
20210 |
- int yyerrstatus; |
20211 |
- |
20212 |
- /* The stacks and their tools: |
20213 |
- 'yyss': related to states. |
20214 |
- 'yyvs': related to semantic values. |
20215 |
- 'yyls': related to locations. |
20216 |
- |
20217 |
- Refer to the stacks through separate pointers, to allow yyoverflow |
20218 |
- to reallocate them elsewhere. */ |
20219 |
- |
20220 |
- /* The state stack. */ |
20221 |
- yytype_int16 yyssa[YYINITDEPTH]; |
20222 |
- yytype_int16 *yyss; |
20223 |
- yytype_int16 *yyssp; |
20224 |
- |
20225 |
- /* The semantic value stack. */ |
20226 |
- YYSTYPE yyvsa[YYINITDEPTH]; |
20227 |
- YYSTYPE *yyvs; |
20228 |
- YYSTYPE *yyvsp; |
20229 |
- |
20230 |
- /* The location stack. */ |
20231 |
- YYLTYPE yylsa[YYINITDEPTH]; |
20232 |
- YYLTYPE *yyls; |
20233 |
- YYLTYPE *yylsp; |
20234 |
- |
20235 |
- /* The locations where the error started and ended. */ |
20236 |
- YYLTYPE yyerror_range[3]; |
20237 |
- |
20238 |
- YYSIZE_T yystacksize; |
20239 |
- |
20240 |
- int yyn; |
20241 |
- int yyresult; |
20242 |
- /* Lookahead token as an internal (translated) token number. */ |
20243 |
- int yytoken = 0; |
20244 |
- /* The variables used to return semantic value and location from the |
20245 |
- action routines. */ |
20246 |
- YYSTYPE yyval; |
20247 |
- YYLTYPE yyloc; |
20248 |
- |
20249 |
-#if YYERROR_VERBOSE |
20250 |
- /* Buffer for error messages, and its allocated size. */ |
20251 |
- char yymsgbuf[128]; |
20252 |
- char *yymsg = yymsgbuf; |
20253 |
- YYSIZE_T yymsg_alloc = sizeof yymsgbuf; |
20254 |
-#endif |
20255 |
- |
20256 |
-#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) |
20257 |
- |
20258 |
- /* The number of symbols on the RHS of the reduced rule. |
20259 |
- Keep to zero when no symbol should be popped. */ |
20260 |
- int yylen = 0; |
20261 |
- |
20262 |
- yyssp = yyss = yyssa; |
20263 |
- yyvsp = yyvs = yyvsa; |
20264 |
- yylsp = yyls = yylsa; |
20265 |
- yystacksize = YYINITDEPTH; |
20266 |
- |
20267 |
- YYDPRINTF ((stderr, "Starting parse\n")); |
20268 |
- |
20269 |
- yystate = 0; |
20270 |
- yyerrstatus = 0; |
20271 |
- yynerrs = 0; |
20272 |
- yychar = YYEMPTY; /* Cause a token to be read. */ |
20273 |
- yylsp[0] = yylloc; |
20274 |
- goto yysetstate; |
20275 |
- |
20276 |
- |
20277 |
-/*------------------------------------------------------------. |
20278 |
-| yynewstate -- push a new state, which is found in yystate. | |
20279 |
-`------------------------------------------------------------*/ |
20280 |
-yynewstate: |
20281 |
- /* In all cases, when you get here, the value and location stacks |
20282 |
- have just been pushed. So pushing a state here evens the stacks. */ |
20283 |
- yyssp++; |
20284 |
- |
20285 |
- |
20286 |
-/*--------------------------------------------------------------------. |
20287 |
-| yynewstate -- set current state (the top of the stack) to yystate. | |
20288 |
-`--------------------------------------------------------------------*/ |
20289 |
-yysetstate: |
20290 |
- YYDPRINTF ((stderr, "Entering state %d\n", yystate)); |
20291 |
- YY_ASSERT (0 <= yystate && yystate < YYNSTATES); |
20292 |
- *yyssp = (yytype_int16) yystate; |
20293 |
- |
20294 |
- if (yyss + yystacksize - 1 <= yyssp) |
20295 |
-#if !defined yyoverflow && !defined YYSTACK_RELOCATE |
20296 |
- goto yyexhaustedlab; |
20297 |
-#else |
20298 |
- { |
20299 |
- /* Get the current used size of the three stacks, in elements. */ |
20300 |
- YYSIZE_T yysize = (YYSIZE_T) (yyssp - yyss + 1); |
20301 |
- |
20302 |
-# if defined yyoverflow |
20303 |
- { |
20304 |
- /* Give user a chance to reallocate the stack. Use copies of |
20305 |
- these so that the &'s don't force the real ones into |
20306 |
- memory. */ |
20307 |
- YYSTYPE *yyvs1 = yyvs; |
20308 |
- yytype_int16 *yyss1 = yyss; |
20309 |
- YYLTYPE *yyls1 = yyls; |
20310 |
- |
20311 |
- /* Each stack pointer address is followed by the size of the |
20312 |
- data in use in that stack, in bytes. This used to be a |
20313 |
- conditional around just the two extra args, but that might |
20314 |
- be undefined if yyoverflow is a macro. */ |
20315 |
- yyoverflow (YY_("memory exhausted"), |
20316 |
- &yyss1, yysize * sizeof (*yyssp), |
20317 |
- &yyvs1, yysize * sizeof (*yyvsp), |
20318 |
- &yyls1, yysize * sizeof (*yylsp), |
20319 |
- &yystacksize); |
20320 |
- yyss = yyss1; |
20321 |
- yyvs = yyvs1; |
20322 |
- yyls = yyls1; |
20323 |
- } |
20324 |
-# else /* defined YYSTACK_RELOCATE */ |
20325 |
- /* Extend the stack our own way. */ |
20326 |
- if (YYMAXDEPTH <= yystacksize) |
20327 |
- goto yyexhaustedlab; |
20328 |
- yystacksize *= 2; |
20329 |
- if (YYMAXDEPTH < yystacksize) |
20330 |
- yystacksize = YYMAXDEPTH; |
20331 |
- |
20332 |
- { |
20333 |
- yytype_int16 *yyss1 = yyss; |
20334 |
- union yyalloc *yyptr = |
20335 |
- (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); |
20336 |
- if (! yyptr) |
20337 |
- goto yyexhaustedlab; |
20338 |
- YYSTACK_RELOCATE (yyss_alloc, yyss); |
20339 |
- YYSTACK_RELOCATE (yyvs_alloc, yyvs); |
20340 |
- YYSTACK_RELOCATE (yyls_alloc, yyls); |
20341 |
-# undef YYSTACK_RELOCATE |
20342 |
- if (yyss1 != yyssa) |
20343 |
- YYSTACK_FREE (yyss1); |
20344 |
- } |
20345 |
-# endif |
20346 |
- |
20347 |
- yyssp = yyss + yysize - 1; |
20348 |
- yyvsp = yyvs + yysize - 1; |
20349 |
- yylsp = yyls + yysize - 1; |
20350 |
- |
20351 |
- YYDPRINTF ((stderr, "Stack size increased to %lu\n", |
20352 |
- (unsigned long) yystacksize)); |
20353 |
- |
20354 |
- if (yyss + yystacksize - 1 <= yyssp) |
20355 |
- YYABORT; |
20356 |
- } |
20357 |
-#endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */ |
20358 |
- |
20359 |
- if (yystate == YYFINAL) |
20360 |
- YYACCEPT; |
20361 |
- |
20362 |
- goto yybackup; |
20363 |
- |
20364 |
- |
20365 |
-/*-----------. |
20366 |
-| yybackup. | |
20367 |
-`-----------*/ |
20368 |
-yybackup: |
20369 |
- /* Do appropriate processing given the current state. Read a |
20370 |
- lookahead token if we need one and don't already have one. */ |
20371 |
- |
20372 |
- /* First try to decide what to do without reference to lookahead token. */ |
20373 |
- yyn = yypact[yystate]; |
20374 |
- if (yypact_value_is_default (yyn)) |
20375 |
- goto yydefault; |
20376 |
- |
20377 |
- /* Not known => get a lookahead token if don't already have one. */ |
20378 |
- |
20379 |
- /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ |
20380 |
- if (yychar == YYEMPTY) |
20381 |
- { |
20382 |
- YYDPRINTF ((stderr, "Reading a token: ")); |
20383 |
- yychar = yylex (&yylval, &yylloc, mc, scanner); |
20384 |
- } |
20385 |
- |
20386 |
- if (yychar <= YYEOF) |
20387 |
- { |
20388 |
- yychar = yytoken = YYEOF; |
20389 |
- YYDPRINTF ((stderr, "Now at end of input.\n")); |
20390 |
- } |
20391 |
- else |
20392 |
- { |
20393 |
- yytoken = YYTRANSLATE (yychar); |
20394 |
- YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); |
20395 |
- } |
20396 |
- |
20397 |
- /* If the proper action on seeing token YYTOKEN is to reduce or to |
20398 |
- detect an error, take that action. */ |
20399 |
- yyn += yytoken; |
20400 |
- if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) |
20401 |
- goto yydefault; |
20402 |
- yyn = yytable[yyn]; |
20403 |
- if (yyn <= 0) |
20404 |
- { |
20405 |
- if (yytable_value_is_error (yyn)) |
20406 |
- goto yyerrlab; |
20407 |
- yyn = -yyn; |
20408 |
- goto yyreduce; |
20409 |
- } |
20410 |
- |
20411 |
- /* Count tokens shifted since error; after three, turn off error |
20412 |
- status. */ |
20413 |
- if (yyerrstatus) |
20414 |
- yyerrstatus--; |
20415 |
- |
20416 |
- /* Shift the lookahead token. */ |
20417 |
- YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); |
20418 |
- |
20419 |
- /* Discard the shifted token. */ |
20420 |
- yychar = YYEMPTY; |
20421 |
- |
20422 |
- yystate = yyn; |
20423 |
- YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
20424 |
- *++yyvsp = yylval; |
20425 |
- YY_IGNORE_MAYBE_UNINITIALIZED_END |
20426 |
- *++yylsp = yylloc; |
20427 |
- goto yynewstate; |
20428 |
- |
20429 |
- |
20430 |
-/*-----------------------------------------------------------. |
20431 |
-| yydefault -- do the default action for the current state. | |
20432 |
-`-----------------------------------------------------------*/ |
20433 |
-yydefault: |
20434 |
- yyn = yydefact[yystate]; |
20435 |
- if (yyn == 0) |
20436 |
- goto yyerrlab; |
20437 |
- goto yyreduce; |
20438 |
- |
20439 |
- |
20440 |
-/*-----------------------------. |
20441 |
-| yyreduce -- do a reduction. | |
20442 |
-`-----------------------------*/ |
20443 |
-yyreduce: |
20444 |
- /* yyn is the number of a rule to reduce with. */ |
20445 |
- yylen = yyr2[yyn]; |
20446 |
- |
20447 |
- /* If YYLEN is nonzero, implement the default value of the action: |
20448 |
- '$$ = $1'. |
20449 |
- |
20450 |
- Otherwise, the following line sets YYVAL to garbage. |
20451 |
- This behavior is undocumented and Bison |
20452 |
- users should not rely upon it. Assigning to YYVAL |
20453 |
- unconditionally makes the parser a bit smaller, and it avoids a |
20454 |
- GCC warning that YYVAL may be used uninitialized. */ |
20455 |
- yyval = yyvsp[1-yylen]; |
20456 |
- |
20457 |
- /* Default location. */ |
20458 |
- YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen); |
20459 |
- yyerror_range[1] = yyloc; |
20460 |
- YY_REDUCE_PRINT (yyn); |
20461 |
- switch (yyn) |
20462 |
- { |
20463 |
- case 4: |
20464 |
-#line 461 "vm_var_syntax.y" |
20465 |
- { |
20466 |
- (*parsed) << (yyvsp[0].val_str); |
20467 |
- } |
20468 |
-#line 1762 "vm_var_syntax.cc" |
20469 |
- break; |
20470 |
- |
20471 |
- case 5: |
20472 |
-#line 465 "vm_var_syntax.y" |
20473 |
- { |
20474 |
- string name((yyvsp[-1].val_str)); |
20475 |
- |
20476 |
- one_util::toupper(name); |
20477 |
- |
20478 |
- insert_single(vm,*parsed,name); |
20479 |
- |
20480 |
- if ( (yyvsp[0].val_char) != '\0' ) |
20481 |
- { |
20482 |
- (*parsed) << (yyvsp[0].val_char); |
20483 |
- } |
20484 |
- } |
20485 |
-#line 1779 "vm_var_syntax.cc" |
20486 |
- break; |
20487 |
- |
20488 |
- case 6: |
20489 |
-#line 478 "vm_var_syntax.y" |
20490 |
- { |
20491 |
- string name((yyvsp[-4].val_str)); |
20492 |
- string vname((yyvsp[-2].val_str)); |
20493 |
- |
20494 |
- one_util::toupper(name); |
20495 |
- one_util::toupper(vname); |
20496 |
- |
20497 |
- insert_vector(vm,*parsed,name,vname,"",""); |
20498 |
- |
20499 |
- if ( (yyvsp[0].val_char) != '\0' ) |
20500 |
- { |
20501 |
- (*parsed) << (yyvsp[0].val_char); |
20502 |
- } |
20503 |
- } |
20504 |
-#line 1798 "vm_var_syntax.cc" |
20505 |
- break; |
20506 |
- |
20507 |
- case 7: |
20508 |
-#line 493 "vm_var_syntax.y" |
20509 |
- { |
20510 |
- string name((yyvsp[-8].val_str)); |
20511 |
- string vname((yyvsp[-6].val_str)); |
20512 |
- string vvar((yyvsp[-4].val_str)); |
20513 |
- string vval((yyvsp[-2].val_str)); |
20514 |
- |
20515 |
- one_util::toupper(name); |
20516 |
- one_util::toupper(vname); |
20517 |
- one_util::toupper(vvar); |
20518 |
- |
20519 |
- insert_vector(vm,*parsed,name,vname,vvar,vval); |
20520 |
- |
20521 |
- if ( (yyvsp[0].val_char) != '\0' ) |
20522 |
- { |
20523 |
- (*parsed) << (yyvsp[0].val_char); |
20524 |
- } |
20525 |
- } |
20526 |
-#line 1820 "vm_var_syntax.cc" |
20527 |
- break; |
20528 |
- |
20529 |
- |
20530 |
-#line 1824 "vm_var_syntax.cc" |
20531 |
- |
20532 |
- default: break; |
20533 |
- } |
20534 |
- /* User semantic actions sometimes alter yychar, and that requires |
20535 |
- that yytoken be updated with the new translation. We take the |
20536 |
- approach of translating immediately before every use of yytoken. |
20537 |
- One alternative is translating here after every semantic action, |
20538 |
- but that translation would be missed if the semantic action invokes |
20539 |
- YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or |
20540 |
- if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an |
20541 |
- incorrect destructor might then be invoked immediately. In the |
20542 |
- case of YYERROR or YYBACKUP, subsequent parser actions might lead |
20543 |
- to an incorrect destructor call or verbose syntax error message |
20544 |
- before the lookahead is translated. */ |
20545 |
- YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); |
20546 |
- |
20547 |
- YYPOPSTACK (yylen); |
20548 |
- yylen = 0; |
20549 |
- YY_STACK_PRINT (yyss, yyssp); |
20550 |
- |
20551 |
- *++yyvsp = yyval; |
20552 |
- *++yylsp = yyloc; |
20553 |
- |
20554 |
- /* Now 'shift' the result of the reduction. Determine what state |
20555 |
- that goes to, based on the state we popped back to and the rule |
20556 |
- number reduced by. */ |
20557 |
- { |
20558 |
- const int yylhs = yyr1[yyn] - YYNTOKENS; |
20559 |
- const int yyi = yypgoto[yylhs] + *yyssp; |
20560 |
- yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp |
20561 |
- ? yytable[yyi] |
20562 |
- : yydefgoto[yylhs]); |
20563 |
- } |
20564 |
- |
20565 |
- goto yynewstate; |
20566 |
- |
20567 |
- |
20568 |
-/*--------------------------------------. |
20569 |
-| yyerrlab -- here on detecting error. | |
20570 |
-`--------------------------------------*/ |
20571 |
-yyerrlab: |
20572 |
- /* Make sure we have latest lookahead translation. See comments at |
20573 |
- user semantic actions for why this is necessary. */ |
20574 |
- yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); |
20575 |
- |
20576 |
- /* If not already recovering from an error, report this error. */ |
20577 |
- if (!yyerrstatus) |
20578 |
- { |
20579 |
- ++yynerrs; |
20580 |
-#if ! YYERROR_VERBOSE |
20581 |
- yyerror (&yylloc, mc, vm, parsed, errmsg, scanner, YY_("syntax error")); |
20582 |
-#else |
20583 |
-# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ |
20584 |
- yyssp, yytoken) |
20585 |
- { |
20586 |
- char const *yymsgp = YY_("syntax error"); |
20587 |
- int yysyntax_error_status; |
20588 |
- yysyntax_error_status = YYSYNTAX_ERROR; |
20589 |
- if (yysyntax_error_status == 0) |
20590 |
- yymsgp = yymsg; |
20591 |
- else if (yysyntax_error_status == 1) |
20592 |
- { |
20593 |
- if (yymsg != yymsgbuf) |
20594 |
- YYSTACK_FREE (yymsg); |
20595 |
- yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); |
20596 |
- if (!yymsg) |
20597 |
- { |
20598 |
- yymsg = yymsgbuf; |
20599 |
- yymsg_alloc = sizeof yymsgbuf; |
20600 |
- yysyntax_error_status = 2; |
20601 |
- } |
20602 |
- else |
20603 |
- { |
20604 |
- yysyntax_error_status = YYSYNTAX_ERROR; |
20605 |
- yymsgp = yymsg; |
20606 |
- } |
20607 |
- } |
20608 |
- yyerror (&yylloc, mc, vm, parsed, errmsg, scanner, yymsgp); |
20609 |
- if (yysyntax_error_status == 2) |
20610 |
- goto yyexhaustedlab; |
20611 |
- } |
20612 |
-# undef YYSYNTAX_ERROR |
20613 |
-#endif |
20614 |
- } |
20615 |
- |
20616 |
- yyerror_range[1] = yylloc; |
20617 |
- |
20618 |
- if (yyerrstatus == 3) |
20619 |
- { |
20620 |
- /* If just tried and failed to reuse lookahead token after an |
20621 |
- error, discard it. */ |
20622 |
- |
20623 |
- if (yychar <= YYEOF) |
20624 |
- { |
20625 |
- /* Return failure if at end of input. */ |
20626 |
- if (yychar == YYEOF) |
20627 |
- YYABORT; |
20628 |
- } |
20629 |
- else |
20630 |
- { |
20631 |
- yydestruct ("Error: discarding", |
20632 |
- yytoken, &yylval, &yylloc, mc, vm, parsed, errmsg, scanner); |
20633 |
- yychar = YYEMPTY; |
20634 |
- } |
20635 |
- } |
20636 |
- |
20637 |
- /* Else will try to reuse lookahead token after shifting the error |
20638 |
- token. */ |
20639 |
- goto yyerrlab1; |
20640 |
- |
20641 |
- |
20642 |
-/*---------------------------------------------------. |
20643 |
-| yyerrorlab -- error raised explicitly by YYERROR. | |
20644 |
-`---------------------------------------------------*/ |
20645 |
-yyerrorlab: |
20646 |
- /* Pacify compilers when the user code never invokes YYERROR and the |
20647 |
- label yyerrorlab therefore never appears in user code. */ |
20648 |
- if (0) |
20649 |
- YYERROR; |
20650 |
- |
20651 |
- /* Do not reclaim the symbols of the rule whose action triggered |
20652 |
- this YYERROR. */ |
20653 |
- YYPOPSTACK (yylen); |
20654 |
- yylen = 0; |
20655 |
- YY_STACK_PRINT (yyss, yyssp); |
20656 |
- yystate = *yyssp; |
20657 |
- goto yyerrlab1; |
20658 |
- |
20659 |
- |
20660 |
-/*-------------------------------------------------------------. |
20661 |
-| yyerrlab1 -- common code for both syntax error and YYERROR. | |
20662 |
-`-------------------------------------------------------------*/ |
20663 |
-yyerrlab1: |
20664 |
- yyerrstatus = 3; /* Each real token shifted decrements this. */ |
20665 |
- |
20666 |
- for (;;) |
20667 |
- { |
20668 |
- yyn = yypact[yystate]; |
20669 |
- if (!yypact_value_is_default (yyn)) |
20670 |
- { |
20671 |
- yyn += YYTERROR; |
20672 |
- if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) |
20673 |
- { |
20674 |
- yyn = yytable[yyn]; |
20675 |
- if (0 < yyn) |
20676 |
- break; |
20677 |
- } |
20678 |
- } |
20679 |
- |
20680 |
- /* Pop the current state because it cannot handle the error token. */ |
20681 |
- if (yyssp == yyss) |
20682 |
- YYABORT; |
20683 |
- |
20684 |
- yyerror_range[1] = *yylsp; |
20685 |
- yydestruct ("Error: popping", |
20686 |
- yystos[yystate], yyvsp, yylsp, mc, vm, parsed, errmsg, scanner); |
20687 |
- YYPOPSTACK (1); |
20688 |
- yystate = *yyssp; |
20689 |
- YY_STACK_PRINT (yyss, yyssp); |
20690 |
- } |
20691 |
- |
20692 |
- YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
20693 |
- *++yyvsp = yylval; |
20694 |
- YY_IGNORE_MAYBE_UNINITIALIZED_END |
20695 |
- |
20696 |
- yyerror_range[2] = yylloc; |
20697 |
- /* Using YYLLOC is tempting, but would change the location of |
20698 |
- the lookahead. YYLOC is available though. */ |
20699 |
- YYLLOC_DEFAULT (yyloc, yyerror_range, 2); |
20700 |
- *++yylsp = yyloc; |
20701 |
- |
20702 |
- /* Shift the error token. */ |
20703 |
- YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); |
20704 |
- |
20705 |
- yystate = yyn; |
20706 |
- goto yynewstate; |
20707 |
- |
20708 |
- |
20709 |
-/*-------------------------------------. |
20710 |
-| yyacceptlab -- YYACCEPT comes here. | |
20711 |
-`-------------------------------------*/ |
20712 |
-yyacceptlab: |
20713 |
- yyresult = 0; |
20714 |
- goto yyreturn; |
20715 |
- |
20716 |
- |
20717 |
-/*-----------------------------------. |
20718 |
-| yyabortlab -- YYABORT comes here. | |
20719 |
-`-----------------------------------*/ |
20720 |
-yyabortlab: |
20721 |
- yyresult = 1; |
20722 |
- goto yyreturn; |
20723 |
- |
20724 |
- |
20725 |
-#if !defined yyoverflow || YYERROR_VERBOSE |
20726 |
-/*-------------------------------------------------. |
20727 |
-| yyexhaustedlab -- memory exhaustion comes here. | |
20728 |
-`-------------------------------------------------*/ |
20729 |
-yyexhaustedlab: |
20730 |
- yyerror (&yylloc, mc, vm, parsed, errmsg, scanner, YY_("memory exhausted")); |
20731 |
- yyresult = 2; |
20732 |
- /* Fall through. */ |
20733 |
-#endif |
20734 |
- |
20735 |
- |
20736 |
-/*-----------------------------------------------------. |
20737 |
-| yyreturn -- parsing is finished, return the result. | |
20738 |
-`-----------------------------------------------------*/ |
20739 |
-yyreturn: |
20740 |
- if (yychar != YYEMPTY) |
20741 |
- { |
20742 |
- /* Make sure we have latest lookahead translation. See comments at |
20743 |
- user semantic actions for why this is necessary. */ |
20744 |
- yytoken = YYTRANSLATE (yychar); |
20745 |
- yydestruct ("Cleanup: discarding lookahead", |
20746 |
- yytoken, &yylval, &yylloc, mc, vm, parsed, errmsg, scanner); |
20747 |
- } |
20748 |
- /* Do not reclaim the symbols of the rule whose action triggered |
20749 |
- this YYABORT or YYACCEPT. */ |
20750 |
- YYPOPSTACK (yylen); |
20751 |
- YY_STACK_PRINT (yyss, yyssp); |
20752 |
- while (yyssp != yyss) |
20753 |
- { |
20754 |
- yydestruct ("Cleanup: popping", |
20755 |
- yystos[*yyssp], yyvsp, yylsp, mc, vm, parsed, errmsg, scanner); |
20756 |
- YYPOPSTACK (1); |
20757 |
- } |
20758 |
-#ifndef yyoverflow |
20759 |
- if (yyss != yyssa) |
20760 |
- YYSTACK_FREE (yyss); |
20761 |
-#endif |
20762 |
-#if YYERROR_VERBOSE |
20763 |
- if (yymsg != yymsgbuf) |
20764 |
- YYSTACK_FREE (yymsg); |
20765 |
-#endif |
20766 |
- return yyresult; |
20767 |
-} |
20768 |
-#line 511 "vm_var_syntax.y" |
20769 |
- |
20770 |
- |
20771 |
-void vm_var_error( |
20772 |
- YYLTYPE * llocp, |
20773 |
- mem_collector * mc, |
20774 |
- VirtualMachine * vm, |
20775 |
- ostringstream * parsed, |
20776 |
- char ** error_msg, |
20777 |
- yyscan_t scanner, |
20778 |
- const char * str) |
20779 |
-{ |
20780 |
- int length; |
20781 |
- |
20782 |
- length = strlen(str)+ 64; |
20783 |
- |
20784 |
- *error_msg = (char *) malloc(sizeof(char)*length); |
20785 |
- |
20786 |
- if (*error_msg != 0) |
20787 |
- { |
20788 |
- snprintf(*error_msg, |
20789 |
- length, |
20790 |
- "%s at line %i, columns %i:%i", |
20791 |
- str, |
20792 |
- llocp->first_line, |
20793 |
- llocp->first_column, |
20794 |
- llocp->last_column); |
20795 |
- } |
20796 |
-} |
20797 |
|
20798 |
diff --git a/app-emulation/opennebula/files/opennebula-5.10.1/parsers/vm_var_syntax.h b/app-emulation/opennebula/files/opennebula-5.10.1/parsers/vm_var_syntax.h |
20799 |
deleted file mode 100644 |
20800 |
index 694f8e5..0000000 |
20801 |
--- a/app-emulation/opennebula/files/opennebula-5.10.1/parsers/vm_var_syntax.h |
20802 |
+++ /dev/null |
20803 |
@@ -1,124 +0,0 @@ |
20804 |
-/* A Bison parser, made by GNU Bison 3.4.1. */ |
20805 |
- |
20806 |
-/* Bison interface for Yacc-like parsers in C |
20807 |
- |
20808 |
- Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2019 Free Software Foundation, |
20809 |
- Inc. |
20810 |
- |
20811 |
- This program is free software: you can redistribute it and/or modify |
20812 |
- it under the terms of the GNU General Public License as published by |
20813 |
- the Free Software Foundation, either version 3 of the License, or |
20814 |
- (at your option) any later version. |
20815 |
- |
20816 |
- This program is distributed in the hope that it will be useful, |
20817 |
- but WITHOUT ANY WARRANTY; without even the implied warranty of |
20818 |
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
20819 |
- GNU General Public License for more details. |
20820 |
- |
20821 |
- You should have received a copy of the GNU General Public License |
20822 |
- along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
20823 |
- |
20824 |
-/* As a special exception, you may create a larger work that contains |
20825 |
- part or all of the Bison parser skeleton and distribute that work |
20826 |
- under terms of your choice, so long as that work isn't itself a |
20827 |
- parser generator using the skeleton or a modified version thereof |
20828 |
- as a parser skeleton. Alternatively, if you modify or redistribute |
20829 |
- the parser skeleton itself, you may (at your option) remove this |
20830 |
- special exception, which will cause the skeleton and the resulting |
20831 |
- Bison output files to be licensed under the GNU General Public |
20832 |
- License without this special exception. |
20833 |
- |
20834 |
- This special exception was added by the Free Software Foundation in |
20835 |
- version 2.2 of Bison. */ |
20836 |
- |
20837 |
-/* Undocumented macros, especially those whose name start with YY_, |
20838 |
- are private implementation details. Do not rely on them. */ |
20839 |
- |
20840 |
-#ifndef YY_VM_VAR_VM_VAR_SYNTAX_HH_INCLUDED |
20841 |
-# define YY_VM_VAR_VM_VAR_SYNTAX_HH_INCLUDED |
20842 |
-/* Debug traces. */ |
20843 |
-#ifndef YYDEBUG |
20844 |
-# define YYDEBUG 0 |
20845 |
-#endif |
20846 |
-#if YYDEBUG |
20847 |
-extern int vm_var_debug; |
20848 |
-#endif |
20849 |
-/* "%code requires" blocks. */ |
20850 |
-#line 17 "vm_var_syntax.y" |
20851 |
- |
20852 |
-#include <iostream> |
20853 |
-#include <sstream> |
20854 |
-#include <string> |
20855 |
-#include <map> |
20856 |
-#include <algorithm> |
20857 |
- |
20858 |
-#include <ctype.h> |
20859 |
-#include <string.h> |
20860 |
- |
20861 |
-#include "VirtualMachinePool.h" |
20862 |
-#include "VirtualMachine.h" |
20863 |
-#include "Nebula.h" |
20864 |
- |
20865 |
-#include "mem_collector.h" |
20866 |
- |
20867 |
-typedef void * yyscan_t; |
20868 |
- |
20869 |
-int vm_var_parse (VirtualMachine * vm, ostringstream * parsed, char ** errmsg, |
20870 |
- yyscan_t scanner); |
20871 |
- |
20872 |
-#line 70 "vm_var_syntax.hh" |
20873 |
- |
20874 |
-/* Token type. */ |
20875 |
-#ifndef YYTOKENTYPE |
20876 |
-# define YYTOKENTYPE |
20877 |
- enum yytokentype |
20878 |
- { |
20879 |
- EQUAL = 258, |
20880 |
- COMMA = 259, |
20881 |
- OBRACKET = 260, |
20882 |
- CBRACKET = 261, |
20883 |
- EOA = 262, |
20884 |
- STRING = 263, |
20885 |
- VARIABLE = 264, |
20886 |
- RSTRING = 265, |
20887 |
- INTEGER = 266 |
20888 |
- }; |
20889 |
-#endif |
20890 |
- |
20891 |
-/* Value type. */ |
20892 |
-#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED |
20893 |
-union YYSTYPE |
20894 |
-{ |
20895 |
-#line 432 "vm_var_syntax.y" |
20896 |
- |
20897 |
- char * val_str; |
20898 |
- int val_int; |
20899 |
- char val_char; |
20900 |
- |
20901 |
-#line 99 "vm_var_syntax.hh" |
20902 |
- |
20903 |
-}; |
20904 |
-typedef union YYSTYPE YYSTYPE; |
20905 |
-# define YYSTYPE_IS_TRIVIAL 1 |
20906 |
-# define YYSTYPE_IS_DECLARED 1 |
20907 |
-#endif |
20908 |
- |
20909 |
-/* Location type. */ |
20910 |
-#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED |
20911 |
-typedef struct YYLTYPE YYLTYPE; |
20912 |
-struct YYLTYPE |
20913 |
-{ |
20914 |
- int first_line; |
20915 |
- int first_column; |
20916 |
- int last_line; |
20917 |
- int last_column; |
20918 |
-}; |
20919 |
-# define YYLTYPE_IS_DECLARED 1 |
20920 |
-# define YYLTYPE_IS_TRIVIAL 1 |
20921 |
-#endif |
20922 |
- |
20923 |
- |
20924 |
- |
20925 |
-int vm_var_parse (mem_collector * mc, VirtualMachine * vm, ostringstream * parsed, char ** errmsg, yyscan_t scanner); |
20926 |
- |
20927 |
-#endif /* !YY_VM_VAR_VM_VAR_SYNTAX_HH_INCLUDED */ |
20928 |
|
20929 |
diff --git a/app-emulation/opennebula/files/opennebula-5.10.1/parsers/vm_var_syntax.y b/app-emulation/opennebula/files/opennebula-5.10.1/parsers/vm_var_syntax.y |
20930 |
deleted file mode 100644 |
20931 |
index 243f3ce..0000000 |
20932 |
--- a/app-emulation/opennebula/files/opennebula-5.10.1/parsers/vm_var_syntax.y |
20933 |
+++ /dev/null |
20934 |
@@ -1,538 +0,0 @@ |
20935 |
-/* -------------------------------------------------------------------------- */ |
20936 |
-/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */ |
20937 |
-/* */ |
20938 |
-/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ |
20939 |
-/* not use this file except in compliance with the License. You may obtain */ |
20940 |
-/* a copy of the License at */ |
20941 |
-/* */ |
20942 |
-/* http://www.apache.org/licenses/LICENSE-2.0 */ |
20943 |
-/* */ |
20944 |
-/* Unless required by applicable law or agreed to in writing, software */ |
20945 |
-/* distributed under the License is distributed on an "AS IS" BASIS, */ |
20946 |
-/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ |
20947 |
-/* See the License for the specific language governing permissions and */ |
20948 |
-/* limitations under the License. */ |
20949 |
-/* -------------------------------------------------------------------------- */ |
20950 |
- |
20951 |
-%code requires { |
20952 |
-#include <iostream> |
20953 |
-#include <sstream> |
20954 |
-#include <string> |
20955 |
-#include <map> |
20956 |
-#include <algorithm> |
20957 |
- |
20958 |
-#include <ctype.h> |
20959 |
-#include <string.h> |
20960 |
- |
20961 |
-#include "VirtualMachinePool.h" |
20962 |
-#include "VirtualMachine.h" |
20963 |
-#include "Nebula.h" |
20964 |
- |
20965 |
-#include "mem_collector.h" |
20966 |
- |
20967 |
-typedef void * yyscan_t; |
20968 |
- |
20969 |
-int vm_var_parse (VirtualMachine * vm, ostringstream * parsed, char ** errmsg, |
20970 |
- yyscan_t scanner); |
20971 |
-} |
20972 |
- |
20973 |
-%{ |
20974 |
-#include "vm_var_syntax.h" |
20975 |
-#include "vm_var_parser.h" |
20976 |
- |
20977 |
-#include "NebulaUtil.h" |
20978 |
- |
20979 |
-#define YYERROR_VERBOSE |
20980 |
- |
20981 |
-void vm_var_error(YYLTYPE * llocp, mem_collector * mc, VirtualMachine * vm, |
20982 |
- ostringstream * parsed, char ** errmsg, yyscan_t scanner, const char * str); |
20983 |
- |
20984 |
-int vm_var_lex(YYSTYPE *lvalp, YYLTYPE *llocp, mem_collector * mc, |
20985 |
- yyscan_t scanner); |
20986 |
- |
20987 |
-int vm_var_parse (VirtualMachine * vm, ostringstream * parsed, char ** errmsg, |
20988 |
- yyscan_t scanner) |
20989 |
-{ |
20990 |
- mem_collector mc; |
20991 |
- int rc; |
20992 |
- |
20993 |
- mem_collector_init(&mc); |
20994 |
- |
20995 |
- rc = vm_var_parse(&mc, vm, parsed, errmsg, scanner); |
20996 |
- |
20997 |
- mem_collector_cleanup(&mc); |
20998 |
- |
20999 |
- return rc; |
21000 |
-} |
21001 |
- |
21002 |
-/* -------------------------------------------------------------------------- */ |
21003 |
-/* -------------------------------------------------------------------------- */ |
21004 |
- |
21005 |
-void get_image_attribute(VirtualMachine * vm, |
21006 |
- const string& attr_name, |
21007 |
- const string& img_name, |
21008 |
- const string& img_value, |
21009 |
- string& attr_value) |
21010 |
-{ |
21011 |
- Nebula& nd = Nebula::instance(); |
21012 |
- |
21013 |
- ImagePool * ipool = nd.get_ipool(); |
21014 |
- Image * img; |
21015 |
- int iid = -1; |
21016 |
- |
21017 |
- int num; |
21018 |
- vector<const VectorAttribute *> disks; |
21019 |
- |
21020 |
- attr_value.clear(); |
21021 |
- |
21022 |
- if ( img_name.empty() || (img_name!="IMAGE" && img_name!="IMAGE_ID") ) |
21023 |
- { |
21024 |
- return; |
21025 |
- } |
21026 |
- |
21027 |
- // ---------------------------------------------- |
21028 |
- // Check that the image is in the template, so |
21029 |
- // are sure that we can access the image template |
21030 |
- // ---------------------------------------------- |
21031 |
- num = vm->get_template_attribute("DISK", disks); |
21032 |
- |
21033 |
- for (int i=0; i < num ;i++) |
21034 |
- { |
21035 |
- if ( disks[i]->vector_value(img_name) == img_value ) |
21036 |
- { |
21037 |
- string iid_str = disks[i]->vector_value("IMAGE_ID"); |
21038 |
- istringstream iss(iid_str); |
21039 |
- |
21040 |
- iss >> iid; |
21041 |
- |
21042 |
- if (iss.fail()) |
21043 |
- { |
21044 |
- iid = -1; |
21045 |
- } |
21046 |
- |
21047 |
- break; |
21048 |
- } |
21049 |
- } |
21050 |
- |
21051 |
- if (iid == -1) |
21052 |
- { |
21053 |
- return; |
21054 |
- } |
21055 |
- |
21056 |
- // ---------------------------------------------- |
21057 |
- // Get the attribute template from the image |
21058 |
- // ---------------------------------------------- |
21059 |
- img = ipool->get_ro(iid); |
21060 |
- |
21061 |
- if ( img == 0 ) |
21062 |
- { |
21063 |
- return; |
21064 |
- } |
21065 |
- |
21066 |
- if (attr_name == "TEMPLATE") |
21067 |
- { |
21068 |
- attr_value = img->to_xml64(attr_value); |
21069 |
- } |
21070 |
- else |
21071 |
- { |
21072 |
- img->get_template_attribute(attr_name, attr_value); |
21073 |
- } |
21074 |
- |
21075 |
- img->unlock(); |
21076 |
-} |
21077 |
- |
21078 |
-/* -------------------------------------------------------------------------- */ |
21079 |
-/* -------------------------------------------------------------------------- */ |
21080 |
- |
21081 |
-void get_network_attribute(VirtualMachine * vm, |
21082 |
- const string& attr_name, |
21083 |
- const string& net_name, |
21084 |
- const string& net_value, |
21085 |
- string& attr_value) |
21086 |
-{ |
21087 |
- Nebula& nd = Nebula::instance(); |
21088 |
- |
21089 |
- VirtualNetworkPool * vnpool = nd.get_vnpool(); |
21090 |
- VirtualNetwork * vn; |
21091 |
- int ar_id, vnet_id = -1; |
21092 |
- |
21093 |
- int num; |
21094 |
- vector<const VectorAttribute *> nets; |
21095 |
- |
21096 |
- attr_value.clear(); |
21097 |
- |
21098 |
- if ( net_name.empty() || |
21099 |
- (net_name!="NETWORK" && net_name!="NETWORK_ID" && net_name!="NIC_ID")) |
21100 |
- { |
21101 |
- return; |
21102 |
- } |
21103 |
- |
21104 |
- // ---------------------------------------------- |
21105 |
- // Check that the network is in the template, so |
21106 |
- // are sure that we can access its template |
21107 |
- // ---------------------------------------------- |
21108 |
- num = vm->get_template_attribute("NIC", nets); |
21109 |
- |
21110 |
- for (int i=0; i < num ;i++) |
21111 |
- { |
21112 |
- if ( nets[i]->vector_value(net_name) == net_value ) |
21113 |
- { |
21114 |
- if (nets[i]->vector_value("NETWORK_ID", vnet_id) != 0) |
21115 |
- { |
21116 |
- vnet_id = -1; |
21117 |
- } |
21118 |
- |
21119 |
- if (nets[i]->vector_value("AR_ID", ar_id) != 0) |
21120 |
- { |
21121 |
- vnet_id = -1; |
21122 |
- } |
21123 |
- |
21124 |
- break; |
21125 |
- } |
21126 |
- } |
21127 |
- |
21128 |
- vector<const VectorAttribute *> alias; |
21129 |
- int alias_num = vm->get_template_attribute("NIC_ALIAS", alias); |
21130 |
- |
21131 |
- if (vnet_id == -1 && alias_num == 0) |
21132 |
- { |
21133 |
- return; |
21134 |
- } |
21135 |
- else |
21136 |
- { |
21137 |
- for (int i=0; i < alias_num ;i++) |
21138 |
- { |
21139 |
- if ( alias[i]->vector_value(net_name.c_str()) == net_value ) |
21140 |
- { |
21141 |
- if (alias[i]->vector_value("NETWORK_ID", vnet_id) != 0) |
21142 |
- { |
21143 |
- vnet_id = -1; |
21144 |
- } |
21145 |
- |
21146 |
- if (alias[i]->vector_value("AR_ID", ar_id) != 0) |
21147 |
- { |
21148 |
- vnet_id = -1; |
21149 |
- } |
21150 |
- |
21151 |
- break; |
21152 |
- } |
21153 |
- } |
21154 |
- |
21155 |
- if (vnet_id == -1) |
21156 |
- { |
21157 |
- return; |
21158 |
- } |
21159 |
- } |
21160 |
- |
21161 |
- // ---------------------------------------------- |
21162 |
- // Get the attribute template from the image |
21163 |
- // ---------------------------------------------- |
21164 |
- vn = vnpool->get_ro(vnet_id); |
21165 |
- |
21166 |
- if ( vn == 0 ) |
21167 |
- { |
21168 |
- return; |
21169 |
- } |
21170 |
- |
21171 |
- if (attr_name == "TEMPLATE") |
21172 |
- { |
21173 |
- attr_value = vn->to_xml64(attr_value); |
21174 |
- } |
21175 |
- else |
21176 |
- { |
21177 |
- vn->get_template_attribute(attr_name, attr_value, ar_id); |
21178 |
- } |
21179 |
- |
21180 |
- vn->unlock(); |
21181 |
-} |
21182 |
- |
21183 |
-/* -------------------------------------------------------------------------- */ |
21184 |
-/* -------------------------------------------------------------------------- */ |
21185 |
- |
21186 |
-void get_user_attribute(VirtualMachine * vm, |
21187 |
- const string& attr_name, |
21188 |
- string& attr_value) |
21189 |
-{ |
21190 |
- Nebula& nd = Nebula::instance(); |
21191 |
- |
21192 |
- UserPool * upool = nd.get_upool(); |
21193 |
- User * user; |
21194 |
- |
21195 |
- attr_value.clear(); |
21196 |
- |
21197 |
- user = upool->get_ro(vm->get_uid()); |
21198 |
- |
21199 |
- if ( user == 0 ) |
21200 |
- { |
21201 |
- return; |
21202 |
- } |
21203 |
- |
21204 |
- if (attr_name == "TEMPLATE") |
21205 |
- { |
21206 |
- attr_value = user->to_xml64(attr_value); |
21207 |
- } |
21208 |
- else |
21209 |
- { |
21210 |
- user->get_template_attribute(attr_name, attr_value); |
21211 |
- } |
21212 |
- |
21213 |
- user->unlock(); |
21214 |
-} |
21215 |
- |
21216 |
-/* -------------------------------------------------------------------------- */ |
21217 |
-/* -------------------------------------------------------------------------- */ |
21218 |
- |
21219 |
-void insert_single(VirtualMachine * vm, |
21220 |
- ostringstream& parsed, |
21221 |
- const string& name) |
21222 |
-{ |
21223 |
- string value = ""; |
21224 |
- |
21225 |
- if (name == "TEMPLATE") |
21226 |
- { |
21227 |
- vm->to_xml64(value); |
21228 |
- } |
21229 |
- else if (name == "UID") |
21230 |
- { |
21231 |
- parsed << vm->get_uid(); |
21232 |
- } |
21233 |
- else if (name == "UNAME") |
21234 |
- { |
21235 |
- parsed << vm->get_uname(); |
21236 |
- } |
21237 |
- else if (name == "GID") |
21238 |
- { |
21239 |
- parsed << vm->get_gid(); |
21240 |
- } |
21241 |
- else if (name == "GNAME") |
21242 |
- { |
21243 |
- parsed << vm->get_gname(); |
21244 |
- } |
21245 |
- else if (name == "NAME") |
21246 |
- { |
21247 |
- |
21248 |
- parsed << vm->get_name(); |
21249 |
- } |
21250 |
- else |
21251 |
- { |
21252 |
- |
21253 |
- vm->get_template_attribute(name, value); |
21254 |
- |
21255 |
- if (value.empty()) |
21256 |
- { |
21257 |
- vm->get_user_template_attribute(name, value); |
21258 |
- } |
21259 |
- } |
21260 |
- |
21261 |
- if (!value.empty()) |
21262 |
- { |
21263 |
- parsed << value; |
21264 |
- } |
21265 |
-} |
21266 |
- |
21267 |
-/* -------------------------------------------------------------------------- */ |
21268 |
-/* -------------------------------------------------------------------------- */ |
21269 |
- |
21270 |
-void insert_vector(VirtualMachine * vm, |
21271 |
- ostringstream& parsed, |
21272 |
- const string& name, |
21273 |
- const string& vname, |
21274 |
- const string& vvar, |
21275 |
- const string& vval) |
21276 |
- |
21277 |
-{ |
21278 |
- vector<const VectorAttribute*> values; |
21279 |
- const VectorAttribute * vattr = 0; |
21280 |
- |
21281 |
- int num; |
21282 |
- |
21283 |
- if (name == "NETWORK") |
21284 |
- { |
21285 |
- string value; |
21286 |
- |
21287 |
- get_network_attribute(vm,vname,vvar,vval,value); |
21288 |
- |
21289 |
- if (!value.empty()) |
21290 |
- { |
21291 |
- parsed << value; |
21292 |
- } |
21293 |
- |
21294 |
- return; |
21295 |
- } |
21296 |
- else if (name == "IMAGE") |
21297 |
- { |
21298 |
- string value; |
21299 |
- |
21300 |
- get_image_attribute(vm,vname,vvar,vval,value); |
21301 |
- |
21302 |
- if (!value.empty()) |
21303 |
- { |
21304 |
- parsed << value; |
21305 |
- } |
21306 |
- |
21307 |
- return; |
21308 |
- } |
21309 |
- else if (name == "USER") |
21310 |
- { |
21311 |
- string value; |
21312 |
- |
21313 |
- get_user_attribute(vm, vname, value); |
21314 |
- |
21315 |
- if (!value.empty()) |
21316 |
- { |
21317 |
- parsed << value; |
21318 |
- } |
21319 |
- |
21320 |
- return; |
21321 |
- } |
21322 |
- else |
21323 |
- { |
21324 |
- if ( ( num = vm->get_template_attribute(name, values) ) <= 0 ) |
21325 |
- { |
21326 |
- return; |
21327 |
- } |
21328 |
- |
21329 |
- if ( vvar.empty() ) |
21330 |
- { |
21331 |
- vattr = values[0]; |
21332 |
- } |
21333 |
- else |
21334 |
- { |
21335 |
- for (int i=0 ; i < num ; i++) |
21336 |
- { |
21337 |
- if (values[i]->vector_value(vvar) == vval) |
21338 |
- { |
21339 |
- vattr = values[i]; |
21340 |
- break; |
21341 |
- } |
21342 |
- } |
21343 |
- } |
21344 |
- |
21345 |
- if ( vattr != 0 ) |
21346 |
- { |
21347 |
- parsed << vattr->vector_value(vname); |
21348 |
- } |
21349 |
- } |
21350 |
-} |
21351 |
- |
21352 |
-/* -------------------------------------------------------------------------- */ |
21353 |
-/* -------------------------------------------------------------------------- */ |
21354 |
- |
21355 |
-%} |
21356 |
- |
21357 |
-%parse-param {mem_collector * mc} |
21358 |
-%parse-param {VirtualMachine * vm} |
21359 |
-%parse-param {ostringstream * parsed} |
21360 |
-%parse-param {char ** errmsg} |
21361 |
-%parse-param {yyscan_t scanner} |
21362 |
- |
21363 |
-%lex-param {mem_collector * mc} |
21364 |
-%lex-param {yyscan_t scanner} |
21365 |
- |
21366 |
-%union { |
21367 |
- char * val_str; |
21368 |
- int val_int; |
21369 |
- char val_char; |
21370 |
-}; |
21371 |
- |
21372 |
-%defines |
21373 |
-%locations |
21374 |
-%pure-parser |
21375 |
-%name-prefix "vm_var_" |
21376 |
-%output "vm_var_syntax.cc" |
21377 |
- |
21378 |
-%token EQUAL COMMA OBRACKET CBRACKET |
21379 |
- |
21380 |
-%token <val_char> EOA |
21381 |
-%token <val_str> STRING |
21382 |
-%token <val_str> VARIABLE |
21383 |
-%token <val_str> RSTRING |
21384 |
-%token <val_int> INTEGER |
21385 |
-%type <void> vm_variable |
21386 |
-%type <void> vm_string |
21387 |
- |
21388 |
-%% |
21389 |
- |
21390 |
-vm_string: vm_variable |
21391 |
- | vm_string vm_variable |
21392 |
- ; |
21393 |
- |
21394 |
-vm_variable:RSTRING |
21395 |
- { |
21396 |
- (*parsed) << $1; |
21397 |
- } |
21398 |
- | VARIABLE EOA |
21399 |
- { |
21400 |
- string name($1); |
21401 |
- |
21402 |
- one_util::toupper(name); |
21403 |
- |
21404 |
- insert_single(vm,*parsed,name); |
21405 |
- |
21406 |
- if ( $2 != '\0' ) |
21407 |
- { |
21408 |
- (*parsed) << $2; |
21409 |
- } |
21410 |
- } |
21411 |
- | VARIABLE OBRACKET VARIABLE CBRACKET EOA |
21412 |
- { |
21413 |
- string name($1); |
21414 |
- string vname($3); |
21415 |
- |
21416 |
- one_util::toupper(name); |
21417 |
- one_util::toupper(vname); |
21418 |
- |
21419 |
- insert_vector(vm,*parsed,name,vname,"",""); |
21420 |
- |
21421 |
- if ( $5 != '\0' ) |
21422 |
- { |
21423 |
- (*parsed) << $5; |
21424 |
- } |
21425 |
- } |
21426 |
- | VARIABLE OBRACKET VARIABLE COMMA VARIABLE EQUAL STRING CBRACKET EOA |
21427 |
- { |
21428 |
- string name($1); |
21429 |
- string vname($3); |
21430 |
- string vvar($5); |
21431 |
- string vval($7); |
21432 |
- |
21433 |
- one_util::toupper(name); |
21434 |
- one_util::toupper(vname); |
21435 |
- one_util::toupper(vvar); |
21436 |
- |
21437 |
- insert_vector(vm,*parsed,name,vname,vvar,vval); |
21438 |
- |
21439 |
- if ( $9 != '\0' ) |
21440 |
- { |
21441 |
- (*parsed) << $9; |
21442 |
- } |
21443 |
- } |
21444 |
- ; |
21445 |
-%% |
21446 |
- |
21447 |
-void vm_var_error( |
21448 |
- YYLTYPE * llocp, |
21449 |
- mem_collector * mc, |
21450 |
- VirtualMachine * vm, |
21451 |
- ostringstream * parsed, |
21452 |
- char ** error_msg, |
21453 |
- yyscan_t scanner, |
21454 |
- const char * str) |
21455 |
-{ |
21456 |
- int length; |
21457 |
- |
21458 |
- length = strlen(str)+ 64; |
21459 |
- |
21460 |
- *error_msg = (char *) malloc(sizeof(char)*length); |
21461 |
- |
21462 |
- if (*error_msg != 0) |
21463 |
- { |
21464 |
- snprintf(*error_msg, |
21465 |
- length, |
21466 |
- "%s at line %i, columns %i:%i", |
21467 |
- str, |
21468 |
- llocp->first_line, |
21469 |
- llocp->first_column, |
21470 |
- llocp->last_column); |
21471 |
- } |
21472 |
-} |
21473 |
|
21474 |
diff --git a/app-emulation/opennebula/files/openrc/99one b/app-emulation/opennebula/files/openrc/99one |
21475 |
deleted file mode 100644 |
21476 |
index 53e21b1..0000000 |
21477 |
--- a/app-emulation/opennebula/files/openrc/99one |
21478 |
+++ /dev/null |
21479 |
@@ -1 +0,0 @@ |
21480 |
-ONE_AUTH="/etc/one/one_auth" |
21481 |
|
21482 |
diff --git a/app-emulation/opennebula/files/openrc/oneflow-server.confd b/app-emulation/opennebula/files/openrc/oneflow-server.confd |
21483 |
deleted file mode 100644 |
21484 |
index 67d6db8..0000000 |
21485 |
--- a/app-emulation/opennebula/files/openrc/oneflow-server.confd |
21486 |
+++ /dev/null |
21487 |
@@ -1,10 +0,0 @@ |
21488 |
- |
21489 |
-# opennebula user |
21490 |
-USER="oneadmin" |
21491 |
-GROUP="oneadmin" |
21492 |
- |
21493 |
-ONEFLOWSERVER_STARTOPTIONS="start" |
21494 |
-ONEFLOWSERVER_STOPOPTIONS="stop" |
21495 |
- |
21496 |
-ONEFLOW_PID="/var/run/one/oneflow.pid" |
21497 |
- |
21498 |
|
21499 |
diff --git a/app-emulation/opennebula/files/openrc/oneflow-server.initd b/app-emulation/opennebula/files/openrc/oneflow-server.initd |
21500 |
deleted file mode 100644 |
21501 |
index 1d62127..0000000 |
21502 |
--- a/app-emulation/opennebula/files/openrc/oneflow-server.initd |
21503 |
+++ /dev/null |
21504 |
@@ -1,34 +0,0 @@ |
21505 |
-#!/sbin/runscript |
21506 |
-# Copyright 1999-2010 Gentoo Foundation |
21507 |
-# Distributed under the terms of the GNU General Public License v2 |
21508 |
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/opennebula/files/opennebula.initd,v 1.1 2010/08/11 16:07:57 dev-zero Exp $ |
21509 |
- |
21510 |
-depend() { |
21511 |
- after mysql |
21512 |
- use libvirtd |
21513 |
-} |
21514 |
- |
21515 |
-start() { |
21516 |
- |
21517 |
- ebegin "Starting Oneflow Server" |
21518 |
- start-stop-daemon \ |
21519 |
- --start \ |
21520 |
- --exec /usr/bin/oneflow-server \ |
21521 |
- --user ${USER}:${GROUP} \ |
21522 |
- --pidfile ${ONEFLOW_PID} \ |
21523 |
- -- ${ONEFLOWSERVER_STARTOPTIONS} |
21524 |
- eend $? |
21525 |
-} |
21526 |
- |
21527 |
-stop() { |
21528 |
- |
21529 |
- ebegin "Stopping Oneflow Server" |
21530 |
- start-stop-daemon \ |
21531 |
- --stop \ |
21532 |
- --exec /usr/bin/oneflow-server \ |
21533 |
- --user ${USER}:${GROUP} \ |
21534 |
- --pidfile ${ONEFLOW_PID} \ |
21535 |
- -- ${ONEFLOWSERVER_STOPOPTIONS} \ |
21536 |
- eend $? |
21537 |
- |
21538 |
-} |
21539 |
|
21540 |
diff --git a/app-emulation/opennebula/files/openrc/opennebula.confd b/app-emulation/opennebula/files/openrc/opennebula.confd |
21541 |
deleted file mode 100644 |
21542 |
index 0a14ca8..0000000 |
21543 |
--- a/app-emulation/opennebula/files/openrc/opennebula.confd |
21544 |
+++ /dev/null |
21545 |
@@ -1,12 +0,0 @@ |
21546 |
- |
21547 |
-# opennebula user |
21548 |
-USER="oneadmin" |
21549 |
-GROUP="oneadmin" |
21550 |
- |
21551 |
-# options for oned |
21552 |
-ONE_STARTOPTIONS="start" |
21553 |
-ONE_STOPOPTIONS="stop" |
21554 |
- |
21555 |
-ONE_PID="/var/run/one/oned.pid" |
21556 |
-SCHED_PID="/var/run/one/sched.pid" |
21557 |
- |
21558 |
|
21559 |
diff --git a/app-emulation/opennebula/files/openrc/opennebula.initd b/app-emulation/opennebula/files/openrc/opennebula.initd |
21560 |
deleted file mode 100644 |
21561 |
index d8ba3d1..0000000 |
21562 |
--- a/app-emulation/opennebula/files/openrc/opennebula.initd |
21563 |
+++ /dev/null |
21564 |
@@ -1,40 +0,0 @@ |
21565 |
-#!/sbin/runscript |
21566 |
-# Copyright 1999-2010 Gentoo Foundation |
21567 |
-# Distributed under the terms of the GNU General Public License v2 |
21568 |
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/opennebula/files/opennebula.initd,v 1.1 2010/08/11 16:07:57 dev-zero Exp $ |
21569 |
- |
21570 |
-depend() { |
21571 |
- after mysql |
21572 |
- use libvirtd |
21573 |
-} |
21574 |
- |
21575 |
-start() { |
21576 |
- ebegin "Starting OpenNebula daemon" |
21577 |
- start-stop-daemon \ |
21578 |
- --start \ |
21579 |
- --exec /usr/bin/one \ |
21580 |
- --user ${USER}:${GROUP} \ |
21581 |
- --pidfile ${ONE_PID} \ |
21582 |
- -- ${ONE_STARTOPTIONS} |
21583 |
- eend $? |
21584 |
- |
21585 |
-} |
21586 |
- |
21587 |
-stop() { |
21588 |
- ebegin "Stopping OpenNebula daemon" |
21589 |
- start-stop-daemon \ |
21590 |
- --stop \ |
21591 |
- --exec /usr/bin/one \ |
21592 |
- --user ${USER}:${GROUP} \ |
21593 |
- --pidfile ${ONE_PID} \ |
21594 |
- -- ${ONE_STOPOPTIONS} |
21595 |
- eend $? |
21596 |
- |
21597 |
- ebegin "Stopping Scheduler Deamon" |
21598 |
- start-stop-daemon \ |
21599 |
- --stop \ |
21600 |
- --exec /usr/bin/mm_sched \ |
21601 |
- --user ${USER}:${GROUP} \ |
21602 |
- --pidfile ${SCHED_PID} \ |
21603 |
- eend $? |
21604 |
-} |
21605 |
|
21606 |
diff --git a/app-emulation/opennebula/files/openrc/sunstone-server.confd b/app-emulation/opennebula/files/openrc/sunstone-server.confd |
21607 |
deleted file mode 100644 |
21608 |
index b073c4a..0000000 |
21609 |
--- a/app-emulation/opennebula/files/openrc/sunstone-server.confd |
21610 |
+++ /dev/null |
21611 |
@@ -1,10 +0,0 @@ |
21612 |
- |
21613 |
-# opennebula user |
21614 |
-USER="oneadmin" |
21615 |
-GROUP="oneadmin" |
21616 |
- |
21617 |
-SUNSTONESERVER_STARTOPTIONS="start" |
21618 |
-SUNSTONESERVER_STOPOPTIONS="stop" |
21619 |
- |
21620 |
-SUNSTONE_PID="/var/run/one/sunstone.pid" |
21621 |
- |
21622 |
|
21623 |
diff --git a/app-emulation/opennebula/files/openrc/sunstone-server.initd b/app-emulation/opennebula/files/openrc/sunstone-server.initd |
21624 |
deleted file mode 100644 |
21625 |
index af2e7a7..0000000 |
21626 |
--- a/app-emulation/opennebula/files/openrc/sunstone-server.initd |
21627 |
+++ /dev/null |
21628 |
@@ -1,34 +0,0 @@ |
21629 |
-#!/sbin/runscript |
21630 |
-# Copyright 1999-2010 Gentoo Foundation |
21631 |
-# Distributed under the terms of the GNU General Public License v2 |
21632 |
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/opennebula/files/opennebula.initd,v 1.1 2010/08/11 16:07:57 dev-zero Exp $ |
21633 |
- |
21634 |
-depend() { |
21635 |
- after mysql |
21636 |
- use libvirtd |
21637 |
-} |
21638 |
- |
21639 |
-start() { |
21640 |
- |
21641 |
- ebegin "Starting Sunstone Server" |
21642 |
- start-stop-daemon \ |
21643 |
- --start \ |
21644 |
- --exec /usr/bin/sunstone-server \ |
21645 |
- --user ${USER}:${GROUP} \ |
21646 |
- --pidfile ${SUNSTONE_PID} \ |
21647 |
- -- ${SUNSTONESERVER_STARTOPTIONS} |
21648 |
- eend $? |
21649 |
-} |
21650 |
- |
21651 |
-stop() { |
21652 |
- |
21653 |
- ebegin "Stopping Sunstone Server" |
21654 |
- start-stop-daemon \ |
21655 |
- --stop \ |
21656 |
- --exec /usr/bin/sunstone-server \ |
21657 |
- --user ${USER}:${GROUP} \ |
21658 |
- --pidfile ${SUNSTONE_PID} \ |
21659 |
- -- ${SUNSTONESERVER_STOPOPTIONS} \ |
21660 |
- eend $? |
21661 |
- |
21662 |
-} |
21663 |
|
21664 |
diff --git a/app-emulation/opennebula/files/patches/fix_kvm_emulator.5.12.0.1.patch b/app-emulation/opennebula/files/patches/fix_kvm_emulator.5.12.0.1.patch |
21665 |
deleted file mode 100644 |
21666 |
index 7b7e4fc..0000000 |
21667 |
--- a/app-emulation/opennebula/files/patches/fix_kvm_emulator.5.12.0.1.patch |
21668 |
+++ /dev/null |
21669 |
@@ -1,11 +0,0 @@ |
21670 |
-diff -Naur a/src/vmm_mad/exec/vmm_exec_kvm.conf b/src/vmm_mad/exec/vmm_exec_kvm.conf |
21671 |
---- a/src/vmm_mad/exec/vmm_exec_kvm.conf 2020-07-14 18:02:27.000000000 +0100 |
21672 |
-+++ b/src/vmm_mad/exec/vmm_exec_kvm.conf 2020-09-20 19:32:44.702940463 +0100 |
21673 |
-@@ -29,6 +29,7 @@ |
21674 |
- # NOTE: raw attribute value is appended to that on the VM template |
21675 |
- |
21676 |
- #EMULATOR = /usr/libexec/qemu-kvm |
21677 |
-+EMULATOR = /usr/bin/qemu-system-x86_64 |
21678 |
- |
21679 |
- #VCPU = 1 |
21680 |
- |
21681 |
|
21682 |
diff --git a/app-emulation/opennebula/files/patches/fix_kvm_emulator.patch b/app-emulation/opennebula/files/patches/fix_kvm_emulator.patch |
21683 |
deleted file mode 100644 |
21684 |
index 1e9511c..0000000 |
21685 |
--- a/app-emulation/opennebula/files/patches/fix_kvm_emulator.patch |
21686 |
+++ /dev/null |
21687 |
@@ -1,12 +0,0 @@ |
21688 |
-Index: src/vmm_mad/exec/vmm_exec_kvm.conf |
21689 |
---- src/vmm_mad/exec/vmm_exec_kvm.conf |
21690 |
-+++ src/vmm_mad/exec/vmm_exec_kvm.conf |
21691 |
-@@ -27,7 +27,7 @@ |
21692 |
- # - hyperv_options: options used for FEATURES = [ HYPERV = yes ] |
21693 |
- # NOTE: raw attribute value is appended to that on the VM template |
21694 |
- |
21695 |
--#EMULATOR = /usr/libexec/qemu-kvm |
21696 |
-+EMULATOR = /usr/bin/qemu-system-x86_64 |
21697 |
- |
21698 |
- #VCPU = 1 |
21699 |
- |
21700 |
|
21701 |
diff --git a/app-emulation/opennebula/files/patches/install.sh.5.12.0.1.patch b/app-emulation/opennebula/files/patches/install.sh.5.12.0.1.patch |
21702 |
deleted file mode 100644 |
21703 |
index 920597e..0000000 |
21704 |
--- a/app-emulation/opennebula/files/patches/install.sh.5.12.0.1.patch |
21705 |
+++ /dev/null |
21706 |
@@ -1,14 +0,0 @@ |
21707 |
-diff -Naur a/install.sh b/install.sh |
21708 |
---- a/install.sh 2020-07-14 18:02:27.000000000 +0100 |
21709 |
-+++ b/install.sh 2020-09-20 14:11:35.962024833 +0100 |
21710 |
-@@ -108,8 +108,8 @@ |
21711 |
- ONEHEM_LOCATION="$LIB_LOCATION/onehem" |
21712 |
- SYSTEM_DS_LOCATION="$VAR_LOCATION/datastores/0" |
21713 |
- DEFAULT_DS_LOCATION="$VAR_LOCATION/datastores/1" |
21714 |
-- RUN_LOCATION="/var/run/one" |
21715 |
-- LOCK_LOCATION="/var/lock/one" |
21716 |
-+ RUN_LOCATION="/run/one" |
21717 |
-+ LOCK_LOCATION="/run/lock/one" |
21718 |
- INCLUDE_LOCATION="/usr/include" |
21719 |
- SHARE_LOCATION="/usr/share/one" |
21720 |
- MAN_LOCATION="/usr/share/man/man1" |
21721 |
|
21722 |
diff --git a/app-emulation/opennebula/files/patches/install.sh.patch b/app-emulation/opennebula/files/patches/install.sh.patch |
21723 |
deleted file mode 100644 |
21724 |
index 133960d..0000000 |
21725 |
--- a/app-emulation/opennebula/files/patches/install.sh.patch |
21726 |
+++ /dev/null |
21727 |
@@ -1,25 +0,0 @@ |
21728 |
-Index: install.sh |
21729 |
-=================================================================== |
21730 |
---- install.sh 2019-12-10 16:00:55.000000000 +0100 |
21731 |
-+++ install.sh 2019-12-15 08:55:09.000000000 +0100 |
21732 |
-@@ -107,8 +107,8 @@ |
21733 |
- ONEHEM_LOCATION="$LIB_LOCATION/onehem" |
21734 |
- SYSTEM_DS_LOCATION="$VAR_LOCATION/datastores/0" |
21735 |
- DEFAULT_DS_LOCATION="$VAR_LOCATION/datastores/1" |
21736 |
-- RUN_LOCATION="/var/run/one" |
21737 |
-- LOCK_LOCATION="/var/lock/one" |
21738 |
-+ RUN_LOCATION="/run/one" |
21739 |
-+ LOCK_LOCATION="/run/lock/one" |
21740 |
- INCLUDE_LOCATION="/usr/include" |
21741 |
- SHARE_LOCATION="/usr/share/one" |
21742 |
- MAN_LOCATION="/usr/share/man/man1" |
21743 |
-@@ -2450,7 +2450,8 @@ |
21744 |
- ln -s $VAR_LOCATION/sunstone/main.js $DESTDIR$SUNSTONE_LOCATION/public/dist/main.js |
21745 |
- fi |
21746 |
- for d in $CHOWN_DIRS; do |
21747 |
-- chown -R $ONEADMIN_USER:$ONEADMIN_GROUP $DESTDIR$d |
21748 |
-+ : |
21749 |
-+ #chown -R $ONEADMIN_USER:$ONEADMIN_GROUP $DESTDIR$d |
21750 |
- done |
21751 |
- else |
21752 |
- for d in `echo $DELETE_DIRS | awk '{for (i=NF;i>=1;i--) printf $i" "}'`; do |
21753 |
|
21754 |
diff --git a/app-emulation/opennebula/files/patches/node-sass.5.12.0.1.patch b/app-emulation/opennebula/files/patches/node-sass.5.12.0.1.patch |
21755 |
deleted file mode 100644 |
21756 |
index 1c70a05..0000000 |
21757 |
--- a/app-emulation/opennebula/files/patches/node-sass.5.12.0.1.patch |
21758 |
+++ /dev/null |
21759 |
@@ -1,20 +0,0 @@ |
21760 |
-diff -Naur a/src/sunstone/public/Gruntfile.js b/src/sunstone/public/Gruntfile.js |
21761 |
---- a/src/sunstone/public/Gruntfile.js 2020-07-14 18:02:27.000000000 +0100 |
21762 |
-+++ b/src/sunstone/public/Gruntfile.js 2020-09-20 13:18:19.158839478 +0100 |
21763 |
-@@ -15,11 +15,16 @@ |
21764 |
- /* -------------------------------------------------------------------------- */ |
21765 |
- |
21766 |
- module.exports = function(grunt) { |
21767 |
-+ const sass = require('node-sass'); |
21768 |
-+ |
21769 |
-+ require('load-grunt-tasks')(grunt); |
21770 |
-+ |
21771 |
- grunt.initConfig({ |
21772 |
- pkg: grunt.file.readJSON("package.json"), |
21773 |
- |
21774 |
- sass: { |
21775 |
- options: { |
21776 |
-+ implementation: sass, |
21777 |
- includePaths: ["bower_components/foundation-sites/scss"] |
21778 |
- }, |
21779 |
- dist: { |
21780 |
|
21781 |
diff --git a/app-emulation/opennebula/files/patches/package.js.5.12.0.1.patch b/app-emulation/opennebula/files/patches/package.js.5.12.0.1.patch |
21782 |
deleted file mode 100644 |
21783 |
index 7be32bd..0000000 |
21784 |
--- a/app-emulation/opennebula/files/patches/package.js.5.12.0.1.patch |
21785 |
+++ /dev/null |
21786 |
@@ -1,20 +0,0 @@ |
21787 |
-diff -Naur a/src/sunstone/public/package.json b/src/sunstone/public/package.json |
21788 |
---- a/src/sunstone/public/package.json 2020-07-14 18:02:27.000000000 +0100 |
21789 |
-+++ b/src/sunstone/public/package.json 2020-09-20 15:39:20.106057317 +0100 |
21790 |
-@@ -2,11 +2,12 @@ |
21791 |
- "name": "opennebula-sunstone", |
21792 |
- "version": "0.0.1", |
21793 |
- "devDependencies": { |
21794 |
-- "grunt": "<1.1.0", |
21795 |
-+ "grunt": "^1.3.0", |
21796 |
- "grunt-cli": "^1.2.0", |
21797 |
- "grunt-contrib-requirejs": "^1.0.0", |
21798 |
-- "grunt-contrib-watch": "^1.0.0", |
21799 |
-- "grunt-sass": "^1.2.1", |
21800 |
-- "node-sass": "^3.10.1" |
21801 |
-+ "grunt-contrib-watch": "^1.1.0", |
21802 |
-+ "grunt-sass": "^3.1.0", |
21803 |
-+ "node-sass": "^4.12.0", |
21804 |
-+ "load-grunt-tasks": "^5.1.0" |
21805 |
- } |
21806 |
- } |
21807 |
|
21808 |
diff --git a/app-emulation/opennebula/files/sudoers/opennebula b/app-emulation/opennebula/files/sudoers/opennebula |
21809 |
deleted file mode 100644 |
21810 |
index 7137789..0000000 |
21811 |
--- a/app-emulation/opennebula/files/sudoers/opennebula |
21812 |
+++ /dev/null |
21813 |
@@ -1,14 +0,0 @@ |
21814 |
-Defaults:oneadmin !requiretty |
21815 |
-Defaults:oneadmin secure_path = /sbin:/bin:/usr/sbin:/usr/bin |
21816 |
- |
21817 |
-Cmnd_Alias ONE_CEPH = /usr/bin/rbd |
21818 |
-Cmnd_Alias ONE_HA = /usr/bin/systemctl start opennebula-flow, /usr/bin/systemctl stop opennebula-flow, /usr/bin/systemctl start opennebula-gate, /usr/bin/systemctl stop opennebula-gate, /usr/bin/systemctl start opennebula-hem, /usr/bin/systemctl stop opennebula-hem, /usr/sbin/service opennebula-flow start, /usr/sbin/service opennebula-flow stop, /usr/sbin/service opennebula-gate start, /usr/sbin/service opennebula-gate stop, /usr/sbin/service opennebula-hem start, /usr/sbin/service opennebula-hem stop, /bin/arping, /bin/ip |
21819 |
-Cmnd_Alias ONE_LVM = /sbin/lvcreate, /sbin/lvremove, /sbin/lvs, /sbin/vgdisplay, /sbin/lvchange, /sbin/lvscan, /sbin/lvextend |
21820 |
-Cmnd_Alias ONE_LXD = /usr/bin/lxc, /bin/mount, /bin/umount, /bin/mkdir, /bin/lsblk, /sbin/losetup, /sbin/kpartx, /usr/bin/qemu-nbd, /sbin/blkid, /sbin/e2fsck, /sbin/resize2fs, /usr/sbin/xfs_growfs, /usr/bin/rbd-nbd, /usr/sbin/xfs_admin, /sbin/tune2fs |
21821 |
-Cmnd_Alias ONE_MARKET = /usr/lib64/one/sh/create_container_image.sh |
21822 |
-Cmnd_Alias ONE_NET = /sbin/ebtables, /sbin/iptables, /sbin/ip6tables, /bin/ip |
21823 |
-Cmnd_Alias ONE_OVS = /usr/bin/ovs-ofctl, /usr/bin/ovs-vsctl |
21824 |
- |
21825 |
-## Command aliases are enabled individually in dedicated |
21826 |
-## sudoers files by each OpenNebula component (server, node). |
21827 |
-# oneadmin ALL=(ALL) NOPASSWD: ONE_CEPH, ONE_HA, ONE_LVM, ONE_LXD, ONE_MARKET, ONE_NET, ONE_OVS |
21828 |
|
21829 |
diff --git a/app-emulation/opennebula/files/sudoers/opennebula-node b/app-emulation/opennebula/files/sudoers/opennebula-node |
21830 |
deleted file mode 100644 |
21831 |
index 2f0b3e7..0000000 |
21832 |
--- a/app-emulation/opennebula/files/sudoers/opennebula-node |
21833 |
+++ /dev/null |
21834 |
@@ -1 +0,0 @@ |
21835 |
-oneadmin ALL=(ALL:ALL) NOPASSWD: ONE_CEPH, ONE_NET, ONE_OVS, ONE_LVM |
21836 |
|
21837 |
diff --git a/app-emulation/opennebula/files/sudoers/opennebula-node-lxd b/app-emulation/opennebula/files/sudoers/opennebula-node-lxd |
21838 |
deleted file mode 100644 |
21839 |
index a7fd1dc..0000000 |
21840 |
--- a/app-emulation/opennebula/files/sudoers/opennebula-node-lxd |
21841 |
+++ /dev/null |
21842 |
@@ -1 +0,0 @@ |
21843 |
-oneadmin ALL=(ALL:ALL) NOPASSWD: ONE_LXD |
21844 |
|
21845 |
diff --git a/app-emulation/opennebula/files/sudoers/opennebula-server b/app-emulation/opennebula/files/sudoers/opennebula-server |
21846 |
deleted file mode 100644 |
21847 |
index afbe9a6..0000000 |
21848 |
--- a/app-emulation/opennebula/files/sudoers/opennebula-server |
21849 |
+++ /dev/null |
21850 |
@@ -1 +0,0 @@ |
21851 |
-oneadmin ALL=(ALL) NOPASSWD: ONE_CEPH, ONE_HA, ONE_MARKET |
21852 |
|
21853 |
diff --git a/app-emulation/opennebula/files/systemd/opennebula-econe.service b/app-emulation/opennebula/files/systemd/opennebula-econe.service |
21854 |
deleted file mode 100644 |
21855 |
index 434c4ff..0000000 |
21856 |
--- a/app-emulation/opennebula/files/systemd/opennebula-econe.service |
21857 |
+++ /dev/null |
21858 |
@@ -1,19 +0,0 @@ |
21859 |
-[Unit] |
21860 |
-Description=OpenNebula econe Server |
21861 |
-After=syslog.target network.target |
21862 |
-After=opennebula.service |
21863 |
-AssertFileNotEmpty=/var/lib/one/.one/ec2_auth |
21864 |
- |
21865 |
-[Service] |
21866 |
-Type=simple |
21867 |
-Group=oneadmin |
21868 |
-User=oneadmin |
21869 |
-ExecStartPre=-/usr/bin/logrotate -f /etc/logrotate.d/opennebula-econe -s /var/lib/one/.logrotate.status |
21870 |
-ExecStart=/usr/bin/ruby /usr/lib64/one/ruby/cloud/econe/econe-server.rb |
21871 |
-StartLimitInterval=60 |
21872 |
-StartLimitBurst=3 |
21873 |
-Restart=on-failure |
21874 |
-RestartSec=5 |
21875 |
- |
21876 |
-[Install] |
21877 |
-WantedBy=multi-user.target |
21878 |
|
21879 |
diff --git a/app-emulation/opennebula/files/systemd/opennebula-flow.service b/app-emulation/opennebula/files/systemd/opennebula-flow.service |
21880 |
deleted file mode 100644 |
21881 |
index 6916d3d..0000000 |
21882 |
--- a/app-emulation/opennebula/files/systemd/opennebula-flow.service |
21883 |
+++ /dev/null |
21884 |
@@ -1,19 +0,0 @@ |
21885 |
-[Unit] |
21886 |
-Description=OpenNebula Flow Service |
21887 |
-After=syslog.target network.target |
21888 |
-After=opennebula.service |
21889 |
-AssertFileNotEmpty=/var/lib/one/.one/oneflow_auth |
21890 |
- |
21891 |
-[Service] |
21892 |
-Type=simple |
21893 |
-Group=oneadmin |
21894 |
-User=oneadmin |
21895 |
-ExecStartPre=-/usr/bin/logrotate -f /etc/logrotate.d/opennebula-flow -s /var/lib/one/.logrotate.status |
21896 |
-ExecStart=/usr/bin/ruby /usr/lib64/one/oneflow/oneflow-server.rb |
21897 |
-StartLimitInterval=60 |
21898 |
-StartLimitBurst=3 |
21899 |
-Restart=on-failure |
21900 |
-RestartSec=5 |
21901 |
- |
21902 |
-[Install] |
21903 |
-WantedBy=multi-user.target |
21904 |
|
21905 |
diff --git a/app-emulation/opennebula/files/systemd/opennebula-gate.service b/app-emulation/opennebula/files/systemd/opennebula-gate.service |
21906 |
deleted file mode 100644 |
21907 |
index cc410e6..0000000 |
21908 |
--- a/app-emulation/opennebula/files/systemd/opennebula-gate.service |
21909 |
+++ /dev/null |
21910 |
@@ -1,19 +0,0 @@ |
21911 |
-[Unit] |
21912 |
-Description=OpenNebula Gate Service |
21913 |
-After=syslog.target network.target |
21914 |
-After=opennebula.service |
21915 |
-AssertFileNotEmpty=/var/lib/one/.one/onegate_auth |
21916 |
- |
21917 |
-[Service] |
21918 |
-Type=simple |
21919 |
-Group=oneadmin |
21920 |
-User=oneadmin |
21921 |
-ExecStartPre=-/usr/bin/logrotate -f /etc/logrotate.d/opennebula-gate -s /var/lib/one/.logrotate.status |
21922 |
-ExecStart=/usr/bin/ruby /usr/lib64/one/onegate/onegate-server.rb |
21923 |
-StartLimitInterval=60 |
21924 |
-StartLimitBurst=3 |
21925 |
-Restart=on-failure |
21926 |
-RestartSec=5 |
21927 |
- |
21928 |
-[Install] |
21929 |
-WantedBy=multi-user.target |
21930 |
|
21931 |
diff --git a/app-emulation/opennebula/files/systemd/opennebula-hem.service b/app-emulation/opennebula/files/systemd/opennebula-hem.service |
21932 |
deleted file mode 100644 |
21933 |
index e59544f..0000000 |
21934 |
--- a/app-emulation/opennebula/files/systemd/opennebula-hem.service |
21935 |
+++ /dev/null |
21936 |
@@ -1,18 +0,0 @@ |
21937 |
-[Unit] |
21938 |
-Description=OpenNebula Hook Execution Service |
21939 |
-After=syslog.target network.target |
21940 |
-After=opennebula.service |
21941 |
- |
21942 |
-[Service] |
21943 |
-Type=simple |
21944 |
-Group=oneadmin |
21945 |
-User=oneadmin |
21946 |
-ExecStartPre=-/usr/bin/logrotate -f /etc/logrotate.d/opennebula-hem -s /var/lib/one/.logrotate.status |
21947 |
-ExecStart=/usr/bin/ruby /usr/lib64/one/onehem/onehem-server.rb |
21948 |
-StartLimitInterval=60 |
21949 |
-StartLimitBurst=3 |
21950 |
-Restart=on-failure |
21951 |
-RestartSec=5 |
21952 |
- |
21953 |
-[Install] |
21954 |
-WantedBy=multi-user.target |
21955 |
|
21956 |
diff --git a/app-emulation/opennebula/files/systemd/opennebula-novnc.service b/app-emulation/opennebula/files/systemd/opennebula-novnc.service |
21957 |
deleted file mode 100644 |
21958 |
index e8026ed..0000000 |
21959 |
--- a/app-emulation/opennebula/files/systemd/opennebula-novnc.service |
21960 |
+++ /dev/null |
21961 |
@@ -1,18 +0,0 @@ |
21962 |
-[Unit] |
21963 |
-Description=OpenNebula noVNC Server |
21964 |
-After=syslog.target network.target |
21965 |
- |
21966 |
-[Service] |
21967 |
-Type=forking |
21968 |
-Group=oneadmin |
21969 |
-User=oneadmin |
21970 |
-ExecStartPre=-/usr/bin/logrotate -f /etc/logrotate.d/opennebula-novnc -s /var/lib/one/.logrotate.status |
21971 |
-ExecStart=/usr/bin/novnc-server start |
21972 |
-PIDFile=/run/lock/one/.novnc.lock |
21973 |
-StartLimitInterval=60 |
21974 |
-StartLimitBurst=3 |
21975 |
-Restart=on-failure |
21976 |
-RestartSec=5 |
21977 |
- |
21978 |
-[Install] |
21979 |
-WantedBy=multi-user.target |
21980 |
|
21981 |
diff --git a/app-emulation/opennebula/files/systemd/opennebula-scheduler.service b/app-emulation/opennebula/files/systemd/opennebula-scheduler.service |
21982 |
deleted file mode 100644 |
21983 |
index 6e0b3b9..0000000 |
21984 |
--- a/app-emulation/opennebula/files/systemd/opennebula-scheduler.service |
21985 |
+++ /dev/null |
21986 |
@@ -1,19 +0,0 @@ |
21987 |
-[Unit] |
21988 |
-Description=OpenNebula Cloud Scheduler Daemon |
21989 |
-After=syslog.target network.target remote-fs.target |
21990 |
-After=opennebula.service |
21991 |
-AssertFileNotEmpty=/var/lib/one/.one/one_auth |
21992 |
- |
21993 |
-[Service] |
21994 |
-Type=simple |
21995 |
-Group=oneadmin |
21996 |
-User=oneadmin |
21997 |
-ExecStartPre=-/usr/bin/logrotate -f /etc/logrotate.d/opennebula-scheduler -s /var/lib/one/.logrotate.status |
21998 |
-ExecStart=/usr/bin/mm_sched |
21999 |
-StartLimitInterval=60 |
22000 |
-StartLimitBurst=3 |
22001 |
-Restart=on-failure |
22002 |
-RestartSec=5 |
22003 |
- |
22004 |
-[Install] |
22005 |
-WantedBy=multi-user.target |
22006 |
|
22007 |
diff --git a/app-emulation/opennebula/files/systemd/opennebula-sunstone.service b/app-emulation/opennebula/files/systemd/opennebula-sunstone.service |
22008 |
deleted file mode 100644 |
22009 |
index 1db2649..0000000 |
22010 |
--- a/app-emulation/opennebula/files/systemd/opennebula-sunstone.service |
22011 |
+++ /dev/null |
22012 |
@@ -1,20 +0,0 @@ |
22013 |
-[Unit] |
22014 |
-Description=OpenNebula Web UI Server |
22015 |
-After=syslog.target network.target |
22016 |
-After=opennebula.service |
22017 |
-Wants=opennebula-novnc.service |
22018 |
-AssertFileNotEmpty=/var/lib/one/.one/sunstone_auth |
22019 |
- |
22020 |
-[Service] |
22021 |
-Type=simple |
22022 |
-Group=oneadmin |
22023 |
-User=oneadmin |
22024 |
-ExecStartPre=-/usr/bin/logrotate -f /etc/logrotate.d/opennebula-sunstone -s /var/lib/one/.logrotate.status |
22025 |
-ExecStart=/usr/bin/ruby /usr/lib64/one/sunstone/sunstone-server.rb |
22026 |
-StartLimitInterval=60 |
22027 |
-StartLimitBurst=3 |
22028 |
-Restart=on-failure |
22029 |
-RestartSec=5 |
22030 |
- |
22031 |
-[Install] |
22032 |
-WantedBy=multi-user.target |
22033 |
|
22034 |
diff --git a/app-emulation/opennebula/files/systemd/opennebula.service b/app-emulation/opennebula/files/systemd/opennebula.service |
22035 |
deleted file mode 100644 |
22036 |
index 68eaac9..0000000 |
22037 |
--- a/app-emulation/opennebula/files/systemd/opennebula.service |
22038 |
+++ /dev/null |
22039 |
@@ -1,21 +0,0 @@ |
22040 |
-[Unit] |
22041 |
-Description=OpenNebula Cloud Controller Daemon |
22042 |
-After=syslog.target network.target remote-fs.target |
22043 |
-After=mariadb.service mysqld.service |
22044 |
-Wants=opennebula-scheduler.service opennebula-hem.service |
22045 |
- |
22046 |
-[Service] |
22047 |
-Type=notify |
22048 |
-Group=oneadmin |
22049 |
-User=oneadmin |
22050 |
-ExecStartPre=-/usr/bin/logrotate -f /etc/logrotate.d/opennebula -s /var/lib/one/.logrotate.status |
22051 |
-ExecStart=/usr/bin/oned -f |
22052 |
-ExecStopPost=/usr/share/one/follower_cleanup |
22053 |
-PIDFile=/run/lock/one/one |
22054 |
-StartLimitInterval=60 |
22055 |
-StartLimitBurst=3 |
22056 |
-Restart=on-failure |
22057 |
-RestartSec=5 |
22058 |
- |
22059 |
-[Install] |
22060 |
-WantedBy=multi-user.target |
22061 |
|
22062 |
diff --git a/app-emulation/opennebula/files/tmpfiles.d/opennebula-flow.conf b/app-emulation/opennebula/files/tmpfiles.d/opennebula-flow.conf |
22063 |
deleted file mode 100644 |
22064 |
index 3d93976..0000000 |
22065 |
--- a/app-emulation/opennebula/files/tmpfiles.d/opennebula-flow.conf |
22066 |
+++ /dev/null |
22067 |
@@ -1,2 +0,0 @@ |
22068 |
-d /run/lock/one 0755 oneadmin oneadmin - |
22069 |
-d /run/one 0755 oneadmin oneadmin - |
22070 |
|
22071 |
diff --git a/app-emulation/opennebula/files/tmpfiles.d/opennebula-gate.conf b/app-emulation/opennebula/files/tmpfiles.d/opennebula-gate.conf |
22072 |
deleted file mode 100644 |
22073 |
index 3d93976..0000000 |
22074 |
--- a/app-emulation/opennebula/files/tmpfiles.d/opennebula-gate.conf |
22075 |
+++ /dev/null |
22076 |
@@ -1,2 +0,0 @@ |
22077 |
-d /run/lock/one 0755 oneadmin oneadmin - |
22078 |
-d /run/one 0755 oneadmin oneadmin - |
22079 |
|
22080 |
diff --git a/app-emulation/opennebula/files/tmpfiles.d/opennebula-node.conf b/app-emulation/opennebula/files/tmpfiles.d/opennebula-node.conf |
22081 |
deleted file mode 100644 |
22082 |
index d00686b..0000000 |
22083 |
--- a/app-emulation/opennebula/files/tmpfiles.d/opennebula-node.conf |
22084 |
+++ /dev/null |
22085 |
@@ -1 +0,0 @@ |
22086 |
-x /var/tmp/one/* |
22087 |
|
22088 |
diff --git a/app-emulation/opennebula/files/tmpfiles.d/opennebula-sunstone.conf b/app-emulation/opennebula/files/tmpfiles.d/opennebula-sunstone.conf |
22089 |
deleted file mode 100644 |
22090 |
index 3d93976..0000000 |
22091 |
--- a/app-emulation/opennebula/files/tmpfiles.d/opennebula-sunstone.conf |
22092 |
+++ /dev/null |
22093 |
@@ -1,2 +0,0 @@ |
22094 |
-d /run/lock/one 0755 oneadmin oneadmin - |
22095 |
-d /run/one 0755 oneadmin oneadmin - |
22096 |
|
22097 |
diff --git a/app-emulation/opennebula/files/tmpfiles.d/opennebula.conf b/app-emulation/opennebula/files/tmpfiles.d/opennebula.conf |
22098 |
deleted file mode 100644 |
22099 |
index 3d93976..0000000 |
22100 |
--- a/app-emulation/opennebula/files/tmpfiles.d/opennebula.conf |
22101 |
+++ /dev/null |
22102 |
@@ -1,2 +0,0 @@ |
22103 |
-d /run/lock/one 0755 oneadmin oneadmin - |
22104 |
-d /run/one 0755 oneadmin oneadmin - |
22105 |
|
22106 |
diff --git a/app-emulation/opennebula/metadata.xml b/app-emulation/opennebula/metadata.xml |
22107 |
deleted file mode 100644 |
22108 |
index aed7391..0000000 |
22109 |
--- a/app-emulation/opennebula/metadata.xml |
22110 |
+++ /dev/null |
22111 |
@@ -1,33 +0,0 @@ |
22112 |
-<?xml version="1.0" encoding="UTF-8"?> |
22113 |
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
22114 |
-<pkgmetadata> |
22115 |
- <herd>opennebula</herd> |
22116 |
- <longdescription> |
22117 |
- Virtual management infrastructure as a service (IaaS) toolkit |
22118 |
- for cloud computing. |
22119 |
- |
22120 |
- Official documentation at |
22121 |
- http://docs.opennebula.org/stable |
22122 |
- </longdescription> |
22123 |
- <use> |
22124 |
- <flag name='qemu'>Enables qemu support. |
22125 |
- </flag> |
22126 |
- <flag name='mysql'>Enables mysql support. |
22127 |
- </flag> |
22128 |
- <flag name='xen'>Enables xen support. |
22129 |
- </flag> |
22130 |
- <flag name='sqlite'>Enables sqlite support. |
22131 |
- </flag> |
22132 |
- <flag name='extras'>Enables additional packages found on |
22133 |
- arch aur opennebula version. |
22134 |
- </flag> |
22135 |
- <flag name='systemd'>Use systemd init system. |
22136 |
- </flag> |
22137 |
- <flag name='docker'>Build docker machine driver. |
22138 |
- </flag> |
22139 |
- <flag name='sunstone'>Build sunstone minified files. |
22140 |
- </flag> |
22141 |
- <flag name='vnc'>Build vnc support for LXD drivers. |
22142 |
- </flag> |
22143 |
- </use> |
22144 |
-</pkgmetadata> |
22145 |
|
22146 |
diff --git a/app-emulation/opennebula/opennebula-5.10.1.ebuild b/app-emulation/opennebula/opennebula-5.10.1.ebuild |
22147 |
deleted file mode 100644 |
22148 |
index 3e44fa8..0000000 |
22149 |
--- a/app-emulation/opennebula/opennebula-5.10.1.ebuild |
22150 |
+++ /dev/null |
22151 |
@@ -1,292 +0,0 @@ |
22152 |
-# Copyright 1999-2020 Gentoo Authors |
22153 |
-# Distributed under the terms of the GNU General Public License v2 |
22154 |
-# $Header: $ |
22155 |
- |
22156 |
-EAPI=7 |
22157 |
-USE_RUBY="ruby24 ruby25 ruby26 ruby27" |
22158 |
-PYTHON_COMPAT=( python2_7 python3_6 ) |
22159 |
- |
22160 |
-inherit user eutils multilib ruby-ng systemd rpm python-r1 |
22161 |
- |
22162 |
-MY_P="one-release-${PV}" |
22163 |
-P_RPM="${P}-1" |
22164 |
- |
22165 |
-DESCRIPTION="OpenNebula Virtual Infrastructure Engine" |
22166 |
-HOMEPAGE="http://www.opennebula.org/" |
22167 |
- |
22168 |
-IUSE="qemu +mysql xen sqlite +extras systemd docker +sunstone vnc +python" |
22169 |
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" |
22170 |
-LICENSE="Apache-2.0" |
22171 |
-SLOT="0" |
22172 |
-KEYWORDS="~amd64" |
22173 |
-SRC_URI="http://downloads.opennebula.org/packages/${P}/${P}.tar.gz -> ${P}.tar.gz" |
22174 |
-#SRC_URI="http://downloads.opennebula.org/packages/${P}/${P}.tar.gz -> ${P}.tar.gz |
22175 |
-# http://downloads.opennebula.io/packages/${P}/centos8/${P_RPM}.tar.gz -> ${P}-centos8.tar.gz" |
22176 |
- |
22177 |
-RDEPEND=">=dev-libs/xmlrpc-c-1.18.02[abyss,cxx,threads] |
22178 |
- dev-lang/ruby |
22179 |
- python? ( ${PYTHON_DEPS} |
22180 |
- >=dev-python/pygobject-2.90.4:3[${PYTHON_USEDEP}] ) |
22181 |
- extras? ( dev-libs/openssl |
22182 |
- dev-ruby/libxml |
22183 |
- net-misc/curl |
22184 |
- dev-libs/libxslt |
22185 |
- dev-libs/expat |
22186 |
- dev-ruby/uuidtools |
22187 |
- dev-ruby/amazon-ec2 |
22188 |
- dev-ruby/webmock |
22189 |
- dev-ruby/mysql |
22190 |
- dev-ruby/mysql2 |
22191 |
- dev-ruby/parse-cron |
22192 |
- dev-ruby/sequel |
22193 |
- dev-ruby/treetop |
22194 |
- dev-ruby/xml-simple |
22195 |
- dev-ruby/zendesk_api |
22196 |
- dev-ruby/ffi-rzmq |
22197 |
- dev-ruby/ffi-rzmq-core |
22198 |
- dev-ruby/rqrcode |
22199 |
- dev-ruby/rqrcode_core |
22200 |
- dev-ruby/chunky_png |
22201 |
- dev-ruby/rotp |
22202 |
- dev-libs/log4cpp ) |
22203 |
- mysql? ( virtual/mysql ) |
22204 |
- dev-db/sqlite |
22205 |
- net-misc/openssh |
22206 |
- net-fs/nfs-utils |
22207 |
- dev-db/mariadb |
22208 |
- net-libs/zeromq |
22209 |
- || ( app-cdr/cdrkit app-cdr/cdrtools ) |
22210 |
- sqlite? ( dev-ruby/sqlite3 ) |
22211 |
- qemu? ( app-emulation/libvirt[libvirtd,qemu] ) |
22212 |
- xen? ( app-emulation/xen-tools )" |
22213 |
-DEPEND="${RDEPEND} |
22214 |
- >=dev-util/scons-3.0.0 |
22215 |
- dev-ruby/nokogiri |
22216 |
- dev-ruby/bundler |
22217 |
- dev-nodejs/grunt-cli |
22218 |
- dev-nodejs/bower |
22219 |
- net-libs/nodejs[npm] |
22220 |
- net-libs/libvncserver |
22221 |
- app-text/ronn |
22222 |
- dev-ruby/builder |
22223 |
- dev-ruby/highline |
22224 |
- dev-ruby/ipaddress:1 |
22225 |
- docker? ( dev-go/dep )" |
22226 |
- |
22227 |
-# make sure no eclass is running tests |
22228 |
-RESTRICT="test" |
22229 |
- |
22230 |
-S="${WORKDIR}/${P}" |
22231 |
- |
22232 |
-ONEUSER="oneadmin" |
22233 |
-ONEGROUP="oneadmin" |
22234 |
- |
22235 |
-PATCHES=( |
22236 |
- "${FILESDIR}/patches/fix_kvm_emulator.patch" |
22237 |
- "${FILESDIR}/patches/install.sh.patch" |
22238 |
-) |
22239 |
- |
22240 |
-pkg_pretend() { |
22241 |
- if use docker; then |
22242 |
- elog "Opennebula releases needs to build docker without network sandbox restriction." |
22243 |
- has network-sandbox ${FEATURES} && die "Please disable feature network-sandbox: -network-sandbox" |
22244 |
- fi |
22245 |
-} |
22246 |
- |
22247 |
-pkg_setup () { |
22248 |
- enewgroup ${ONEGROUP} |
22249 |
- enewuser ${ONEUSER} -1 /bin/bash /var/lib/one ${ONEGROUP} |
22250 |
-} |
22251 |
- |
22252 |
-src_unpack() { |
22253 |
- default |
22254 |
- #rm -rf ${WORKDIR}/${P_RPM}/src |
22255 |
- #rpm_unpack $(find . -name "*.rpm") |
22256 |
-} |
22257 |
- |
22258 |
-src_prepare() { |
22259 |
- # install missing source file |
22260 |
- cp "${FILESDIR}"/${P}/parsers/* "${S}"/src/parsers/ || die "copy parsers files failed" |
22261 |
- |
22262 |
- # set correct lib path |
22263 |
- use docker && make -C src/docker_machine/src/docker_machine vendor |
22264 |
- for f in $(grep -rlI "/usr/lib/one" .); do sed -i -e "s/\/usr\/lib\/one/\/usr\/$(get_libdir)\/one/g" $f; done || die "correct lib dir failed" |
22265 |
- |
22266 |
- # grunt-sass and node-sass versions |
22267 |
- #sed -i -e 's|1.2.1|2.1.0|' -e 's|3.10.1|4.13.0|' src/sunstone/public/package.json || die "sed failed" |
22268 |
- |
22269 |
- # As we install from the github release sources we need to build sunstone as well. |
22270 |
- # To do that we need the npm environment set up |
22271 |
- # https://docs.opennebula.org/5.4/integration/references/sunstone_dev.html#sunstone-dev |
22272 |
- #pushd src/sunstone/public/ >/dev/null |
22273 |
- #./build.sh -d |
22274 |
- #popd >/dev/null |
22275 |
- |
22276 |
- eapply_user |
22277 |
-} |
22278 |
- |
22279 |
-src_configure() { |
22280 |
- : |
22281 |
-} |
22282 |
- |
22283 |
-src_compile() { |
22284 |
- ########################################################################### |
22285 |
- ## ## |
22286 |
- ## It is highly recommended that you read the documentation and tweak ## |
22287 |
- ## the PKGBUILD accordingly: ## |
22288 |
- ## http://docs.opennebula.org/stable/integration/references/compile.html ## |
22289 |
- ## ## |
22290 |
- ########################################################################### |
22291 |
- local myconf |
22292 |
- myconf+="parsers=yes new_xmlrpc=yes " |
22293 |
- use extras && myconf+="new_xmlrpc=yes " |
22294 |
- use mysql && myconf+="mysql=yes " || myconf+="mysql=no " |
22295 |
- use docker && myconf+="docker_machine=yes " |
22296 |
- use systemd && myconf+="systemd=yes " |
22297 |
- use vnc && myconf+="svncterm=yes " |
22298 |
- python3 $(which scons) \ |
22299 |
- ${myconf} \ |
22300 |
- $(sed -r 's/.*(-j\s*|--jobs=)([0-9]+).*/-j\2/' <<< ${MAKEOPTS}) \ |
22301 |
- || die "building ${PN} failed" |
22302 |
- |
22303 |
- if use !sunstone; then |
22304 |
- rm -rf ${S}/src/sunstone |
22305 |
- fi |
22306 |
-} |
22307 |
- |
22308 |
-src_install() { |
22309 |
- # Prepare installation |
22310 |
- keepdir /var/{lib,run}/${PN} || die "keepdir failed" |
22311 |
- |
22312 |
- dodir /usr/$(get_libdir)/one |
22313 |
- dodir /var/log/one |
22314 |
- dodir /var/lib/one |
22315 |
- dodir /var/tmp/one |
22316 |
- dodir /var/lib/one |
22317 |
- dodir /var/lib/one/vms |
22318 |
- dodir /usr/share/one |
22319 |
- dodir /etc/tmpfiles.d |
22320 |
- |
22321 |
- # Installing Opennebula |
22322 |
- DESTDIR="${T}" ./install.sh -u ${ONEUSER} -g ${ONEGROUP} || die "install opennebula core failed" |
22323 |
- use extras && DESTDIR="${T}" ./install.sh -u ${ONEUSER} -g ${ONEGROUP} -c || die "install opennebula client tools failed" |
22324 |
- use docker && DESTDIR="${T}" ./install.sh -u ${ONEUSER} -g ${ONEGROUP} -e -k || die "install docker machine failed" |
22325 |
- |
22326 |
- pushd "${T}" >/dev/null |
22327 |
- # Clean files |
22328 |
- rm -rf etc/{logrotate.d,sudoers.d} lib/ var/{lock,run} |
22329 |
- |
22330 |
- # setup etc |
22331 |
- insinto /etc |
22332 |
- doins -r etc/one |
22333 |
- rm -rf etc/one |
22334 |
- |
22335 |
- insinto /etc/one |
22336 |
- insopts -m 0640 |
22337 |
- doins "${FILESDIR}/one_auth" |
22338 |
- |
22339 |
- insinto /etc/tmpfiles.d |
22340 |
- insopts -m 0644 |
22341 |
- doins "${FILESDIR}"/tmpfiles.d/* |
22342 |
- |
22343 |
- insinto /etc/logrotate.d |
22344 |
- doins "${FILESDIR}"/logrotate/* |
22345 |
- |
22346 |
- insinto /etc/sudoers.d |
22347 |
- doins "${FILESDIR}"/sudoers/* |
22348 |
- |
22349 |
- # set binaries executable |
22350 |
- into /usr |
22351 |
- dobin usr/bin/* |
22352 |
- |
22353 |
- cp -a usr/$(get_libdir)/one/* "${ED}"/usr/$(get_libdir)/one/ |
22354 |
- cp -a usr/share/one/* "${ED}"/usr/share/one/ |
22355 |
- cp -a var/lib/one/* "${ED}"/var/lib/one/ |
22356 |
- rm -rf usr/bin usr/$(get_libdir)/one usr/share/one var/lib/one |
22357 |
- |
22358 |
- # add documentation |
22359 |
- dodoc usr/share/docs/one/* |
22360 |
- rm -rf usr/share/docs |
22361 |
- |
22362 |
- # install remaining files |
22363 |
- insinto /usr/share/man/man1 |
22364 |
- doins -r usr/share/man/man1/ |
22365 |
- |
22366 |
- # set correct owner |
22367 |
- fowners -R ${ONEUSER}:${ONEGROUP} /etc/one /usr/$(get_libdir)/one /usr/share/one /var/lib/{one,opennebula} /var/log/one /var/tmp/one |
22368 |
- |
22369 |
- # install daemon files |
22370 |
- if use systemd; then |
22371 |
- systemd_dounit "${FILESDIR}"/systemd/*.service |
22372 |
- else |
22373 |
- doenvd "${FILESDIR}/openrc/99one" |
22374 |
- newinitd "${FILESDIR}/openrc/opennebula.initd" opennebula |
22375 |
- newinitd "${FILESDIR}/openrc/sunstone-server.initd" sunstone-server |
22376 |
- newinitd "${FILESDIR}/openrc/oneflow-server.initd" oneflow-server |
22377 |
- newconfd "${FILESDIR}/openrc/opennebula.confd" opennebula |
22378 |
- newconfd "${FILESDIR}/openrc/sunstone-server.confd" sunstone-server |
22379 |
- newconfd "${FILESDIR}/openrc/oneflow-server.confd" oneflow-server |
22380 |
- fi |
22381 |
- |
22382 |
- popd >/dev/null |
22383 |
- |
22384 |
-} |
22385 |
- |
22386 |
-pkg_postinst() { |
22387 |
- |
22388 |
- #chown -R oneadmin:oneadmin ${ROOT}var/{lock,lib,log,run,tmp}/one |
22389 |
- #chown -R oneadmin:oneadmin ${ROOT}usr/share/one |
22390 |
- #chown -R oneadmin:oneadmin ${ROOT}etc/one |
22391 |
- #chown -R oneadmin:oneadmin ${ROOT}usr/$(get_libdir)/one |
22392 |
- |
22393 |
- local onedir="${EROOT}var/lib/one" |
22394 |
- if [ ! -d "${onedir}/.ssh" ] ; then |
22395 |
- #einfo "Generating ssh-key..." |
22396 |
- #umask 0027 || die "setting umask failed" |
22397 |
- #mkdir "${onedir}/.ssh" || die "creating ssh directory failed" |
22398 |
- #ssh-keygen -q -t rsa -N "" -f "${onedir}/.ssh/id_rsa" || die "ssh-keygen failed" |
22399 |
- #cat > "${onedir}/.ssh/config" <<EOF |
22400 |
-#UserKnownHostsFile /dev/null |
22401 |
-#Host * |
22402 |
-# StrictHostKeyChecking no |
22403 |
-#EOF |
22404 |
- #cat "${onedir}/.ssh/id_rsa.pub" >> "${onedir}/.ssh/authorized_keys" || die "adding key failed" |
22405 |
- #chown -R ${ONEUSER}:${ONEGROUP} "${onedir}/.ssh" || die "changing owner failed" |
22406 |
- elog "Create directory ${onedir}/.ssh with umask 0027." |
22407 |
- elog "Then generate ssh key using proper cypher algorithm (at least rsa)." |
22408 |
- elog "Add public key to ${ONEUSER} authorized_keys:" |
22409 |
- elog "cat ${onedir}/.ssh/id_rsa.pub >> ${onedir}/.ssh/authorized_keys" |
22410 |
- elog "${ONEUSER} ssh config for any host with" |
22411 |
- elog "StrictHostKeyChecking no" |
22412 |
- elog "and" |
22413 |
- elog "UserKnownHostsFile /dev/null" |
22414 |
- elog "In the end set correct owner to ${ONEUSER}:" |
22415 |
- elog "chown -R ${ONEUSER}:${ONEGROUP} ${onedir}/.ssh" |
22416 |
- fi |
22417 |
- |
22418 |
- if use qemu ; then |
22419 |
- elog "Make sure that the user ${ONEUSER} has access to the libvirt control socket" |
22420 |
- elog " /var/run/libvirt/libvirt-sock" |
22421 |
- elog "You can easily check this by executing the following command as ${ONEUSER} user" |
22422 |
- elog " virsh -c qemu:///system nodeinfo" |
22423 |
- elog "If not using using policykit in libvirt, the file you should take a look at is:" |
22424 |
- elog " /etc/libvirt/libvirtd.conf (look for the unix_sock_*_perms parameters)" |
22425 |
- elog "Failure to do so may lead to nodes hanging in PENDING state forever without further notice." |
22426 |
- echo "" |
22427 |
- elog "Should a node hang in PENDING state even with correct permissions, try the following to get more information." |
22428 |
- elog "In /tmp/one-im execute the following command for the biggest one_im-* file:" |
22429 |
- elog " ruby -wd one_im-???" |
22430 |
- echo "" |
22431 |
- elog "OpenNebula doesn't allow you to specify the disc format." |
22432 |
- elog "Unfortunately the default in libvirt is not to guess and" |
22433 |
- elog "it therefores assumes a 'raw' format when using qemu/kvm." |
22434 |
- elog "Set 'allow_disk_format_probing = 0' in /etc/libvirt/qemu.conf" |
22435 |
- elog "to work around this until OpenNebula fixes it." |
22436 |
- fi |
22437 |
- |
22438 |
- elog "If you wish to use the sunstone server, please issue the command" |
22439 |
- #elog "/usr/share/one/install_gems as oneadmin user" |
22440 |
- elog "gem install sequel thin json rack sinatra builder treetop zendesk_api mysql parse-cron" |
22441 |
- |
22442 |
-} |
22443 |
- |
22444 |
|
22445 |
diff --git a/app-emulation/opennebula/opennebula-5.10.4.ebuild b/app-emulation/opennebula/opennebula-5.10.4.ebuild |
22446 |
deleted file mode 100644 |
22447 |
index 7d8d079..0000000 |
22448 |
--- a/app-emulation/opennebula/opennebula-5.10.4.ebuild |
22449 |
+++ /dev/null |
22450 |
@@ -1,306 +0,0 @@ |
22451 |
-# Copyright 1999-2020 Gentoo Authors |
22452 |
-# Distributed under the terms of the GNU General Public License v2 |
22453 |
-# $Header: $ |
22454 |
- |
22455 |
-EAPI=7 |
22456 |
-USE_RUBY="ruby24 ruby25 ruby26 ruby27" |
22457 |
-PYTHON_COMPAT=( python2_7 python3_6 ) |
22458 |
- |
22459 |
-inherit user eutils multilib ruby-ng systemd rpm python-r1 |
22460 |
- |
22461 |
-MY_P="one-release-${PV}" |
22462 |
-P_RPM="${P}-1" |
22463 |
- |
22464 |
-DESCRIPTION="OpenNebula Virtual Infrastructure Engine" |
22465 |
-HOMEPAGE="http://www.opennebula.org/" |
22466 |
- |
22467 |
-IUSE="qemu +mysql xen sqlite +extras systemd docker +sunstone vnc +python +doc" |
22468 |
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" |
22469 |
-LICENSE="Apache-2.0" |
22470 |
-SLOT="0" |
22471 |
-KEYWORDS="~amd64" |
22472 |
-SRC_URI="https://github.com/OpenNebula/one/archive/release-${PV}.tar.gz -> ${P}.tar.gz" |
22473 |
- |
22474 |
-RDEPEND=">=dev-libs/xmlrpc-c-1.18.02[abyss,cxx,threads] |
22475 |
- dev-lang/ruby |
22476 |
- python? ( ${PYTHON_DEPS} |
22477 |
- >=dev-python/pygobject-2.90.4:3[${PYTHON_USEDEP}] ) |
22478 |
- extras? ( dev-libs/openssl |
22479 |
- dev-ruby/libxml |
22480 |
- net-misc/curl |
22481 |
- dev-libs/libxslt |
22482 |
- dev-libs/expat |
22483 |
- dev-ruby/uuidtools |
22484 |
- dev-ruby/amazon-ec2 |
22485 |
- dev-ruby/webmock |
22486 |
- dev-ruby/mysql |
22487 |
- dev-ruby/mysql2 |
22488 |
- dev-ruby/parse-cron |
22489 |
- dev-ruby/sequel |
22490 |
- dev-ruby/treetop |
22491 |
- dev-ruby/xml-simple |
22492 |
- dev-ruby/zendesk_api |
22493 |
- dev-ruby/ffi-rzmq |
22494 |
- dev-ruby/ffi-rzmq-core |
22495 |
- dev-ruby/rqrcode |
22496 |
- dev-ruby/rqrcode_core |
22497 |
- dev-ruby/chunky_png |
22498 |
- dev-ruby/rotp |
22499 |
- dev-libs/log4cpp ) |
22500 |
- mysql? ( virtual/mysql ) |
22501 |
- dev-db/sqlite |
22502 |
- net-misc/openssh |
22503 |
- net-fs/nfs-utils |
22504 |
- dev-db/mariadb |
22505 |
- net-libs/zeromq |
22506 |
- || ( app-cdr/cdrkit app-cdr/cdrtools ) |
22507 |
- sqlite? ( dev-ruby/sqlite3 ) |
22508 |
- qemu? ( app-emulation/libvirt[libvirtd,qemu] ) |
22509 |
- xen? ( app-emulation/xen-tools )" |
22510 |
-DEPEND="${RDEPEND} |
22511 |
- dev-lang/ruby:2.5 |
22512 |
- >=dev-util/scons-3.0.0 |
22513 |
- dev-ruby/nokogiri |
22514 |
- dev-ruby/bundler |
22515 |
- dev-nodejs/grunt |
22516 |
- dev-nodejs/bower |
22517 |
- dev-nodejs/ini |
22518 |
- dev-nodejs/braces |
22519 |
- net-libs/nodejs[npm] |
22520 |
- net-libs/libvncserver |
22521 |
- app-text/ronn |
22522 |
- dev-ruby/builder |
22523 |
- dev-ruby/highline |
22524 |
- dev-ruby/ipaddress:1 |
22525 |
- docker? ( dev-go/dep )" |
22526 |
- |
22527 |
-# make sure no eclass is running tests |
22528 |
-RESTRICT="test" |
22529 |
- |
22530 |
-S="${WORKDIR}/${MY_P}" |
22531 |
- |
22532 |
-ONEUSER="oneadmin" |
22533 |
-ONEGROUP="oneadmin" |
22534 |
- |
22535 |
-PATCHES=( |
22536 |
- "${FILESDIR}/patches/fix_kvm_emulator.patch" |
22537 |
- "${FILESDIR}/patches/install.sh.patch" |
22538 |
-) |
22539 |
- |
22540 |
-test_netsandbox() { |
22541 |
- if use sunstone; then |
22542 |
- elog "Opennebula hotfix releases needs to build sunstone without network sandbox restriction." |
22543 |
- has network-sandbox ${FEATURES} && die "Please disable feature network-sandbox: -network-sandbox" |
22544 |
- fi |
22545 |
- if use docker; then |
22546 |
- elog "Opennebula releases needs to build docker without network sandbox restriction." |
22547 |
- has network-sandbox ${FEATURES} && die "Please disable feature network-sandbox: -network-sandbox" |
22548 |
- fi |
22549 |
-} |
22550 |
- |
22551 |
-pkg_pretend() { |
22552 |
- test_netsandbox |
22553 |
-} |
22554 |
- |
22555 |
-pkg_setup () { |
22556 |
- test_netsandbox |
22557 |
- enewgroup ${ONEGROUP} |
22558 |
- enewuser ${ONEUSER} -1 /bin/bash /var/lib/one ${ONEGROUP} |
22559 |
-} |
22560 |
- |
22561 |
-src_unpack() { |
22562 |
- default |
22563 |
-} |
22564 |
- |
22565 |
-src_prepare() { |
22566 |
- # install missing source file |
22567 |
- #cp "${FILESDIR}"/${P}/parsers/* "${S}"/src/parsers/ || die "copy parsers files failed" |
22568 |
- |
22569 |
- # set correct lib path |
22570 |
- use docker && make -C src/docker_machine/src/docker_machine vendor |
22571 |
- for f in $(grep -rlI "/usr/lib/one" .); do sed -i -e "s/\/usr\/lib\/one/\/usr\/$(get_libdir)\/one/g" $f; done || die "correct lib dir failed" |
22572 |
- |
22573 |
- # grunt-sass and node-sass versions |
22574 |
- sed -i -e 's|1.2.1|2.1.0|' -e 's|3.10.1|4.13.0|' src/sunstone/public/package.json || die "sed failed" |
22575 |
- |
22576 |
- # As we install from the github release sources we need to build sunstone as well. |
22577 |
- # To do that we need the npm environment set up |
22578 |
- # https://docs.opennebula.org/5.4/integration/references/sunstone_dev.html#sunstone-dev |
22579 |
- pushd src/sunstone/public/ >/dev/null |
22580 |
- ./build.sh -d || die "Install required dependencies for npm and bower failed." |
22581 |
- #export PATH=$PATH:$PWD/node_modules/.bin |
22582 |
- #./build.sh || die "Prepare minified files failed." |
22583 |
- popd >/dev/null |
22584 |
- |
22585 |
- eapply_user |
22586 |
-} |
22587 |
- |
22588 |
-src_configure() { |
22589 |
- : |
22590 |
-} |
22591 |
- |
22592 |
-src_compile() { |
22593 |
- # manual pages |
22594 |
- if use doc; then |
22595 |
- pushd ${S}/share/man >/dev/null |
22596 |
- ./build.sh |
22597 |
- popd >/dev/null |
22598 |
- fi |
22599 |
- |
22600 |
- ########################################################################### |
22601 |
- ## ## |
22602 |
- ## It is highly recommended that you read the documentation and tweak ## |
22603 |
- ## the PKGBUILD accordingly: ## |
22604 |
- ## http://docs.opennebula.org/stable/integration/references/compile.html ## |
22605 |
- ## ## |
22606 |
- ########################################################################### |
22607 |
- local myconf |
22608 |
- myconf+="parsers=yes new_xmlrpc=yes " |
22609 |
- use extras && myconf+="new_xmlrpc=yes " |
22610 |
- use mysql && myconf+="mysql=yes " || myconf+="mysql=no " |
22611 |
- use sunstone && myconf+="sunstone=yes " |
22612 |
- use docker && myconf+="docker_machine=yes " |
22613 |
- use systemd && myconf+="systemd=yes " |
22614 |
- use vnc && myconf+="svncterm=yes " |
22615 |
- python3 $(which scons) \ |
22616 |
- ${myconf} \ |
22617 |
- $(sed -r 's/.*(-j\s*|--jobs=)([0-9]+).*/-j\2/' <<< ${MAKEOPTS}) \ |
22618 |
- || die "building ${PN} failed" |
22619 |
-} |
22620 |
- |
22621 |
-src_install() { |
22622 |
- # Prepare installation |
22623 |
- keepdir /var/{lib,run}/${PN} || die "keepdir failed" |
22624 |
- |
22625 |
- dodir /usr/$(get_libdir)/one |
22626 |
- dodir /var/log/one |
22627 |
- dodir /var/lib/one |
22628 |
- dodir /var/tmp/one |
22629 |
- dodir /var/lib/one |
22630 |
- dodir /var/lib/one/vms |
22631 |
- dodir /usr/share/one |
22632 |
- dodir /etc/tmpfiles.d |
22633 |
- |
22634 |
- # Installing Opennebula |
22635 |
- DESTDIR="${T}" ./install.sh -u ${ONEUSER} -g ${ONEGROUP} || die "install opennebula core failed" |
22636 |
- use extras && DESTDIR="${T}" ./install.sh -u ${ONEUSER} -g ${ONEGROUP} -c || die "install opennebula client tools failed" |
22637 |
- use docker && DESTDIR="${T}" ./install.sh -u ${ONEUSER} -g ${ONEGROUP} -e -k || die "install docker machine failed" |
22638 |
- |
22639 |
- pushd "${T}" >/dev/null |
22640 |
- # Clean files |
22641 |
- rm -rf etc/{logrotate.d,sudoers.d} lib/ var/{lock,run} |
22642 |
- |
22643 |
- # setup etc |
22644 |
- insinto /etc |
22645 |
- doins -r etc/one |
22646 |
- rm -rf etc/one |
22647 |
- |
22648 |
- insinto /etc/one |
22649 |
- insopts -m 0640 |
22650 |
- doins "${FILESDIR}/one_auth" |
22651 |
- |
22652 |
- insinto /etc/tmpfiles.d |
22653 |
- insopts -m 0644 |
22654 |
- doins "${FILESDIR}"/tmpfiles.d/* |
22655 |
- |
22656 |
- insinto /etc/logrotate.d |
22657 |
- doins "${FILESDIR}"/logrotate/* |
22658 |
- |
22659 |
- insinto /etc/sudoers.d |
22660 |
- doins "${FILESDIR}"/sudoers/* |
22661 |
- |
22662 |
- # set binaries executable |
22663 |
- into /usr |
22664 |
- dobin usr/bin/* |
22665 |
- |
22666 |
- cp -a usr/$(get_libdir)/one/* "${ED}"/usr/$(get_libdir)/one/ |
22667 |
- cp -a usr/share/one/* "${ED}"/usr/share/one/ |
22668 |
- cp -a var/lib/one/* "${ED}"/var/lib/one/ |
22669 |
- rm -rf usr/bin usr/$(get_libdir)/one usr/share/one var/lib/one |
22670 |
- |
22671 |
- # add documentation |
22672 |
- dodoc usr/share/docs/one/* |
22673 |
- rm -rf usr/share/docs |
22674 |
- |
22675 |
- # install remaining files |
22676 |
- insinto /usr/share/man |
22677 |
- doins -r usr/share/man/man1/ |
22678 |
- |
22679 |
- # set correct owner |
22680 |
- fowners -R ${ONEUSER}:${ONEGROUP} /etc/one /usr/$(get_libdir)/one /usr/share/one /var/lib/{one,opennebula} /var/log/one /var/tmp/one |
22681 |
- |
22682 |
- # install daemon files |
22683 |
- if use systemd; then |
22684 |
- systemd_dounit "${FILESDIR}"/systemd/*.service |
22685 |
- else |
22686 |
- doenvd "${FILESDIR}/openrc/99one" |
22687 |
- newinitd "${FILESDIR}/openrc/opennebula.initd" opennebula |
22688 |
- newinitd "${FILESDIR}/openrc/sunstone-server.initd" sunstone-server |
22689 |
- newinitd "${FILESDIR}/openrc/oneflow-server.initd" oneflow-server |
22690 |
- newconfd "${FILESDIR}/openrc/opennebula.confd" opennebula |
22691 |
- newconfd "${FILESDIR}/openrc/sunstone-server.confd" sunstone-server |
22692 |
- newconfd "${FILESDIR}/openrc/oneflow-server.confd" oneflow-server |
22693 |
- fi |
22694 |
- |
22695 |
- popd >/dev/null |
22696 |
- |
22697 |
-} |
22698 |
- |
22699 |
-pkg_postinst() { |
22700 |
- |
22701 |
- #chown -R oneadmin:oneadmin ${ROOT}var/{lock,lib,log,run,tmp}/one |
22702 |
- #chown -R oneadmin:oneadmin ${ROOT}usr/share/one |
22703 |
- #chown -R oneadmin:oneadmin ${ROOT}etc/one |
22704 |
- #chown -R oneadmin:oneadmin ${ROOT}usr/$(get_libdir)/one |
22705 |
- |
22706 |
- local onedir="${EROOT}var/lib/one" |
22707 |
- if [ ! -d "${onedir}/.ssh" ] ; then |
22708 |
- #einfo "Generating ssh-key..." |
22709 |
- #umask 0027 || die "setting umask failed" |
22710 |
- #mkdir "${onedir}/.ssh" || die "creating ssh directory failed" |
22711 |
- #ssh-keygen -q -t rsa -N "" -f "${onedir}/.ssh/id_rsa" || die "ssh-keygen failed" |
22712 |
- #cat > "${onedir}/.ssh/config" <<EOF |
22713 |
-#UserKnownHostsFile /dev/null |
22714 |
-#Host * |
22715 |
-# StrictHostKeyChecking no |
22716 |
-#EOF |
22717 |
- #cat "${onedir}/.ssh/id_rsa.pub" >> "${onedir}/.ssh/authorized_keys" || die "adding key failed" |
22718 |
- #chown -R ${ONEUSER}:${ONEGROUP} "${onedir}/.ssh" || die "changing owner failed" |
22719 |
- elog "Create directory ${onedir}/.ssh with umask 0027." |
22720 |
- elog "Then generate ssh key using proper cypher algorithm (at least rsa)." |
22721 |
- elog "Add public key to ${ONEUSER} authorized_keys:" |
22722 |
- elog "cat ${onedir}/.ssh/id_rsa.pub >> ${onedir}/.ssh/authorized_keys" |
22723 |
- elog "${ONEUSER} ssh config for any host with" |
22724 |
- elog "StrictHostKeyChecking no" |
22725 |
- elog "and" |
22726 |
- elog "UserKnownHostsFile /dev/null" |
22727 |
- elog "In the end set correct owner to ${ONEUSER}:" |
22728 |
- elog "chown -R ${ONEUSER}:${ONEGROUP} ${onedir}/.ssh" |
22729 |
- fi |
22730 |
- |
22731 |
- if use qemu ; then |
22732 |
- elog "Make sure that the user ${ONEUSER} has access to the libvirt control socket" |
22733 |
- elog " /var/run/libvirt/libvirt-sock" |
22734 |
- elog "You can easily check this by executing the following command as ${ONEUSER} user" |
22735 |
- elog " virsh -c qemu:///system nodeinfo" |
22736 |
- elog "If not using using policykit in libvirt, the file you should take a look at is:" |
22737 |
- elog " /etc/libvirt/libvirtd.conf (look for the unix_sock_*_perms parameters)" |
22738 |
- elog "Failure to do so may lead to nodes hanging in PENDING state forever without further notice." |
22739 |
- echo "" |
22740 |
- elog "Should a node hang in PENDING state even with correct permissions, try the following to get more information." |
22741 |
- elog "In /tmp/one-im execute the following command for the biggest one_im-* file:" |
22742 |
- elog " ruby -wd one_im-???" |
22743 |
- echo "" |
22744 |
- elog "OpenNebula doesn't allow you to specify the disc format." |
22745 |
- elog "Unfortunately the default in libvirt is not to guess and" |
22746 |
- elog "it therefores assumes a 'raw' format when using qemu/kvm." |
22747 |
- elog "Set 'allow_disk_format_probing = 0' in /etc/libvirt/qemu.conf" |
22748 |
- elog "to work around this until OpenNebula fixes it." |
22749 |
- fi |
22750 |
- |
22751 |
- elog "If you wish to use the sunstone server, please issue the command" |
22752 |
- #elog "/usr/share/one/install_gems as oneadmin user" |
22753 |
- elog "gem install sequel thin json rack sinatra builder treetop zendesk_api mysql parse-cron" |
22754 |
- |
22755 |
-} |
22756 |
- |
22757 |
|
22758 |
diff --git a/app-emulation/opennebula/opennebula-5.10.5.ebuild b/app-emulation/opennebula/opennebula-5.10.5.ebuild |
22759 |
deleted file mode 100644 |
22760 |
index f5fdf78..0000000 |
22761 |
--- a/app-emulation/opennebula/opennebula-5.10.5.ebuild |
22762 |
+++ /dev/null |
22763 |
@@ -1,314 +0,0 @@ |
22764 |
-# Copyright 1999-2020 Gentoo Authors |
22765 |
-# Distributed under the terms of the GNU General Public License v2 |
22766 |
-# $Header: $ |
22767 |
- |
22768 |
-EAPI=7 |
22769 |
-USE_RUBY="ruby24 ruby25 ruby26 ruby27" |
22770 |
-PYTHON_COMPAT=( python2_7 python3_6 ) |
22771 |
- |
22772 |
-inherit user eutils multilib ruby-ng systemd rpm python-r1 |
22773 |
- |
22774 |
-MY_P="one-release-${PV}" |
22775 |
-P_RPM="${P}-1" |
22776 |
- |
22777 |
-DESCRIPTION="OpenNebula Virtual Infrastructure Engine" |
22778 |
-HOMEPAGE="http://www.opennebula.org/" |
22779 |
- |
22780 |
-IUSE="qemu +mysql xen sqlite +extras systemd docker +sunstone vnc +python +doc" |
22781 |
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" |
22782 |
-LICENSE="Apache-2.0" |
22783 |
-SLOT="0" |
22784 |
-KEYWORDS="~amd64" |
22785 |
-SRC_URI="https://github.com/OpenNebula/one/archive/release-${PV}.tar.gz -> ${P}.tar.gz" |
22786 |
- |
22787 |
-RDEPEND=">=dev-libs/xmlrpc-c-1.18.02[abyss,cxx,threads] |
22788 |
- dev-lang/ruby |
22789 |
- python? ( ${PYTHON_DEPS} |
22790 |
- >=dev-python/pygobject-2.90.4:3[${PYTHON_USEDEP}] ) |
22791 |
- extras? ( dev-libs/openssl |
22792 |
- dev-ruby/xmlparser |
22793 |
- net-misc/curl |
22794 |
- dev-libs/libxslt |
22795 |
- dev-libs/expat |
22796 |
- dev-ruby/uuidtools |
22797 |
- dev-ruby/amazon-ec2 |
22798 |
- dev-ruby/webmock |
22799 |
- dev-ruby/mysql |
22800 |
- dev-ruby/mysql2 |
22801 |
- dev-ruby/parse-cron |
22802 |
- dev-ruby/treetop |
22803 |
- dev-ruby/xml-simple |
22804 |
- dev-ruby/zendesk_api |
22805 |
- dev-ruby/ffi-rzmq |
22806 |
- dev-ruby/ffi-rzmq-core |
22807 |
- dev-ruby/rqrcode |
22808 |
- dev-ruby/rqrcode_core |
22809 |
- dev-ruby/chunky_png |
22810 |
- dev-ruby/rotp |
22811 |
- dev-ruby/rake |
22812 |
- dev-ruby/ruby-net-ldap |
22813 |
- dev-ruby/curb |
22814 |
- dev-ruby/rubygems |
22815 |
- dev-libs/log4cpp ) |
22816 |
- mysql? ( virtual/mysql ) |
22817 |
- dev-db/sqlite |
22818 |
- net-misc/openssh |
22819 |
- net-fs/nfs-utils |
22820 |
- dev-db/mariadb |
22821 |
- net-libs/zeromq |
22822 |
- dev-ruby/json |
22823 |
- dev-ruby/sequel |
22824 |
- dev-ruby/sinatra |
22825 |
- dev-ruby/thin |
22826 |
- dev-ruby/nokogiri |
22827 |
- sunstone? ( dev-ruby/rack ) |
22828 |
- || ( app-cdr/cdrkit app-cdr/cdrtools ) |
22829 |
- sqlite? ( dev-ruby/sqlite3 ) |
22830 |
- qemu? ( app-emulation/libvirt[libvirtd,qemu] ) |
22831 |
- xen? ( app-emulation/xen-tools )" |
22832 |
-DEPEND="${RDEPEND} |
22833 |
- dev-lang/ruby:2.5 |
22834 |
- >=dev-util/scons-3.0.0 |
22835 |
- dev-ruby/bundler |
22836 |
- dev-nodejs/grunt |
22837 |
- dev-nodejs/bower |
22838 |
- dev-nodejs/ini |
22839 |
- dev-nodejs/braces |
22840 |
- net-libs/nodejs[npm] |
22841 |
- net-libs/libvncserver |
22842 |
- app-text/ronn |
22843 |
- dev-ruby/builder |
22844 |
- dev-ruby/highline |
22845 |
- dev-ruby/ipaddress:1 |
22846 |
- docker? ( dev-go/dep )" |
22847 |
- |
22848 |
-# make sure no eclass is running tests |
22849 |
-RESTRICT="test" |
22850 |
- |
22851 |
-S="${WORKDIR}/${MY_P}" |
22852 |
- |
22853 |
-ONEUSER="oneadmin" |
22854 |
-ONEGROUP="oneadmin" |
22855 |
- |
22856 |
-PATCHES=( |
22857 |
- "${FILESDIR}/patches/fix_kvm_emulator.patch" |
22858 |
- "${FILESDIR}/patches/install.sh.patch" |
22859 |
-) |
22860 |
- |
22861 |
-test_netsandbox() { |
22862 |
- if use sunstone; then |
22863 |
- elog "Opennebula hotfix releases needs to build sunstone without network sandbox restriction." |
22864 |
- has network-sandbox ${FEATURES} && die "Please disable feature network-sandbox: -network-sandbox" |
22865 |
- fi |
22866 |
- if use docker; then |
22867 |
- elog "Opennebula releases needs to build docker without network sandbox restriction." |
22868 |
- has network-sandbox ${FEATURES} && die "Please disable feature network-sandbox: -network-sandbox" |
22869 |
- fi |
22870 |
-} |
22871 |
- |
22872 |
-pkg_pretend() { |
22873 |
- test_netsandbox |
22874 |
-} |
22875 |
- |
22876 |
-pkg_setup () { |
22877 |
- test_netsandbox |
22878 |
- enewgroup ${ONEGROUP} |
22879 |
- enewuser ${ONEUSER} -1 /bin/bash /var/lib/one ${ONEGROUP} |
22880 |
-} |
22881 |
- |
22882 |
-src_unpack() { |
22883 |
- default |
22884 |
-} |
22885 |
- |
22886 |
-src_prepare() { |
22887 |
- # install missing source file |
22888 |
- #cp "${FILESDIR}"/${P}/parsers/* "${S}"/src/parsers/ || die "copy parsers files failed" |
22889 |
- |
22890 |
- # set correct lib path |
22891 |
- use docker && make -C src/docker_machine/src/docker_machine vendor |
22892 |
- for f in $(grep -rlI "/usr/lib/one" .); do sed -i -e "s/\/usr\/lib\/one/\/usr\/$(get_libdir)\/one/g" $f; done || die "correct lib dir failed" |
22893 |
- |
22894 |
- # grunt-sass and node-sass versions |
22895 |
- sed -i -e 's|1.2.1|2.1.0|' -e 's|3.10.1|4.13.0|' src/sunstone/public/package.json || die "sed failed" |
22896 |
- |
22897 |
- # As we install from the github release sources we need to build sunstone as well. |
22898 |
- # To do that we need the npm environment set up |
22899 |
- # https://docs.opennebula.org/5.4/integration/references/sunstone_dev.html#sunstone-dev |
22900 |
- pushd src/sunstone/public/ >/dev/null |
22901 |
- ./build.sh -d || die "Install required dependencies for npm and bower failed." |
22902 |
- #export PATH=$PATH:$PWD/node_modules/.bin |
22903 |
- #./build.sh || die "Prepare minified files failed." |
22904 |
- popd >/dev/null |
22905 |
- |
22906 |
- eapply_user |
22907 |
-} |
22908 |
- |
22909 |
-src_configure() { |
22910 |
- : |
22911 |
-} |
22912 |
- |
22913 |
-src_compile() { |
22914 |
- # manual pages |
22915 |
- if use doc; then |
22916 |
- pushd ${S}/share/man >/dev/null |
22917 |
- ./build.sh |
22918 |
- popd >/dev/null |
22919 |
- fi |
22920 |
- |
22921 |
- ########################################################################### |
22922 |
- ## ## |
22923 |
- ## It is highly recommended that you read the documentation and tweak ## |
22924 |
- ## the PKGBUILD accordingly: ## |
22925 |
- ## http://docs.opennebula.org/stable/integration/references/compile.html ## |
22926 |
- ## ## |
22927 |
- ########################################################################### |
22928 |
- local myconf |
22929 |
- myconf+="parsers=yes new_xmlrpc=yes " |
22930 |
- use extras && myconf+="new_xmlrpc=yes " |
22931 |
- use mysql && myconf+="mysql=yes " || myconf+="mysql=no " |
22932 |
- use sunstone && myconf+="sunstone=yes " |
22933 |
- use docker && myconf+="docker_machine=yes " |
22934 |
- use systemd && myconf+="systemd=yes " |
22935 |
- use vnc && myconf+="svncterm=yes " |
22936 |
- python3 $(which scons) \ |
22937 |
- ${myconf} \ |
22938 |
- $(sed -r 's/.*(-j\s*|--jobs=)([0-9]+).*/-j\2/' <<< ${MAKEOPTS}) \ |
22939 |
- || die "building ${PN} failed" |
22940 |
-} |
22941 |
- |
22942 |
-src_install() { |
22943 |
- # Prepare installation |
22944 |
- keepdir /var/{lib,run}/${PN} || die "keepdir failed" |
22945 |
- |
22946 |
- dodir /usr/$(get_libdir)/one |
22947 |
- dodir /var/log/one |
22948 |
- dodir /var/lib/one |
22949 |
- dodir /var/tmp/one |
22950 |
- dodir /var/lib/one |
22951 |
- dodir /var/lib/one/vms |
22952 |
- dodir /usr/share/one |
22953 |
- dodir /etc/tmpfiles.d |
22954 |
- |
22955 |
- # Installing Opennebula |
22956 |
- DESTDIR="${T}" ./install.sh -u ${ONEUSER} -g ${ONEGROUP} || die "install opennebula core failed" |
22957 |
- use extras && DESTDIR="${T}" ./install.sh -u ${ONEUSER} -g ${ONEGROUP} -c || die "install opennebula client tools failed" |
22958 |
- use docker && DESTDIR="${T}" ./install.sh -u ${ONEUSER} -g ${ONEGROUP} -e -k || die "install docker machine failed" |
22959 |
- |
22960 |
- pushd "${T}" >/dev/null |
22961 |
- # Clean files |
22962 |
- rm -rf etc/{logrotate.d,sudoers.d} lib/ var/{lock,run} |
22963 |
- |
22964 |
- # setup etc |
22965 |
- insinto /etc |
22966 |
- doins -r etc/one |
22967 |
- rm -rf etc/one |
22968 |
- |
22969 |
- insinto /etc/one |
22970 |
- insopts -m 0640 |
22971 |
- doins "${FILESDIR}/one_auth" |
22972 |
- |
22973 |
- insinto /etc/tmpfiles.d |
22974 |
- insopts -m 0644 |
22975 |
- doins "${FILESDIR}"/tmpfiles.d/* |
22976 |
- |
22977 |
- insinto /etc/logrotate.d |
22978 |
- doins "${FILESDIR}"/logrotate/* |
22979 |
- |
22980 |
- insinto /etc/sudoers.d |
22981 |
- doins "${FILESDIR}"/sudoers/* |
22982 |
- |
22983 |
- # set binaries executable |
22984 |
- into /usr |
22985 |
- dobin usr/bin/* |
22986 |
- |
22987 |
- cp -a usr/$(get_libdir)/one/* "${ED}"/usr/$(get_libdir)/one/ |
22988 |
- cp -a usr/share/one/* "${ED}"/usr/share/one/ |
22989 |
- cp -a var/lib/one/* "${ED}"/var/lib/one/ |
22990 |
- rm -rf usr/bin usr/$(get_libdir)/one usr/share/one var/lib/one |
22991 |
- |
22992 |
- # add documentation |
22993 |
- dodoc usr/share/docs/one/* |
22994 |
- rm -rf usr/share/docs |
22995 |
- |
22996 |
- # install remaining files |
22997 |
- insinto /usr/share/man |
22998 |
- doins -r usr/share/man/man1/ |
22999 |
- |
23000 |
- # set correct owner |
23001 |
- fowners -R ${ONEUSER}:${ONEGROUP} /etc/one /usr/$(get_libdir)/one /usr/share/one /var/lib/{one,opennebula} /var/log/one /var/tmp/one |
23002 |
- |
23003 |
- # install daemon files |
23004 |
- if use systemd; then |
23005 |
- systemd_dounit "${FILESDIR}"/systemd/*.service |
23006 |
- else |
23007 |
- doenvd "${FILESDIR}/openrc/99one" |
23008 |
- newinitd "${FILESDIR}/openrc/opennebula.initd" opennebula |
23009 |
- newinitd "${FILESDIR}/openrc/sunstone-server.initd" sunstone-server |
23010 |
- newinitd "${FILESDIR}/openrc/oneflow-server.initd" oneflow-server |
23011 |
- newconfd "${FILESDIR}/openrc/opennebula.confd" opennebula |
23012 |
- newconfd "${FILESDIR}/openrc/sunstone-server.confd" sunstone-server |
23013 |
- newconfd "${FILESDIR}/openrc/oneflow-server.confd" oneflow-server |
23014 |
- fi |
23015 |
- |
23016 |
- popd >/dev/null |
23017 |
- |
23018 |
-} |
23019 |
- |
23020 |
-pkg_postinst() { |
23021 |
- |
23022 |
- #chown -R oneadmin:oneadmin ${ROOT}var/{lock,lib,log,run,tmp}/one |
23023 |
- #chown -R oneadmin:oneadmin ${ROOT}usr/share/one |
23024 |
- #chown -R oneadmin:oneadmin ${ROOT}etc/one |
23025 |
- #chown -R oneadmin:oneadmin ${ROOT}usr/$(get_libdir)/one |
23026 |
- |
23027 |
- local onedir="${EROOT}var/lib/one" |
23028 |
- if [ ! -d "${onedir}/.ssh" ] ; then |
23029 |
- #einfo "Generating ssh-key..." |
23030 |
- #umask 0027 || die "setting umask failed" |
23031 |
- #mkdir "${onedir}/.ssh" || die "creating ssh directory failed" |
23032 |
- #ssh-keygen -q -t rsa -N "" -f "${onedir}/.ssh/id_rsa" || die "ssh-keygen failed" |
23033 |
- #cat > "${onedir}/.ssh/config" <<EOF |
23034 |
-#UserKnownHostsFile /dev/null |
23035 |
-#Host * |
23036 |
-# StrictHostKeyChecking no |
23037 |
-#EOF |
23038 |
- #cat "${onedir}/.ssh/id_rsa.pub" >> "${onedir}/.ssh/authorized_keys" || die "adding key failed" |
23039 |
- #chown -R ${ONEUSER}:${ONEGROUP} "${onedir}/.ssh" || die "changing owner failed" |
23040 |
- elog "Create directory ${onedir}/.ssh with umask 0027." |
23041 |
- elog "Then generate ssh key using proper cypher algorithm (at least rsa)." |
23042 |
- elog "Add public key to ${ONEUSER} authorized_keys:" |
23043 |
- elog "cat ${onedir}/.ssh/id_rsa.pub >> ${onedir}/.ssh/authorized_keys" |
23044 |
- elog "${ONEUSER} ssh config for any host with" |
23045 |
- elog "StrictHostKeyChecking no" |
23046 |
- elog "and" |
23047 |
- elog "UserKnownHostsFile /dev/null" |
23048 |
- elog "In the end set correct owner to ${ONEUSER}:" |
23049 |
- elog "chown -R ${ONEUSER}:${ONEGROUP} ${onedir}/.ssh" |
23050 |
- fi |
23051 |
- |
23052 |
- if use qemu ; then |
23053 |
- elog "Make sure that the user ${ONEUSER} has access to the libvirt control socket" |
23054 |
- elog " /var/run/libvirt/libvirt-sock" |
23055 |
- elog "You can easily check this by executing the following command as ${ONEUSER} user" |
23056 |
- elog " virsh -c qemu:///system nodeinfo" |
23057 |
- elog "If not using using policykit in libvirt, the file you should take a look at is:" |
23058 |
- elog " /etc/libvirt/libvirtd.conf (look for the unix_sock_*_perms parameters)" |
23059 |
- elog "Failure to do so may lead to nodes hanging in PENDING state forever without further notice." |
23060 |
- echo "" |
23061 |
- elog "Should a node hang in PENDING state even with correct permissions, try the following to get more information." |
23062 |
- elog "In /tmp/one-im execute the following command for the biggest one_im-* file:" |
23063 |
- elog " ruby -wd one_im-???" |
23064 |
- echo "" |
23065 |
- elog "OpenNebula doesn't allow you to specify the disc format." |
23066 |
- elog "Unfortunately the default in libvirt is not to guess and" |
23067 |
- elog "it therefores assumes a 'raw' format when using qemu/kvm." |
23068 |
- elog "Set 'allow_disk_format_probing = 0' in /etc/libvirt/qemu.conf" |
23069 |
- elog "to work around this until OpenNebula fixes it." |
23070 |
- fi |
23071 |
- |
23072 |
- elog "If you wish to use the sunstone server, please issue the command" |
23073 |
- #elog "/usr/share/one/install_gems as oneadmin user" |
23074 |
- elog "gem install sequel thin json rack sinatra builder treetop zendesk_api mysql parse-cron" |
23075 |
- |
23076 |
-} |
23077 |
- |
23078 |
|
23079 |
diff --git a/app-emulation/opennebula/opennebula-5.12.0.1.ebuild b/app-emulation/opennebula/opennebula-5.12.0.1.ebuild |
23080 |
deleted file mode 100644 |
23081 |
index 5c13e80..0000000 |
23082 |
--- a/app-emulation/opennebula/opennebula-5.12.0.1.ebuild |
23083 |
+++ /dev/null |
23084 |
@@ -1,315 +0,0 @@ |
23085 |
-# Copyright 1999-2020 Gentoo Authors |
23086 |
-# Distributed under the terms of the GNU General Public License v2 |
23087 |
-# $Header: $ |
23088 |
- |
23089 |
-EAPI=7 |
23090 |
-USE_RUBY="ruby24 ruby25 ruby26 ruby27" |
23091 |
-PYTHON_COMPAT=( python2_7 python3_6 ) |
23092 |
- |
23093 |
-inherit user eutils multilib ruby-ng systemd rpm python-r1 |
23094 |
- |
23095 |
-MY_P="one-release-${PV}" |
23096 |
-P_RPM="${P}-1" |
23097 |
- |
23098 |
-DESCRIPTION="OpenNebula Virtual Infrastructure Engine" |
23099 |
-HOMEPAGE="http://www.opennebula.org/" |
23100 |
- |
23101 |
-IUSE="qemu +mysql xen sqlite +extras systemd docker +sunstone vnc +python +doc" |
23102 |
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" |
23103 |
-LICENSE="Apache-2.0" |
23104 |
-SLOT="0" |
23105 |
-KEYWORDS="~amd64" |
23106 |
-SRC_URI="https://github.com/OpenNebula/one/archive/release-${PV}.tar.gz -> ${P}.tar.gz" |
23107 |
- |
23108 |
-RDEPEND=">=dev-libs/xmlrpc-c-1.18.02[abyss,cxx,threads] |
23109 |
- dev-lang/ruby |
23110 |
- python? ( ${PYTHON_DEPS} |
23111 |
- >=dev-python/pygobject-2.90.4:3[${PYTHON_USEDEP}] ) |
23112 |
- extras? ( dev-libs/openssl |
23113 |
- dev-ruby/xmlparser |
23114 |
- net-misc/curl |
23115 |
- dev-libs/libxslt |
23116 |
- dev-libs/expat |
23117 |
- dev-ruby/uuidtools |
23118 |
- dev-ruby/amazon-ec2 |
23119 |
- dev-ruby/webmock |
23120 |
- dev-ruby/mysql |
23121 |
- dev-ruby/mysql2 |
23122 |
- dev-ruby/parse-cron |
23123 |
- dev-ruby/treetop |
23124 |
- dev-ruby/xml-simple |
23125 |
- dev-ruby/zendesk_api |
23126 |
- dev-ruby/ffi-rzmq |
23127 |
- dev-ruby/ffi-rzmq-core |
23128 |
- dev-ruby/rqrcode |
23129 |
- dev-ruby/rqrcode_core |
23130 |
- dev-ruby/chunky_png |
23131 |
- dev-ruby/rotp |
23132 |
- dev-ruby/rake |
23133 |
- dev-ruby/ruby-net-ldap |
23134 |
- dev-ruby/curb |
23135 |
- dev-ruby/rubygems |
23136 |
- dev-libs/log4cpp ) |
23137 |
- mysql? ( virtual/mysql ) |
23138 |
- dev-db/sqlite |
23139 |
- net-misc/openssh |
23140 |
- net-fs/nfs-utils |
23141 |
- dev-db/mariadb |
23142 |
- net-libs/zeromq |
23143 |
- dev-ruby/json |
23144 |
- dev-ruby/sequel |
23145 |
- dev-ruby/sinatra |
23146 |
- dev-ruby/thin |
23147 |
- dev-ruby/nokogiri |
23148 |
- sunstone? ( dev-ruby/rack ) |
23149 |
- || ( app-cdr/cdrkit app-cdr/cdrtools ) |
23150 |
- sqlite? ( dev-ruby/sqlite3 ) |
23151 |
- qemu? ( app-emulation/libvirt[libvirtd,qemu] ) |
23152 |
- xen? ( app-emulation/xen-tools )" |
23153 |
-DEPEND="${RDEPEND} |
23154 |
- dev-lang/ruby:2.5 |
23155 |
- >=dev-util/scons-3.0.0 |
23156 |
- dev-ruby/bundler |
23157 |
- dev-nodejs/grunt |
23158 |
- dev-nodejs/bower |
23159 |
- dev-nodejs/ini |
23160 |
- dev-nodejs/braces |
23161 |
- net-libs/nodejs[npm] |
23162 |
- net-libs/libvncserver |
23163 |
- app-text/ronn |
23164 |
- dev-ruby/builder |
23165 |
- dev-ruby/highline |
23166 |
- dev-ruby/ipaddress:1 |
23167 |
- docker? ( dev-go/dep )" |
23168 |
- |
23169 |
-# make sure no eclass is running tests |
23170 |
-RESTRICT="test" |
23171 |
- |
23172 |
-S="${WORKDIR}/${MY_P}" |
23173 |
- |
23174 |
-ONEUSER="oneadmin" |
23175 |
-ONEGROUP="oneadmin" |
23176 |
- |
23177 |
-PATCHES=( |
23178 |
- "${FILESDIR}/patches/install.sh.${PV}.patch" |
23179 |
- "${FILESDIR}/patches/node-sass.${PV}.patch" |
23180 |
- "${FILESDIR}/patches/fix_kvm_emulator.${PV}.patch" |
23181 |
- "${FILESDIR}/patches/package.js.${PV}.patch" |
23182 |
-) |
23183 |
- |
23184 |
-test_netsandbox() { |
23185 |
- if use sunstone; then |
23186 |
- elog "Opennebula hotfix releases needs to build sunstone without network sandbox restriction." |
23187 |
- has network-sandbox ${FEATURES} && die "Please disable feature network-sandbox: -network-sandbox" |
23188 |
- fi |
23189 |
- if use docker; then |
23190 |
- elog "Opennebula releases needs to build docker without network sandbox restriction." |
23191 |
- has network-sandbox ${FEATURES} && die "Please disable feature network-sandbox: -network-sandbox" |
23192 |
- fi |
23193 |
-} |
23194 |
- |
23195 |
-pkg_pretend() { |
23196 |
- test_netsandbox |
23197 |
-} |
23198 |
- |
23199 |
-pkg_setup () { |
23200 |
- test_netsandbox |
23201 |
- enewgroup ${ONEGROUP} |
23202 |
- enewuser ${ONEUSER} -1 /bin/bash /var/lib/one ${ONEGROUP} |
23203 |
-} |
23204 |
- |
23205 |
-src_unpack() { |
23206 |
- default |
23207 |
-} |
23208 |
- |
23209 |
-src_prepare() { |
23210 |
- default |
23211 |
- eapply_user |
23212 |
- #EPATCH_SOURCE="${FILESDIR}/patches" EPATCH_SUFFIX="patch" EPATCH_FORCE="yes" epatch |
23213 |
- |
23214 |
- # install missing source file |
23215 |
- #cp "${FILESDIR}"/${P}/parsers/* "${S}"/src/parsers/ || die "copy parsers files failed" |
23216 |
- |
23217 |
- # set correct lib path |
23218 |
- use docker && make -C src/docker_machine/src/docker_machine vendor |
23219 |
- for f in $(grep -rlI "/usr/lib/one" .); do sed -i -e "s/\/usr\/lib\/one/\/usr\/$(get_libdir)\/one/g" $f; done || die "correct lib dir failed" |
23220 |
- |
23221 |
- # As we install from the github release sources we need to build sunstone as well. |
23222 |
- # To do that we need the npm environment set up |
23223 |
- # https://docs.opennebula.org/5.4/integration/references/sunstone_dev.html#sunstone-dev |
23224 |
- pushd src/sunstone/public/ >/dev/null |
23225 |
- ./build.sh -d || die "Install required dependencies for npm and bower failed." |
23226 |
- #export PATH=$PATH:$PWD/node_modules/.bin |
23227 |
- #./build.sh || die "Prepare minified files failed." |
23228 |
- popd >/dev/null |
23229 |
-} |
23230 |
- |
23231 |
-src_configure() { |
23232 |
- : |
23233 |
-} |
23234 |
- |
23235 |
-src_compile() { |
23236 |
- # manual pages |
23237 |
- if use doc; then |
23238 |
- pushd ${S}/share/man >/dev/null |
23239 |
- ./build.sh |
23240 |
- popd >/dev/null |
23241 |
- fi |
23242 |
- |
23243 |
- ########################################################################### |
23244 |
- ## ## |
23245 |
- ## It is highly recommended that you read the documentation and tweak ## |
23246 |
- ## the PKGBUILD accordingly: ## |
23247 |
- ## http://docs.opennebula.org/stable/integration/references/compile.html ## |
23248 |
- ## ## |
23249 |
- ########################################################################### |
23250 |
- local myconf |
23251 |
- myconf+="parsers=yes " |
23252 |
- use extras && myconf+="new_xmlrpc=yes " |
23253 |
- use mysql && myconf+="mysql=yes " || myconf+="mysql=no " |
23254 |
- use sunstone && myconf+="sunstone=yes " |
23255 |
- use docker && myconf+="docker_machine=yes " |
23256 |
- use systemd && myconf+="systemd=yes " |
23257 |
- use vnc && myconf+="svncterm=yes " |
23258 |
- python3 $(which scons) \ |
23259 |
- ${myconf} \ |
23260 |
- $(sed -r 's/.*(-j\s*|--jobs=)([0-9]+).*/-j\2/' <<< ${MAKEOPTS}) \ |
23261 |
- || die "building ${PN} failed" |
23262 |
-} |
23263 |
- |
23264 |
-src_install() { |
23265 |
- # Prepare installation |
23266 |
- keepdir /var/{lib,run}/${PN} || die "keepdir failed" |
23267 |
- |
23268 |
- dodir /usr/$(get_libdir)/one |
23269 |
- dodir /var/log/one |
23270 |
- dodir /var/lib/one |
23271 |
- dodir /var/tmp/one |
23272 |
- dodir /var/lib/one |
23273 |
- dodir /var/lib/one/vms |
23274 |
- dodir /usr/share/one |
23275 |
- dodir /etc/tmpfiles.d |
23276 |
- |
23277 |
- # Installing Opennebula |
23278 |
- DESTDIR="${T}" ./install.sh -u ${ONEUSER} -g ${ONEGROUP} || die "install opennebula core failed" |
23279 |
- use extras && DESTDIR="${T}" ./install.sh -u ${ONEUSER} -g ${ONEGROUP} -c || die "install opennebula client tools failed" |
23280 |
- use docker && DESTDIR="${T}" ./install.sh -u ${ONEUSER} -g ${ONEGROUP} -e -k || die "install docker machine failed" |
23281 |
- |
23282 |
- pushd "${T}" >/dev/null |
23283 |
- # Clean files |
23284 |
- rm -rf etc/{logrotate.d,sudoers.d} lib/ var/{lock,run} |
23285 |
- |
23286 |
- # setup etc |
23287 |
- insinto /etc |
23288 |
- doins -r etc/one |
23289 |
- rm -rf etc/one |
23290 |
- |
23291 |
- insinto /etc/one |
23292 |
- insopts -m 0640 |
23293 |
- doins "${FILESDIR}/one_auth" |
23294 |
- |
23295 |
- insinto /etc/tmpfiles.d |
23296 |
- insopts -m 0644 |
23297 |
- doins "${FILESDIR}"/tmpfiles.d/* |
23298 |
- |
23299 |
- insinto /etc/logrotate.d |
23300 |
- doins "${FILESDIR}"/logrotate/* |
23301 |
- |
23302 |
- insinto /etc/sudoers.d |
23303 |
- doins "${FILESDIR}"/sudoers/* |
23304 |
- |
23305 |
- # set binaries executable |
23306 |
- into /usr |
23307 |
- dobin usr/bin/* |
23308 |
- |
23309 |
- cp -a usr/$(get_libdir)/one/* "${ED}"/usr/$(get_libdir)/one/ |
23310 |
- cp -a usr/share/one/* "${ED}"/usr/share/one/ |
23311 |
- cp -a var/lib/one/* "${ED}"/var/lib/one/ |
23312 |
- rm -rf usr/bin usr/$(get_libdir)/one usr/share/one var/lib/one |
23313 |
- |
23314 |
- # add documentation |
23315 |
- dodoc usr/share/docs/one/* |
23316 |
- rm -rf usr/share/docs |
23317 |
- |
23318 |
- # install remaining files |
23319 |
- insinto /usr/share/man |
23320 |
- doins -r usr/share/man/man1/ |
23321 |
- |
23322 |
- # set correct owner |
23323 |
- fowners -R ${ONEUSER}:${ONEGROUP} /etc/one /usr/$(get_libdir)/one /usr/share/one /var/lib/{one,opennebula} /var/log/one /var/tmp/one |
23324 |
- |
23325 |
- # install daemon files |
23326 |
- if use systemd; then |
23327 |
- systemd_dounit "${FILESDIR}"/systemd/*.service |
23328 |
- else |
23329 |
- doenvd "${FILESDIR}/openrc/99one" |
23330 |
- newinitd "${FILESDIR}/openrc/opennebula.initd" opennebula |
23331 |
- newinitd "${FILESDIR}/openrc/sunstone-server.initd" sunstone-server |
23332 |
- newinitd "${FILESDIR}/openrc/oneflow-server.initd" oneflow-server |
23333 |
- newconfd "${FILESDIR}/openrc/opennebula.confd" opennebula |
23334 |
- newconfd "${FILESDIR}/openrc/sunstone-server.confd" sunstone-server |
23335 |
- newconfd "${FILESDIR}/openrc/oneflow-server.confd" oneflow-server |
23336 |
- fi |
23337 |
- |
23338 |
- popd >/dev/null |
23339 |
- |
23340 |
-} |
23341 |
- |
23342 |
-pkg_postinst() { |
23343 |
- |
23344 |
- #chown -R oneadmin:oneadmin ${ROOT}var/{lock,lib,log,run,tmp}/one |
23345 |
- #chown -R oneadmin:oneadmin ${ROOT}usr/share/one |
23346 |
- #chown -R oneadmin:oneadmin ${ROOT}etc/one |
23347 |
- #chown -R oneadmin:oneadmin ${ROOT}usr/$(get_libdir)/one |
23348 |
- |
23349 |
- local onedir="${EROOT}var/lib/one" |
23350 |
- if [ ! -d "${onedir}/.ssh" ] ; then |
23351 |
- #einfo "Generating ssh-key..." |
23352 |
- #umask 0027 || die "setting umask failed" |
23353 |
- #mkdir "${onedir}/.ssh" || die "creating ssh directory failed" |
23354 |
- #ssh-keygen -q -t rsa -N "" -f "${onedir}/.ssh/id_rsa" || die "ssh-keygen failed" |
23355 |
- #cat > "${onedir}/.ssh/config" <<EOF |
23356 |
-#UserKnownHostsFile /dev/null |
23357 |
-#Host * |
23358 |
-# StrictHostKeyChecking no |
23359 |
-#EOF |
23360 |
- #cat "${onedir}/.ssh/id_rsa.pub" >> "${onedir}/.ssh/authorized_keys" || die "adding key failed" |
23361 |
- #chown -R ${ONEUSER}:${ONEGROUP} "${onedir}/.ssh" || die "changing owner failed" |
23362 |
- elog "Create directory ${onedir}/.ssh with umask 0027." |
23363 |
- elog "Then generate ssh key using proper cypher algorithm (at least rsa)." |
23364 |
- elog "Add public key to ${ONEUSER} authorized_keys:" |
23365 |
- elog "cat ${onedir}/.ssh/id_rsa.pub >> ${onedir}/.ssh/authorized_keys" |
23366 |
- elog "${ONEUSER} ssh config for any host with" |
23367 |
- elog "StrictHostKeyChecking no" |
23368 |
- elog "and" |
23369 |
- elog "UserKnownHostsFile /dev/null" |
23370 |
- elog "In the end set correct owner to ${ONEUSER}:" |
23371 |
- elog "chown -R ${ONEUSER}:${ONEGROUP} ${onedir}/.ssh" |
23372 |
- fi |
23373 |
- |
23374 |
- if use qemu ; then |
23375 |
- elog "Make sure that the user ${ONEUSER} has access to the libvirt control socket" |
23376 |
- elog " /var/run/libvirt/libvirt-sock" |
23377 |
- elog "You can easily check this by executing the following command as ${ONEUSER} user" |
23378 |
- elog " virsh -c qemu:///system nodeinfo" |
23379 |
- elog "If not using using policykit in libvirt, the file you should take a look at is:" |
23380 |
- elog " /etc/libvirt/libvirtd.conf (look for the unix_sock_*_perms parameters)" |
23381 |
- elog "Failure to do so may lead to nodes hanging in PENDING state forever without further notice." |
23382 |
- echo "" |
23383 |
- elog "Should a node hang in PENDING state even with correct permissions, try the following to get more information." |
23384 |
- elog "In /tmp/one-im execute the following command for the biggest one_im-* file:" |
23385 |
- elog " ruby -wd one_im-???" |
23386 |
- echo "" |
23387 |
- elog "OpenNebula doesn't allow you to specify the disc format." |
23388 |
- elog "Unfortunately the default in libvirt is not to guess and" |
23389 |
- elog "it therefores assumes a 'raw' format when using qemu/kvm." |
23390 |
- elog "Set 'allow_disk_format_probing = 0' in /etc/libvirt/qemu.conf" |
23391 |
- elog "to work around this until OpenNebula fixes it." |
23392 |
- fi |
23393 |
- |
23394 |
- elog "If you wish to use the sunstone server, please issue the command" |
23395 |
- #elog "/usr/share/one/install_gems as oneadmin user" |
23396 |
- elog "gem install sequel thin json rack sinatra builder treetop zendesk_api mysql parse-cron" |
23397 |
- |
23398 |
-} |
23399 |
- |