From f92f0f9bcb54167331067b6891ee33e5f27d691c Mon Sep 17 00:00:00 2001 From: Brian Aker Date: Fri, 22 Jul 2011 11:53:18 -0700 Subject: [PATCH] Move options directory to csl. --- libmemcached/{options => csl}/context.h | 2 +- libmemcached/csl/include.am | 19 +++ libmemcached/{options => csl}/parser.am | 14 +- libmemcached/{options => csl}/parser.cc | 142 ++++++++++---------- libmemcached/{options => csl}/parser.h | 0 libmemcached/{options => csl}/parser.yy | 12 +- libmemcached/{options => csl}/scanner.cc | 158 +++++++++++------------ libmemcached/{options => csl}/scanner.h | 16 +-- libmemcached/{options => csl}/scanner.l | 10 +- libmemcached/{options => csl}/server.h | 2 +- libmemcached/{options => csl}/symbol.h | 4 +- libmemcached/include.am | 4 +- libmemcached/options.cc | 2 +- libmemcached/options/include.am | 19 --- 14 files changed, 202 insertions(+), 202 deletions(-) rename libmemcached/{options => csl}/context.h (99%) create mode 100644 libmemcached/csl/include.am rename libmemcached/{options => csl}/parser.am (65%) rename libmemcached/{options => csl}/parser.cc (95%) rename libmemcached/{options => csl}/parser.h (100%) rename libmemcached/{options => csl}/parser.yy (97%) rename libmemcached/{options => csl}/scanner.cc (96%) rename libmemcached/{options => csl}/scanner.h (96%) rename libmemcached/{options => csl}/scanner.l (96%) rename libmemcached/{options => csl}/server.h (98%) rename libmemcached/{options => csl}/symbol.h (96%) delete mode 100644 libmemcached/options/include.am diff --git a/libmemcached/options/context.h b/libmemcached/csl/context.h similarity index 99% rename from libmemcached/options/context.h rename to libmemcached/csl/context.h index 2597b196..ce7b0316 100644 --- a/libmemcached/options/context.h +++ b/libmemcached/csl/context.h @@ -1,6 +1,6 @@ /* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: * - * Libmemcached library + * Configure Scripting Language * * Copyright (C) 2011 Data Differential, http://datadifferential.com/ * All rights reserved. diff --git a/libmemcached/csl/include.am b/libmemcached/csl/include.am new file mode 100644 index 00000000..3081b3f3 --- /dev/null +++ b/libmemcached/csl/include.am @@ -0,0 +1,19 @@ +# vim:ft=automake +# included from Top Level Makefile.am +# All paths should be given relative to the root + +DISTCLEANFILES+= \ + libmemcached/csl/parser.output + +noinst_HEADERS+= \ + libmemcached/csl/context.h \ + libmemcached/csl/parser.h \ + libmemcached/csl/scanner.h \ + libmemcached/csl/server.h \ + libmemcached/csl/symbol.h + +libmemcached_libmemcached_la_SOURCES+= \ + libmemcached/csl/parser.cc \ + libmemcached/csl/scanner.cc + +include libmemcached/csl/parser.am diff --git a/libmemcached/options/parser.am b/libmemcached/csl/parser.am similarity index 65% rename from libmemcached/options/parser.am rename to libmemcached/csl/parser.am index 8bf6b65f..b5f93c2f 100644 --- a/libmemcached/options/parser.am +++ b/libmemcached/csl/parser.am @@ -1,6 +1,6 @@ # vim:ft=automake # -# Libmemcached Scanner and Parser +# Configure Scripting Language # # Copyright (C) 2011 DataDifferental, http://datadifferential.com # @@ -18,15 +18,15 @@ # along with this program. If not, see . EXTRA_DIST+= \ - libmemcached/options/parser.yy \ - libmemcached/options/scanner.l + libmemcached/csl/parser.yy \ + libmemcached/csl/scanner.l -libmemcached/options/parser.h: libmemcached/options/parser.cc +libmemcached/csl/parser.h: libmemcached/csl/parser.cc -libmemcached/options/parser.cc: libmemcached/options/parser.yy libmemcached/options/scanner.l libmemcached/options/scanner.h +libmemcached/csl/parser.cc: libmemcached/csl/parser.yy libmemcached/csl/scanner.l libmemcached/csl/scanner.h $(AM_V_YACC)$(am__skipyacc) $(YACC) $(YLFLAGS) $(AM_YFLAGS) -o $@ $< -libmemcached/options/scanner.h: libmemcached/options/scanner.cc +libmemcached/csl/scanner.h: libmemcached/csl/scanner.cc -libmemcached/options/scanner.cc: libmemcached/options/scanner.l libmemcached/options/parser.yy +libmemcached/csl/scanner.cc: libmemcached/csl/scanner.l libmemcached/csl/parser.yy $(AM_V_GEN)$(LEX) $< diff --git a/libmemcached/options/parser.cc b/libmemcached/csl/parser.cc similarity index 95% rename from libmemcached/options/parser.cc rename to libmemcached/csl/parser.cc index 839444ba..40e8263e 100644 --- a/libmemcached/options/parser.cc +++ b/libmemcached/csl/parser.cc @@ -75,15 +75,15 @@ /* Copy the first part of user declarations. */ /* Line 189 of yacc.c */ -#line 36 "libmemcached/options/parser.yy" +#line 36 "libmemcached/csl/parser.yy" #include #include -#include -#include -#include +#include +#include +#include #include @@ -102,7 +102,7 @@ inline void config_error(Context *context, yyscan_t *scanner, const char *error) /* Line 189 of yacc.c */ -#line 106 "libmemcached/options/parser.cc" +#line 106 "libmemcached/csl/parser.cc" /* Enabling traces. */ #ifndef YYDEBUG @@ -214,7 +214,7 @@ inline void config_error(Context *context, yyscan_t *scanner, const char *error) /* Line 264 of yacc.c */ -#line 218 "libmemcached/options/parser.cc" +#line 218 "libmemcached/csl/parser.cc" #ifdef short # undef short @@ -1521,28 +1521,28 @@ yyreduce: case 4: /* Line 1464 of yacc.c */ -#line 164 "libmemcached/options/parser.yy" +#line 164 "libmemcached/csl/parser.yy" { ;} break; case 5: /* Line 1464 of yacc.c */ -#line 166 "libmemcached/options/parser.yy" +#line 166 "libmemcached/csl/parser.yy" { ;} break; case 6: /* Line 1464 of yacc.c */ -#line 168 "libmemcached/options/parser.yy" +#line 168 "libmemcached/csl/parser.yy" { ;} break; case 7: /* Line 1464 of yacc.c */ -#line 170 "libmemcached/options/parser.yy" +#line 170 "libmemcached/csl/parser.yy" { context->set_end(); YYACCEPT; @@ -1552,7 +1552,7 @@ yyreduce: case 8: /* Line 1464 of yacc.c */ -#line 175 "libmemcached/options/parser.yy" +#line 175 "libmemcached/csl/parser.yy" { context->rc= MEMCACHED_PARSE_USER_ERROR; parser_abort(context, NULL); @@ -1562,7 +1562,7 @@ yyreduce: case 9: /* Line 1464 of yacc.c */ -#line 180 "libmemcached/options/parser.yy" +#line 180 "libmemcached/csl/parser.yy" { memcached_reset(context->memc); ;} @@ -1571,7 +1571,7 @@ yyreduce: case 10: /* Line 1464 of yacc.c */ -#line 184 "libmemcached/options/parser.yy" +#line 184 "libmemcached/csl/parser.yy" { yydebug= 1; ;} @@ -1580,7 +1580,7 @@ yyreduce: case 11: /* Line 1464 of yacc.c */ -#line 188 "libmemcached/options/parser.yy" +#line 188 "libmemcached/csl/parser.yy" { if ((context->rc= memcached_parse_configure_file(*context->memc, (yyvsp[(3) - (3)].string).c_str, (yyvsp[(3) - (3)].string).size)) != MEMCACHED_SUCCESS) { @@ -1592,7 +1592,7 @@ yyreduce: case 12: /* Line 1464 of yacc.c */ -#line 199 "libmemcached/options/parser.yy" +#line 199 "libmemcached/csl/parser.yy" { if (memcached_failed(context->rc= memcached_server_add_with_weight(context->memc, (yyvsp[(2) - (4)].server).c_str, (yyvsp[(3) - (4)].number), (yyvsp[(4) - (4)].number)))) { @@ -1605,7 +1605,7 @@ yyreduce: case 13: /* Line 1464 of yacc.c */ -#line 207 "libmemcached/options/parser.yy" +#line 207 "libmemcached/csl/parser.yy" { if (memcached_failed(context->rc= memcached_server_add_with_weight(context->memc, (yyvsp[(2) - (4)].server).c_str, (yyvsp[(3) - (4)].number), (yyvsp[(4) - (4)].number)))) { @@ -1618,7 +1618,7 @@ yyreduce: case 14: /* Line 1464 of yacc.c */ -#line 215 "libmemcached/options/parser.yy" +#line 215 "libmemcached/csl/parser.yy" { if (memcached_failed(context->rc= memcached_server_add_unix_socket_with_weight(context->memc, (yyvsp[(2) - (3)].string).c_str, (yyvsp[(3) - (3)].number)))) { @@ -1630,7 +1630,7 @@ yyreduce: case 15: /* Line 1464 of yacc.c */ -#line 222 "libmemcached/options/parser.yy" +#line 222 "libmemcached/csl/parser.yy" { memcached_set_configuration_file(context->memc, (yyvsp[(2) - (2)].string).c_str, (yyvsp[(2) - (2)].string).size); ;} @@ -1639,7 +1639,7 @@ yyreduce: case 16: /* Line 1464 of yacc.c */ -#line 226 "libmemcached/options/parser.yy" +#line 226 "libmemcached/csl/parser.yy" { context->memc->configure.initial_pool_size= (yyvsp[(2) - (2)].number); ;} @@ -1648,7 +1648,7 @@ yyreduce: case 17: /* Line 1464 of yacc.c */ -#line 230 "libmemcached/options/parser.yy" +#line 230 "libmemcached/csl/parser.yy" { context->memc->configure.max_pool_size= (yyvsp[(2) - (2)].number); ;} @@ -1657,7 +1657,7 @@ yyreduce: case 19: /* Line 1464 of yacc.c */ -#line 238 "libmemcached/options/parser.yy" +#line 238 "libmemcached/csl/parser.yy" { if ((context->rc= memcached_set_namespace(context->memc, (yyvsp[(2) - (2)].string).c_str, (yyvsp[(2) - (2)].string).size)) != MEMCACHED_SUCCESS) { @@ -1669,7 +1669,7 @@ yyreduce: case 20: /* Line 1464 of yacc.c */ -#line 245 "libmemcached/options/parser.yy" +#line 245 "libmemcached/csl/parser.yy" { if ((context->rc= memcached_behavior_set(context->memc, MEMCACHED_BEHAVIOR_DISTRIBUTION, (yyvsp[(2) - (2)].distribution))) != MEMCACHED_SUCCESS) { @@ -1681,7 +1681,7 @@ yyreduce: case 21: /* Line 1464 of yacc.c */ -#line 252 "libmemcached/options/parser.yy" +#line 252 "libmemcached/csl/parser.yy" { if ((context->rc= memcached_behavior_set(context->memc, MEMCACHED_BEHAVIOR_DISTRIBUTION, (yyvsp[(2) - (4)].distribution))) != MEMCACHED_SUCCESS) { @@ -1697,7 +1697,7 @@ yyreduce: case 22: /* Line 1464 of yacc.c */ -#line 263 "libmemcached/options/parser.yy" +#line 263 "libmemcached/csl/parser.yy" { if ((context->rc= memcached_behavior_set(context->memc, MEMCACHED_BEHAVIOR_HASH, (yyvsp[(2) - (2)].hash))) != MEMCACHED_SUCCESS) { @@ -1709,7 +1709,7 @@ yyreduce: case 23: /* Line 1464 of yacc.c */ -#line 270 "libmemcached/options/parser.yy" +#line 270 "libmemcached/csl/parser.yy" { if ((context->rc= memcached_behavior_set(context->memc, (yyvsp[(1) - (2)].behavior), (yyvsp[(2) - (2)].number))) != MEMCACHED_SUCCESS) { @@ -1721,7 +1721,7 @@ yyreduce: case 24: /* Line 1464 of yacc.c */ -#line 277 "libmemcached/options/parser.yy" +#line 277 "libmemcached/csl/parser.yy" { if ((context->rc= memcached_behavior_set(context->memc, (yyvsp[(1) - (1)].behavior), true)) != MEMCACHED_SUCCESS) { @@ -1733,7 +1733,7 @@ yyreduce: case 25: /* Line 1464 of yacc.c */ -#line 284 "libmemcached/options/parser.yy" +#line 284 "libmemcached/csl/parser.yy" { ;} break; @@ -1741,7 +1741,7 @@ yyreduce: case 26: /* Line 1464 of yacc.c */ -#line 290 "libmemcached/options/parser.yy" +#line 290 "libmemcached/csl/parser.yy" { (yyval.behavior)= MEMCACHED_BEHAVIOR_REMOVE_FAILED_SERVERS; ;} @@ -1750,7 +1750,7 @@ yyreduce: case 27: /* Line 1464 of yacc.c */ -#line 294 "libmemcached/options/parser.yy" +#line 294 "libmemcached/csl/parser.yy" { (yyval.behavior)= MEMCACHED_BEHAVIOR_CONNECT_TIMEOUT; ;} @@ -1759,7 +1759,7 @@ yyreduce: case 28: /* Line 1464 of yacc.c */ -#line 298 "libmemcached/options/parser.yy" +#line 298 "libmemcached/csl/parser.yy" { (yyval.behavior)= MEMCACHED_BEHAVIOR_IO_MSG_WATERMARK; ;} @@ -1768,7 +1768,7 @@ yyreduce: case 29: /* Line 1464 of yacc.c */ -#line 302 "libmemcached/options/parser.yy" +#line 302 "libmemcached/csl/parser.yy" { (yyval.behavior)= MEMCACHED_BEHAVIOR_IO_BYTES_WATERMARK; ;} @@ -1777,7 +1777,7 @@ yyreduce: case 30: /* Line 1464 of yacc.c */ -#line 306 "libmemcached/options/parser.yy" +#line 306 "libmemcached/csl/parser.yy" { (yyval.behavior)= MEMCACHED_BEHAVIOR_IO_KEY_PREFETCH; ;} @@ -1786,7 +1786,7 @@ yyreduce: case 31: /* Line 1464 of yacc.c */ -#line 310 "libmemcached/options/parser.yy" +#line 310 "libmemcached/csl/parser.yy" { (yyval.behavior)= MEMCACHED_BEHAVIOR_NUMBER_OF_REPLICAS; ;} @@ -1795,7 +1795,7 @@ yyreduce: case 32: /* Line 1464 of yacc.c */ -#line 314 "libmemcached/options/parser.yy" +#line 314 "libmemcached/csl/parser.yy" { (yyval.behavior)= MEMCACHED_BEHAVIOR_POLL_TIMEOUT; ;} @@ -1804,7 +1804,7 @@ yyreduce: case 33: /* Line 1464 of yacc.c */ -#line 318 "libmemcached/options/parser.yy" +#line 318 "libmemcached/csl/parser.yy" { (yyval.behavior)= MEMCACHED_BEHAVIOR_RCV_TIMEOUT; ;} @@ -1813,7 +1813,7 @@ yyreduce: case 34: /* Line 1464 of yacc.c */ -#line 322 "libmemcached/options/parser.yy" +#line 322 "libmemcached/csl/parser.yy" { (yyval.behavior)= MEMCACHED_BEHAVIOR_RETRY_TIMEOUT; ;} @@ -1822,7 +1822,7 @@ yyreduce: case 35: /* Line 1464 of yacc.c */ -#line 326 "libmemcached/options/parser.yy" +#line 326 "libmemcached/csl/parser.yy" { (yyval.behavior)= MEMCACHED_BEHAVIOR_SND_TIMEOUT; ;} @@ -1831,7 +1831,7 @@ yyreduce: case 36: /* Line 1464 of yacc.c */ -#line 330 "libmemcached/options/parser.yy" +#line 330 "libmemcached/csl/parser.yy" { (yyval.behavior)= MEMCACHED_BEHAVIOR_SOCKET_RECV_SIZE; ;} @@ -1840,7 +1840,7 @@ yyreduce: case 37: /* Line 1464 of yacc.c */ -#line 334 "libmemcached/options/parser.yy" +#line 334 "libmemcached/csl/parser.yy" { (yyval.behavior)= MEMCACHED_BEHAVIOR_SOCKET_SEND_SIZE; ;} @@ -1849,7 +1849,7 @@ yyreduce: case 38: /* Line 1464 of yacc.c */ -#line 341 "libmemcached/options/parser.yy" +#line 341 "libmemcached/csl/parser.yy" { (yyval.behavior)= MEMCACHED_BEHAVIOR_BINARY_PROTOCOL; ;} @@ -1858,7 +1858,7 @@ yyreduce: case 39: /* Line 1464 of yacc.c */ -#line 345 "libmemcached/options/parser.yy" +#line 345 "libmemcached/csl/parser.yy" { (yyval.behavior)= MEMCACHED_BEHAVIOR_BUFFER_REQUESTS; ;} @@ -1867,7 +1867,7 @@ yyreduce: case 40: /* Line 1464 of yacc.c */ -#line 349 "libmemcached/options/parser.yy" +#line 349 "libmemcached/csl/parser.yy" { (yyval.behavior)= MEMCACHED_BEHAVIOR_HASH_WITH_PREFIX_KEY; ;} @@ -1876,7 +1876,7 @@ yyreduce: case 41: /* Line 1464 of yacc.c */ -#line 353 "libmemcached/options/parser.yy" +#line 353 "libmemcached/csl/parser.yy" { (yyval.behavior)= MEMCACHED_BEHAVIOR_NOREPLY; ;} @@ -1885,7 +1885,7 @@ yyreduce: case 42: /* Line 1464 of yacc.c */ -#line 357 "libmemcached/options/parser.yy" +#line 357 "libmemcached/csl/parser.yy" { (yyval.behavior)= MEMCACHED_BEHAVIOR_RANDOMIZE_REPLICA_READ; ;} @@ -1894,7 +1894,7 @@ yyreduce: case 43: /* Line 1464 of yacc.c */ -#line 361 "libmemcached/options/parser.yy" +#line 361 "libmemcached/csl/parser.yy" { (yyval.behavior)= MEMCACHED_BEHAVIOR_SORT_HOSTS; ;} @@ -1903,7 +1903,7 @@ yyreduce: case 44: /* Line 1464 of yacc.c */ -#line 365 "libmemcached/options/parser.yy" +#line 365 "libmemcached/csl/parser.yy" { (yyval.behavior)= MEMCACHED_BEHAVIOR_SUPPORT_CAS; ;} @@ -1912,7 +1912,7 @@ yyreduce: case 45: /* Line 1464 of yacc.c */ -#line 369 "libmemcached/options/parser.yy" +#line 369 "libmemcached/csl/parser.yy" { (yyval.behavior)= MEMCACHED_BEHAVIOR_TCP_NODELAY; ;} @@ -1921,7 +1921,7 @@ yyreduce: case 46: /* Line 1464 of yacc.c */ -#line 373 "libmemcached/options/parser.yy" +#line 373 "libmemcached/csl/parser.yy" { (yyval.behavior)= MEMCACHED_BEHAVIOR_TCP_KEEPALIVE; ;} @@ -1930,7 +1930,7 @@ yyreduce: case 47: /* Line 1464 of yacc.c */ -#line 377 "libmemcached/options/parser.yy" +#line 377 "libmemcached/csl/parser.yy" { (yyval.behavior)= MEMCACHED_BEHAVIOR_TCP_KEEPIDLE; ;} @@ -1939,7 +1939,7 @@ yyreduce: case 48: /* Line 1464 of yacc.c */ -#line 381 "libmemcached/options/parser.yy" +#line 381 "libmemcached/csl/parser.yy" { (yyval.behavior)= MEMCACHED_BEHAVIOR_USE_UDP; ;} @@ -1948,7 +1948,7 @@ yyreduce: case 49: /* Line 1464 of yacc.c */ -#line 385 "libmemcached/options/parser.yy" +#line 385 "libmemcached/csl/parser.yy" { (yyval.behavior)= MEMCACHED_BEHAVIOR_VERIFY_KEY; ;} @@ -1957,35 +1957,35 @@ yyreduce: case 50: /* Line 1464 of yacc.c */ -#line 391 "libmemcached/options/parser.yy" +#line 391 "libmemcached/csl/parser.yy" { (yyval.number)= MEMCACHED_DEFAULT_PORT;;} break; case 51: /* Line 1464 of yacc.c */ -#line 393 "libmemcached/options/parser.yy" +#line 393 "libmemcached/csl/parser.yy" { ;} break; case 52: /* Line 1464 of yacc.c */ -#line 397 "libmemcached/options/parser.yy" +#line 397 "libmemcached/csl/parser.yy" { (yyval.number)= 1; ;} break; case 53: /* Line 1464 of yacc.c */ -#line 399 "libmemcached/options/parser.yy" +#line 399 "libmemcached/csl/parser.yy" { ;} break; case 54: /* Line 1464 of yacc.c */ -#line 404 "libmemcached/options/parser.yy" +#line 404 "libmemcached/csl/parser.yy" { (yyval.hash)= MEMCACHED_HASH_MD5; ;} @@ -1994,7 +1994,7 @@ yyreduce: case 55: /* Line 1464 of yacc.c */ -#line 408 "libmemcached/options/parser.yy" +#line 408 "libmemcached/csl/parser.yy" { (yyval.hash)= MEMCACHED_HASH_CRC; ;} @@ -2003,7 +2003,7 @@ yyreduce: case 56: /* Line 1464 of yacc.c */ -#line 412 "libmemcached/options/parser.yy" +#line 412 "libmemcached/csl/parser.yy" { (yyval.hash)= MEMCACHED_HASH_FNV1_64; ;} @@ -2012,7 +2012,7 @@ yyreduce: case 57: /* Line 1464 of yacc.c */ -#line 416 "libmemcached/options/parser.yy" +#line 416 "libmemcached/csl/parser.yy" { (yyval.hash)= MEMCACHED_HASH_FNV1A_64; ;} @@ -2021,7 +2021,7 @@ yyreduce: case 58: /* Line 1464 of yacc.c */ -#line 420 "libmemcached/options/parser.yy" +#line 420 "libmemcached/csl/parser.yy" { (yyval.hash)= MEMCACHED_HASH_FNV1_32; ;} @@ -2030,7 +2030,7 @@ yyreduce: case 59: /* Line 1464 of yacc.c */ -#line 424 "libmemcached/options/parser.yy" +#line 424 "libmemcached/csl/parser.yy" { (yyval.hash)= MEMCACHED_HASH_FNV1A_32; ;} @@ -2039,7 +2039,7 @@ yyreduce: case 60: /* Line 1464 of yacc.c */ -#line 428 "libmemcached/options/parser.yy" +#line 428 "libmemcached/csl/parser.yy" { (yyval.hash)= MEMCACHED_HASH_HSIEH; ;} @@ -2048,7 +2048,7 @@ yyreduce: case 61: /* Line 1464 of yacc.c */ -#line 432 "libmemcached/options/parser.yy" +#line 432 "libmemcached/csl/parser.yy" { (yyval.hash)= MEMCACHED_HASH_MURMUR; ;} @@ -2057,7 +2057,7 @@ yyreduce: case 62: /* Line 1464 of yacc.c */ -#line 436 "libmemcached/options/parser.yy" +#line 436 "libmemcached/csl/parser.yy" { (yyval.hash)= MEMCACHED_HASH_JENKINS; ;} @@ -2066,7 +2066,7 @@ yyreduce: case 63: /* Line 1464 of yacc.c */ -#line 443 "libmemcached/options/parser.yy" +#line 443 "libmemcached/csl/parser.yy" { (yyval.string)= (yyvsp[(1) - (1)].string); ;} @@ -2075,7 +2075,7 @@ yyreduce: case 64: /* Line 1464 of yacc.c */ -#line 447 "libmemcached/options/parser.yy" +#line 447 "libmemcached/csl/parser.yy" { (yyval.string)= (yyvsp[(1) - (1)].string); ;} @@ -2084,7 +2084,7 @@ yyreduce: case 65: /* Line 1464 of yacc.c */ -#line 454 "libmemcached/options/parser.yy" +#line 454 "libmemcached/csl/parser.yy" { (yyval.distribution)= MEMCACHED_DISTRIBUTION_CONSISTENT; ;} @@ -2093,7 +2093,7 @@ yyreduce: case 66: /* Line 1464 of yacc.c */ -#line 458 "libmemcached/options/parser.yy" +#line 458 "libmemcached/csl/parser.yy" { (yyval.distribution)= MEMCACHED_DISTRIBUTION_MODULA; ;} @@ -2102,7 +2102,7 @@ yyreduce: case 67: /* Line 1464 of yacc.c */ -#line 462 "libmemcached/options/parser.yy" +#line 462 "libmemcached/csl/parser.yy" { (yyval.distribution)= MEMCACHED_DISTRIBUTION_RANDOM; ;} @@ -2111,7 +2111,7 @@ yyreduce: /* Line 1464 of yacc.c */ -#line 2115 "libmemcached/options/parser.cc" +#line 2115 "libmemcached/csl/parser.cc" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); @@ -2323,7 +2323,7 @@ yyreturn: /* Line 1684 of yacc.c */ -#line 467 "libmemcached/options/parser.yy" +#line 467 "libmemcached/csl/parser.yy" void Context::start() diff --git a/libmemcached/options/parser.h b/libmemcached/csl/parser.h similarity index 100% rename from libmemcached/options/parser.h rename to libmemcached/csl/parser.h diff --git a/libmemcached/options/parser.yy b/libmemcached/csl/parser.yy similarity index 97% rename from libmemcached/options/parser.yy rename to libmemcached/csl/parser.yy index f9d1f1e2..c5eca73e 100644 --- a/libmemcached/options/parser.yy +++ b/libmemcached/csl/parser.yy @@ -1,6 +1,6 @@ /* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: * - * Libmemcached Scanner and Parser + * Configure Scripting Language * * Copyright (C) 2011 DataDifferental, http://datadifferential.com * @@ -22,8 +22,8 @@ %debug %defines %expect 0 -%output "libmemcached/options/parser.cc" -%defines "libmemcached/options/parser.h" +%output "libmemcached/csl/parser.cc" +%defines "libmemcached/csl/parser.h" %lex-param { yyscan_t *scanner } %name-prefix="config_" %parse-param { Context *context } @@ -38,9 +38,9 @@ #include #include -#include -#include -#include +#include +#include +#include #include diff --git a/libmemcached/options/scanner.cc b/libmemcached/csl/scanner.cc similarity index 96% rename from libmemcached/options/scanner.cc rename to libmemcached/csl/scanner.cc index db2e4465..2ff97444 100644 --- a/libmemcached/options/scanner.cc +++ b/libmemcached/csl/scanner.cc @@ -1,10 +1,10 @@ -#line 2 "libmemcached/options/scanner.cc" -#line 22 "libmemcached/options/scanner.l" +#line 2 "libmemcached/csl/scanner.cc" +#line 22 "libmemcached/csl/scanner.l" #include -#include -#include -#include +#include +#include +#include #pragma GCC diagnostic ignored "-Wold-style-cast" #pragma GCC diagnostic ignored "-Wsign-compare" @@ -15,7 +15,7 @@ -#line 19 "libmemcached/options/scanner.cc" +#line 19 "libmemcached/csl/scanner.cc" #define YY_INT_ALIGNED short int @@ -1105,10 +1105,10 @@ static yyconst flex_int16_t yy_rule_linenum[65] = #define yymore() yymore_used_but_not_detected #define YY_MORE_ADJ 0 #define YY_RESTORE_YY_MORE_OFFSET -#line 1 "libmemcached/options/scanner.l" +#line 1 "libmemcached/csl/scanner.l" /* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: * - * Libmemcached Scanner and Parser + * Configure Scripting Language * * Copyright (C) 2011 DataDifferental, http://datadifferential.com * @@ -1126,7 +1126,7 @@ static yyconst flex_int16_t yy_rule_linenum[65] = * along with this program. If not, see . */ -#line 38 "libmemcached/options/scanner.l" +#line 38 "libmemcached/csl/scanner.l" #include #include @@ -1150,7 +1150,7 @@ static yyconst flex_int16_t yy_rule_linenum[65] = #define YY_INPUT(buffer, result, max_size) get_lex_chars(buffer, result, max_size, PARAM) -#line 1154 "libmemcached/options/scanner.cc" +#line 1154 "libmemcached/csl/scanner.cc" #define INITIAL 0 @@ -1453,11 +1453,11 @@ YY_DECL struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* %% [7.0] user's declarations go here */ -#line 74 "libmemcached/options/scanner.l" +#line 74 "libmemcached/csl/scanner.l" -#line 1461 "libmemcached/options/scanner.cc" +#line 1461 "libmemcached/csl/scanner.cc" yylval = yylval_param; @@ -1576,28 +1576,28 @@ do_action: /* This label is used only to access EOF actions. */ case 1: YY_RULE_SETUP -#line 77 "libmemcached/options/scanner.l" +#line 77 "libmemcached/csl/scanner.l" { return yytext[0];} YY_BREAK case 2: YY_RULE_SETUP -#line 79 "libmemcached/options/scanner.l" +#line 79 "libmemcached/csl/scanner.l" { yylval->number= atoi(yytext); return (NUMBER); } YY_BREAK case 3: YY_RULE_SETUP -#line 81 "libmemcached/options/scanner.l" +#line 81 "libmemcached/csl/scanner.l" { yylval->number= atoi(yytext +1); return PORT; } YY_BREAK case 4: YY_RULE_SETUP -#line 83 "libmemcached/options/scanner.l" +#line 83 "libmemcached/csl/scanner.l" { yylval->number= atoi(yytext +2); return WEIGHT_START; } YY_BREAK case 5: /* rule 5 can match eol */ YY_RULE_SETUP -#line 85 "libmemcached/options/scanner.l" +#line 85 "libmemcached/csl/scanner.l" ; /* skip whitespace */ YY_BREAK case 6: @@ -1605,219 +1605,219 @@ case 6: yyg->yy_c_buf_p = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP -#line 88 "libmemcached/options/scanner.l" +#line 88 "libmemcached/csl/scanner.l" { return COMMENT; } YY_BREAK case 7: YY_RULE_SETUP -#line 92 "libmemcached/options/scanner.l" +#line 92 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; yyextra->set_server(); return SERVER; } YY_BREAK case 8: YY_RULE_SETUP -#line 94 "libmemcached/options/scanner.l" +#line 94 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return SOCKET; } YY_BREAK case 9: YY_RULE_SETUP -#line 96 "libmemcached/options/scanner.l" +#line 96 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return BINARY_PROTOCOL; } YY_BREAK case 10: YY_RULE_SETUP -#line 97 "libmemcached/options/scanner.l" +#line 97 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return BUFFER_REQUESTS; } YY_BREAK case 11: YY_RULE_SETUP -#line 98 "libmemcached/options/scanner.l" +#line 98 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return CONFIGURE_FILE; } YY_BREAK case 12: YY_RULE_SETUP -#line 99 "libmemcached/options/scanner.l" +#line 99 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return CONNECT_TIMEOUT; } YY_BREAK case 13: YY_RULE_SETUP -#line 100 "libmemcached/options/scanner.l" +#line 100 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return DISTRIBUTION; } YY_BREAK case 14: YY_RULE_SETUP -#line 101 "libmemcached/options/scanner.l" +#line 101 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return HASH_WITH_NAMESPACE; } YY_BREAK case 15: YY_RULE_SETUP -#line 102 "libmemcached/options/scanner.l" +#line 102 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return HASH; } YY_BREAK case 16: YY_RULE_SETUP -#line 103 "libmemcached/options/scanner.l" +#line 103 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return IO_BYTES_WATERMARK; } YY_BREAK case 17: YY_RULE_SETUP -#line 104 "libmemcached/options/scanner.l" +#line 104 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return IO_KEY_PREFETCH; } YY_BREAK case 18: YY_RULE_SETUP -#line 105 "libmemcached/options/scanner.l" +#line 105 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return IO_MSG_WATERMARK; } YY_BREAK case 19: YY_RULE_SETUP -#line 106 "libmemcached/options/scanner.l" +#line 106 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return NOREPLY; } YY_BREAK case 20: YY_RULE_SETUP -#line 107 "libmemcached/options/scanner.l" +#line 107 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return NUMBER_OF_REPLICAS; } YY_BREAK case 21: YY_RULE_SETUP -#line 108 "libmemcached/options/scanner.l" +#line 108 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return POLL_TIMEOUT; } YY_BREAK case 22: YY_RULE_SETUP -#line 109 "libmemcached/options/scanner.l" +#line 109 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return RANDOMIZE_REPLICA_READ; } YY_BREAK case 23: YY_RULE_SETUP -#line 110 "libmemcached/options/scanner.l" +#line 110 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return RCV_TIMEOUT; } YY_BREAK case 24: YY_RULE_SETUP -#line 111 "libmemcached/options/scanner.l" +#line 111 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return REMOVE_FAILED_SERVERS; } YY_BREAK case 25: YY_RULE_SETUP -#line 112 "libmemcached/options/scanner.l" +#line 112 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return RETRY_TIMEOUT; } YY_BREAK case 26: YY_RULE_SETUP -#line 113 "libmemcached/options/scanner.l" +#line 113 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return SND_TIMEOUT; } YY_BREAK case 27: YY_RULE_SETUP -#line 114 "libmemcached/options/scanner.l" +#line 114 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return SOCKET_RECV_SIZE; } YY_BREAK case 28: YY_RULE_SETUP -#line 115 "libmemcached/options/scanner.l" +#line 115 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return SOCKET_SEND_SIZE; } YY_BREAK case 29: YY_RULE_SETUP -#line 116 "libmemcached/options/scanner.l" +#line 116 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return SORT_HOSTS; } YY_BREAK case 30: YY_RULE_SETUP -#line 117 "libmemcached/options/scanner.l" +#line 117 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return SUPPORT_CAS; } YY_BREAK case 31: YY_RULE_SETUP -#line 118 "libmemcached/options/scanner.l" +#line 118 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return _TCP_KEEPALIVE; } YY_BREAK case 32: YY_RULE_SETUP -#line 119 "libmemcached/options/scanner.l" +#line 119 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return _TCP_KEEPIDLE; } YY_BREAK case 33: YY_RULE_SETUP -#line 120 "libmemcached/options/scanner.l" +#line 120 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return _TCP_NODELAY; } YY_BREAK case 34: YY_RULE_SETUP -#line 121 "libmemcached/options/scanner.l" +#line 121 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return USE_UDP; } YY_BREAK case 35: YY_RULE_SETUP -#line 122 "libmemcached/options/scanner.l" +#line 122 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return USER_DATA; } YY_BREAK case 36: YY_RULE_SETUP -#line 123 "libmemcached/options/scanner.l" +#line 123 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return VERIFY_KEY; } YY_BREAK case 37: YY_RULE_SETUP -#line 125 "libmemcached/options/scanner.l" +#line 125 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return POOL_MIN; } YY_BREAK case 38: YY_RULE_SETUP -#line 126 "libmemcached/options/scanner.l" +#line 126 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return POOL_MAX; } YY_BREAK case 39: YY_RULE_SETUP -#line 128 "libmemcached/options/scanner.l" +#line 128 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return NAMESPACE; } YY_BREAK case 40: YY_RULE_SETUP -#line 130 "libmemcached/options/scanner.l" +#line 130 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return INCLUDE; } YY_BREAK case 41: YY_RULE_SETUP -#line 131 "libmemcached/options/scanner.l" +#line 131 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return RESET; } YY_BREAK case 42: YY_RULE_SETUP -#line 132 "libmemcached/options/scanner.l" +#line 132 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return PARSER_DEBUG; } YY_BREAK case 43: YY_RULE_SETUP -#line 133 "libmemcached/options/scanner.l" +#line 133 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return SERVERS; } YY_BREAK case 44: YY_RULE_SETUP -#line 134 "libmemcached/options/scanner.l" +#line 134 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return END; } YY_BREAK case 45: YY_RULE_SETUP -#line 135 "libmemcached/options/scanner.l" +#line 135 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return ERROR; } YY_BREAK case 46: YY_RULE_SETUP -#line 137 "libmemcached/options/scanner.l" +#line 137 "libmemcached/csl/scanner.l" { return TRUE; } YY_BREAK case 47: YY_RULE_SETUP -#line 138 "libmemcached/options/scanner.l" +#line 138 "libmemcached/csl/scanner.l" { return FALSE; } YY_BREAK case 48: YY_RULE_SETUP -#line 141 "libmemcached/options/scanner.l" +#line 141 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return UNKNOWN_OPTION; @@ -1825,67 +1825,67 @@ YY_RULE_SETUP YY_BREAK case 49: YY_RULE_SETUP -#line 146 "libmemcached/options/scanner.l" +#line 146 "libmemcached/csl/scanner.l" { return CONSISTENT; } YY_BREAK case 50: YY_RULE_SETUP -#line 147 "libmemcached/options/scanner.l" +#line 147 "libmemcached/csl/scanner.l" { return MODULA; } YY_BREAK case 51: YY_RULE_SETUP -#line 148 "libmemcached/options/scanner.l" +#line 148 "libmemcached/csl/scanner.l" { return RANDOM; } YY_BREAK case 52: YY_RULE_SETUP -#line 150 "libmemcached/options/scanner.l" +#line 150 "libmemcached/csl/scanner.l" { return MD5; } YY_BREAK case 53: YY_RULE_SETUP -#line 151 "libmemcached/options/scanner.l" +#line 151 "libmemcached/csl/scanner.l" { return CRC; } YY_BREAK case 54: YY_RULE_SETUP -#line 152 "libmemcached/options/scanner.l" +#line 152 "libmemcached/csl/scanner.l" { return FNV1_64; } YY_BREAK case 55: YY_RULE_SETUP -#line 153 "libmemcached/options/scanner.l" +#line 153 "libmemcached/csl/scanner.l" { return FNV1A_64; } YY_BREAK case 56: YY_RULE_SETUP -#line 154 "libmemcached/options/scanner.l" +#line 154 "libmemcached/csl/scanner.l" { return FNV1_32; } YY_BREAK case 57: YY_RULE_SETUP -#line 155 "libmemcached/options/scanner.l" +#line 155 "libmemcached/csl/scanner.l" { return FNV1A_32; } YY_BREAK case 58: YY_RULE_SETUP -#line 156 "libmemcached/options/scanner.l" +#line 156 "libmemcached/csl/scanner.l" { return HSIEH; } YY_BREAK case 59: YY_RULE_SETUP -#line 157 "libmemcached/options/scanner.l" +#line 157 "libmemcached/csl/scanner.l" { return MURMUR; } YY_BREAK case 60: YY_RULE_SETUP -#line 158 "libmemcached/options/scanner.l" +#line 158 "libmemcached/csl/scanner.l" { return JENKINS; } YY_BREAK case 61: YY_RULE_SETUP -#line 160 "libmemcached/options/scanner.l" +#line 160 "libmemcached/csl/scanner.l" { yylval->server.port= MEMCACHED_DEFAULT_PORT; yylval->server.weight= 1; @@ -1897,7 +1897,7 @@ YY_RULE_SETUP YY_BREAK case 62: YY_RULE_SETUP -#line 169 "libmemcached/options/scanner.l" +#line 169 "libmemcached/csl/scanner.l" { if (yyextra->is_server()) { @@ -1919,7 +1919,7 @@ YY_RULE_SETUP case 63: /* rule 63 can match eol */ YY_RULE_SETUP -#line 187 "libmemcached/options/scanner.l" +#line 187 "libmemcached/csl/scanner.l" { config_get_text(yyscanner)[yyleng -1]= 0; yylval->string.c_str= yytext +1; @@ -1929,7 +1929,7 @@ YY_RULE_SETUP YY_BREAK case 64: YY_RULE_SETUP -#line 194 "libmemcached/options/scanner.l" +#line 194 "libmemcached/csl/scanner.l" { yyextra->begin= yytext; return UNKNOWN; @@ -1937,10 +1937,10 @@ YY_RULE_SETUP YY_BREAK case 65: YY_RULE_SETUP -#line 199 "libmemcached/options/scanner.l" +#line 199 "libmemcached/csl/scanner.l" ECHO; YY_BREAK -#line 1944 "libmemcached/options/scanner.cc" +#line 1944 "libmemcached/csl/scanner.cc" case YY_STATE_EOF(INITIAL): yyterminate(); @@ -3206,7 +3206,7 @@ void config_free (void * ptr , yyscan_t yyscanner) /* %ok-for-header */ -#line 199 "libmemcached/options/scanner.l" +#line 199 "libmemcached/csl/scanner.l" diff --git a/libmemcached/options/scanner.h b/libmemcached/csl/scanner.h similarity index 96% rename from libmemcached/options/scanner.h rename to libmemcached/csl/scanner.h index 5a16f080..90237d4e 100644 --- a/libmemcached/options/scanner.h +++ b/libmemcached/csl/scanner.h @@ -2,13 +2,13 @@ #define config_HEADER_H 1 #define config_IN_HEADER 1 -#line 6 "libmemcached/options/scanner.h" -#line 22 "libmemcached/options/scanner.l" +#line 6 "libmemcached/csl/scanner.h" +#line 22 "libmemcached/csl/scanner.l" #include -#include -#include -#include +#include +#include +#include #pragma GCC diagnostic ignored "-Wold-style-cast" #pragma GCC diagnostic ignored "-Wsign-compare" @@ -19,7 +19,7 @@ -#line 23 "libmemcached/options/scanner.h" +#line 23 "libmemcached/csl/scanner.h" #define YY_INT_ALIGNED short int @@ -471,9 +471,9 @@ extern int config_lex \ #undef YY_DECL #endif -#line 199 "libmemcached/options/scanner.l" +#line 199 "libmemcached/csl/scanner.l" -#line 478 "libmemcached/options/scanner.h" +#line 478 "libmemcached/csl/scanner.h" #undef config_IN_HEADER #endif /* config_HEADER_H */ diff --git a/libmemcached/options/scanner.l b/libmemcached/csl/scanner.l similarity index 96% rename from libmemcached/options/scanner.l rename to libmemcached/csl/scanner.l index cc00618d..8968b3c6 100644 --- a/libmemcached/options/scanner.l +++ b/libmemcached/csl/scanner.l @@ -1,6 +1,6 @@ /* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: * - * Libmemcached Scanner and Parser + * Configure Scripting Language * * Copyright (C) 2011 DataDifferental, http://datadifferential.com * @@ -21,9 +21,9 @@ %top{ #include -#include -#include -#include +#include +#include +#include #pragma GCC diagnostic ignored "-Wold-style-cast" #pragma GCC diagnostic ignored "-Wsign-compare" @@ -66,7 +66,7 @@ %option debug %option nounput %option noyywrap -%option outfile="libmemcached/options/scanner.cc" header-file="libmemcached/options/scanner.h" +%option outfile="libmemcached/csl/scanner.cc" header-file="libmemcached/csl/scanner.h" %option perf-report %option prefix="config_" %option reentrant diff --git a/libmemcached/options/server.h b/libmemcached/csl/server.h similarity index 98% rename from libmemcached/options/server.h rename to libmemcached/csl/server.h index d86ad39a..f78db99b 100644 --- a/libmemcached/options/server.h +++ b/libmemcached/csl/server.h @@ -1,6 +1,6 @@ /* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: * - * Libmemcached library + * Configure Scripting Language * * Copyright (C) 2011 Data Differential, http://datadifferential.com/ * All rights reserved. diff --git a/libmemcached/options/symbol.h b/libmemcached/csl/symbol.h similarity index 96% rename from libmemcached/options/symbol.h rename to libmemcached/csl/symbol.h index 17e5f62a..ed917da7 100644 --- a/libmemcached/options/symbol.h +++ b/libmemcached/csl/symbol.h @@ -1,6 +1,6 @@ /* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: * - * Libmemcached library + * Configure Scripting Language * * Copyright (C) 2011 Data Differential, http://datadifferential.com/ * All rights reserved. @@ -39,7 +39,7 @@ #include #include -#include +#include union YYSTYPE { diff --git a/libmemcached/include.am b/libmemcached/include.am index 1c2036bf..f8e20d58 100644 --- a/libmemcached/include.am +++ b/libmemcached/include.am @@ -4,7 +4,7 @@ libmemcached_libmemcached_la_SOURCES = -include libmemcached/options/include.am +include libmemcached/csl/include.am EXTRA_DIST+= \ libmemcached/configure.h.in \ @@ -149,7 +149,7 @@ libmemcached_libmemcached_la_SOURCES+= \ libmemcached/version.cc \ libmemcached/virtual_bucket.c -libmemcached/options.cc: libmemcached/options/parser.h +libmemcached/options.cc: libmemcached/csl/parser.h libmemcached_libmemcached_la_DEPENDENCIES= diff --git a/libmemcached/options.cc b/libmemcached/options.cc index ad28c664..cdaa5209 100644 --- a/libmemcached/options.cc +++ b/libmemcached/options.cc @@ -38,7 +38,7 @@ #include #include -#include +#include const char *memcached_parse_filename(memcached_st *memc) { diff --git a/libmemcached/options/include.am b/libmemcached/options/include.am deleted file mode 100644 index da51ff4b..00000000 --- a/libmemcached/options/include.am +++ /dev/null @@ -1,19 +0,0 @@ -# vim:ft=automake -# included from Top Level Makefile.am -# All paths should be given relative to the root - -DISTCLEANFILES+= \ - libmemcached/options/parser.output - -noinst_HEADERS+= \ - libmemcached/options/context.h \ - libmemcached/options/parser.h \ - libmemcached/options/scanner.h \ - libmemcached/options/server.h \ - libmemcached/options/symbol.h - -libmemcached_libmemcached_la_SOURCES+= \ - libmemcached/options/parser.cc \ - libmemcached/options/scanner.cc - -include libmemcached/options/parser.am -- 2.30.2