#!/usr/bin/ruby
#
# DO NOT MODIFY!!!!
# This file is automatically generated by racc 1.4.5
# from racc grammer file "drbd.rb.yy".
#

require 'racc/parser'


$drbd = Hash.new()


class DrbdParser < Racc::Parser

module_eval <<'..end drbd.rb.yy modeval..id36ba2fcdaf', 'drbd.rb.yy', 193
	def parse(str)
		@yydebug = false
		@q = []
		until str.empty? || !str
			case str
			when /\A\s+/
			when /\Adisable-ip-verification/
				@q.push [:TK_DISABLE_IP_VERIFICATION, 'disable-ip-verification']
			when /\Ausage-count/
				@q.push [:TK_USAGE_COUNT, 'usage-count']
			when /\Adialog-refresh/
				@q.push [:TK_DIALOG_REFRESH, 'dialog-refresh']	
			when /\Aon-io-error/
				@q.push [:TK_ON_IO_ERROR, 'on-io-error']
			when /\Aglobal/
				@q.push [:TK_GLOBAL, 'global']
			when /\Aminor-count/
				@q.push [:TK_MINOR_COUNT, 'minor-count']
			when /\Aresource[ \t\n]/
				@q.push [:TK_RESOURCE, 'resource']
			when /\Acommon/
				@q.push [:TK_COMMON, 'common']	
			when /\Aprotocol/
				@q.push [:TK_PROTOCOL, 'protocol']
			when /\Adisk\s*\{/
				@q.push [:TK_DISK_S, 'disk_s']
			when /\Adisk/
				@q.push [:TK_DISK, 'disk']
			when /\Anet/
				@q.push [:TK_NET, 'net']
			when /\Aminor/
				@q.push [:TK_MINOR, 'minor']
			when /\Asyncer/
				@q.push [:TK_SYNCER, 'syncer']
			when /\Astartup/
				@q.push [:TK_STARTUP, 'startup']
			when /\Aoptions/
				@q.push [:TK_OPTIONS, 'options']
			when /\Ahandlers/
				@q.push [:TK_HANDLERS, 'handlers']	
			when /\Afencing/
				@q.push [:TK_FENCING, 'fencing']	
			when /\Ause-bmbv/
				@q.push [:TK_USE_BMBV, 'use-bmbv']
			when /\Ano-disk-barrier/
				@q.push [:TK_NO_DISK_BARRIER, 'no-disk-barrier']
			when /\Ano-disk-flushes/
				@q.push [:TK_NO_DISK_FLUSHES, 'no-disk-flushes']
			when /\Ano-disk-drain/
				@q.push [:TK_NO_DISK_DRAIN, 'no-disk-drain']
			when /\Ano-md-flushes/
				@q.push [:TK_NO_MD_FLUSHES, 'no-md-flushes']
			when /\Amax-bio-bvecs/
				@q.push [:TK_MAX_BIO_BVECS, 'max-bio-bvecs']
			when /\Aping-timeout/
				@q.push [:TK_PING_TIMEOUT, 'ping-timeout']
			when /\Aallow-two-primaries/
				@q.push [:TK_ALLOW_TWO_PRIMARIES, 'allow-two-primaries']
			when /\Acram-hmac-alg/
				@q.push [:TK_CRAM_HMAC_ALG, 'cram-hmac-alg']
			when /\Ashared-secret/
				@q.push [:TK_SHARED_SECRET, 'shared-secret']
			when /\Aafter-sb-0pri/
				@q.push [:TK_AFTER_SB_0PRI, 'after-sb-0pri']
			when /\Aafter-sb-1pri/
				@q.push [:TK_AFTER_SB_0PRI, 'after-sb-1pri']
			when /\Aafter-sb-2pri/
				@q.push [:TK_AFTER_SB_0PRI, 'after-sb-2pri']
			when /\Adata-integrity-alg/
				@q.push [:TK_DATA_INTEGRITY_ALG, 'data-integrity-alg']	
			when /\Arr-conflict/
				@q.push [:TK_RR_CONFLICT, 'rr-conflict']
			when /\Apri-on-incon-degr/
				@q.push [:TK_PRI_ON_INCON_DEGR, 'pri-on-incon-degr']
			when /\Apri-lost-after-sb/
				@q.push [:TK_PRI_LOST_AFTER_SB, 'pri-lost-after-sb']
			when /\Apri-lost/
				@q.push [:TK_PRI_LOST, 'pri-lost']	
			when /\Afence-peer/
				@q.push [:TK_FENCE_PEER, 'fence-peer']
			when /\Alocal-io-error/
				@q.push [:TK_LOCAL_IO_ERROR, 'local-io-error']
			when /\Asplit-brain/
				@q.push [:TK_SPLIT_BRAIN, 'split-brain']
			when /\Abefore-resync-target/
				@q.push [:TK_BEFORE_RESYNC_TARGET, 'before-rsync-target']
			when /\Aafter-resync-target/
				@q.push [:TK_AFTER_RESYNC_TARGET, 'after-resync-target']
			when /\Await-after-sb/
				@q.push [:TK_WAIT_AFTER_SB, 'wait-after-sb']
			when /\Abecome-primary-on/
				@q.push [:TK_BECOME_PRIMARY_ON, 'become-primary-on']	
			when /\Ano-tcp-cork/
				@q.push [:TK_NO_TCP_CORK, 'no-tcp-cork']
			when /\Acpu-mask/
				@q.push [:TK_CPU_MASK, 'cpu-mask']
			when /\Averify-alg/
				@q.push [:TK_VERIFY_ALG, 'verify-alg']	
			when /\Afloating/
			    @q.push [:TK_FLOATING, 'floating']
			when /\Astacked-on-top-of/
				@q.push [:TK_STACK_ON_TOP_OF, 'stacked-on-top-of']
			when /\Asize/
				@q.push [:TK_SIZE, 'size']
			when /\Atimeout/
				@q.push [:TK_TIMEOUT, 'timeout']
			when /\Aconnect-int/
				@q.push [:TK_CONNECT_INT, 'connect-int']
			when /\Aafter-sb-0pri/
				@q.push [:TK_AFTER_SB_0PRI, 'after-sb-0pri']
			when /\Aafter-sb-1pri/
				@q.push [:TK_AFTER_SB_0PRI, 'after-sb-1pri']
			when /\Aafter-sb-2pri/
				@q.push [:TK_AFTER_SB_0PRI, 'after-sb-2pri']
			when /\Arr-conflict/
				@q.push [:TK_RR_CONFLICT, 'rr-conflict']	
			when /\Aping-int/
				@q.push [:TK_PING_INT, 'ping-int']
			when /\Amax-buffers/
				@q.push [:TK_MAX_BUFFERS, 'max-buffers']
			when /\Aunplug-watermark/
				@q.push [:TK_UNPLUG_WATERMARK, 'unplug-watermark']
			when /\Amax-epoch-size/
				@q.push [:TK_MAX_EPOCH_SIZE, 'max-epoch-size']
			when /\Asndbuf-size/
				@q.push [:TK_SNDBUF_SIZE, 'sndbuf-size']
			when /\Ako-count/
				@q.push [:TK_KO_COUNT, 'ko-count']
			when /\Arate/
				@q.push [:TK_RATE, 'rate']
			when /\Aal-extents/
				@q.push [:TK_AL_EXTENTS, 'al-extents']
			when /\Aafter/
				@q.push [:TK_AFTER, 'after']	
			when /\Adevice/
				@q.push [:TK_DEVICE, 'device']
			when /\Aaddress/
				@q.push [:TK_ADDRESS, 'address']
			when /\Ameta-disk/
				@q.push [:TK_META_DISK, 'meta-disk']
			when /\Aflexible-meta-disk/
				@q.push [:TK_FLEXIBLE_META_DISK, 'flexible-meta-disk']	
			when /\Adegr-wfc-timeout/
				@q.push [:TK_DEGR_WFC_TIMEOUT, 'degr-wfc-timeout']
			when /\Aon-no-data-accessible/
				@q.push [:TK_NO_DATA_ACCESSIBLE, 'on-no-data-accessible']
			when /\Awfc-timeout/
				@q.push [:TK_WFC_TIMEOUT, 'wfc-timeout']
			when /\Aipv6/
				@q.push [:TK_IPV6, 'ipv6']	
			when /\Aon\s*/
				@q.push [:TK_ON, 'on']
			when /\A"[^"]*"/
				@q.push [:TK_STRING, $&]
			when /\A\[[\w\.\/:]+:[\w\.\/:]+\]/
				@q.push [:TK_IPV6ADDR, $&]	
			when /\A[\w\.\/\[\]-]+/
				@q.push [:TK_STRING, $&]
			when /\A.|\n/o
				s = $&
				@q.push [s, s]
			end
			str = $'
		end
		@q.push [false, '$end']	
		do_parse
	end

	def next_token
		@q.shift
	end	
			
..end drbd.rb.yy modeval..id36ba2fcdaf

##### racc 1.4.5 generates ###

racc_reduce_table = [
 0, 0, :racc_error,
 3, 81, :_reduce_1,
 0, 82, :_reduce_2,
 4, 82, :_reduce_3,
 0, 85, :_reduce_4,
 3, 85, :_reduce_5,
 2, 86, :_reduce_6,
 1, 86, :_reduce_7,
 2, 86, :_reduce_8,
 2, 86, :_reduce_9,
 0, 83, :_reduce_10,
 4, 83, :_reduce_11,
 0, 87, :_reduce_12,
 2, 87, :_reduce_13,
 3, 88, :_reduce_14,
 4, 88, :_reduce_15,
 4, 88, :_reduce_16,
 4, 88, :_reduce_17,
 4, 88, :_reduce_18,
 4, 88, :_reduce_19,
 3, 88, :_reduce_20,
 0, 84, :_reduce_21,
 2, 84, :_reduce_22,
 5, 95, :_reduce_23,
 1, 96, :_reduce_24,
 0, 97, :_reduce_25,
 3, 97, :_reduce_26,
 2, 97, :_reduce_27,
 2, 98, :_reduce_28,
 3, 98, :_reduce_29,
 2, 98, :_reduce_30,
 2, 98, :_reduce_31,
 2, 98, :_reduce_32,
 0, 100, :_reduce_33,
 2, 100, :_reduce_34,
 3, 99, :_reduce_35,
 4, 99, :_reduce_36,
 4, 99, :_reduce_37,
 4, 99, :_reduce_38,
 4, 99, :_reduce_39,
 4, 99, :_reduce_40,
 5, 99, :_reduce_41,
 5, 99, :_reduce_42,
 5, 99, :_reduce_43,
 1, 103, :_reduce_44,
 0, 89, :_reduce_45,
 3, 89, :_reduce_46,
 2, 107, :_reduce_47,
 2, 107, :_reduce_48,
 2, 107, :_reduce_49,
 2, 107, :_reduce_50,
 2, 107, :_reduce_51,
 2, 107, :_reduce_52,
 2, 107, :_reduce_53,
 2, 107, :_reduce_54,
 2, 107, :_reduce_55,
 0, 90, :_reduce_56,
 3, 90, :_reduce_57,
 2, 108, :_reduce_58,
 2, 108, :_reduce_59,
 2, 108, :_reduce_60,
 2, 108, :_reduce_61,
 2, 108, :_reduce_62,
 2, 108, :_reduce_63,
 2, 108, :_reduce_64,
 2, 108, :_reduce_65,
 2, 108, :_reduce_66,
 2, 108, :_reduce_67,
 2, 108, :_reduce_68,
 2, 108, :_reduce_69,
 2, 108, :_reduce_70,
 2, 108, :_reduce_71,
 2, 108, :_reduce_72,
 2, 108, :_reduce_73,
 2, 108, :_reduce_74,
 1, 108, :_reduce_75,
 2, 108, :_reduce_76,
 0, 91, :_reduce_77,
 3, 91, :_reduce_78,
 2, 109, :_reduce_79,
 2, 109, :_reduce_80,
 2, 109, :_reduce_81,
 2, 109, :_reduce_82,
 2, 109, :_reduce_83,
 0, 105, :_reduce_84,
 3, 105, :_reduce_85,
 2, 110, :_reduce_86,
 2, 110, :_reduce_87,
 2, 110, :_reduce_88,
 2, 110, :_reduce_89,
 0, 106, :_reduce_90,
 3, 106, :_reduce_91,
 2, 112, :_reduce_92,
 2, 112, :_reduce_93,
 0, 104, :_reduce_94,
 3, 104, :_reduce_95,
 2, 113, :_reduce_96,
 3, 113, :_reduce_97,
 2, 113, :_reduce_98,
 2, 113, :_reduce_99,
 2, 113, :_reduce_100,
 0, 94, :_reduce_101,
 3, 94, :_reduce_102,
 2, 114, :_reduce_103,
 2, 114, :_reduce_104,
 2, 114, :_reduce_105,
 2, 114, :_reduce_106,
 2, 114, :_reduce_107,
 2, 114, :_reduce_108,
 2, 114, :_reduce_109,
 2, 114, :_reduce_110,
 3, 102, :_reduce_111,
 4, 102, :_reduce_112,
 4, 102, :_reduce_113,
 1, 102, :_reduce_114,
 2, 101, :_reduce_115,
 1, 101, :_reduce_116,
 1, 111, :_reduce_117,
 0, 92, :_reduce_118,
 3, 92, :_reduce_119,
 2, 115, :_reduce_120,
 1, 115, :_reduce_121,
 2, 115, :_reduce_122,
 2, 115, :_reduce_123,
 0, 93, :_reduce_124,
 3, 93, :_reduce_125,
 2, 116, :_reduce_126,
 2, 116, :_reduce_127 ]

racc_reduce_n = 128

racc_shift_n = 257

racc_action_table = [
   125,   127,   130,   131,   133,   237,   134,   239,   122,   123,
   124,    28,    29,    30,    32,   204,    33,   202,    43,    16,
   231,   232,   234,   187,    42,    15,   187,    51,    53,    93,
    94,   187,    95,   126,   110,   222,   224,   225,   227,    51,
    53,    96,    97,    27,    13,    14,    98,    48,    49,    50,
    52,    55,    56,    46,   113,    99,   111,   100,   101,    48,
    49,    50,    52,    55,    56,    46,   233,   128,   129,   102,
   132,   238,    41,   121,    40,    39,   186,   203,    89,   186,
    31,    37,   226,    26,   186,   230,   206,    12,    87,    92,
    72,    74,   136,    78,    80,    82,   137,   138,    47,   139,
    91,   223,   107,   108,   140,   141,   142,   143,   144,   145,
   118,   119,   146,    75,    76,    77,    79,    81,    83,    84,
    85,    86,    90,   147,    89,   107,   108,   148,   149,   103,
   105,   106,   118,   119,    87,    92,    72,    74,   150,    78,
    80,    82,   151,   152,   153,    73,    91,   115,   116,   154,
   155,   219,   103,   105,   106,   110,   156,   221,   157,    75,
    76,    77,    79,    81,    83,    84,    85,    86,    90,   115,
   116,   158,   159,   160,   104,   113,   161,   220,   162,   114,
    64,    66,    67,    68,    69,    70,    71,    62,   163,   164,
   165,   213,   166,   167,   168,   169,   170,   171,    63,    64,
    66,    67,    68,    69,    70,    71,    62,   172,   173,   174,
   175,   176,   177,   178,   180,   182,   183,   212,   184,    36,
    34,   190,   191,   192,   193,   194,   196,   197,   198,   201,
    60,    34,   205,    24,   210,    23,    22,   215,   216,   217,
    21,    19,     1,    10,     9,   235,   236,     6,     5,   242,
   243,   245,   180,   247,   248,   249,   250,   245,   180,     4,
   254,   255,   196 ]

racc_action_check = [
    61,    61,    61,    61,    61,   218,    61,   218,    61,    61,
    61,    18,    18,    18,    18,   187,    18,   186,    35,     8,
   214,   214,   214,   237,    33,     8,   128,   189,   189,    46,
    48,   222,    49,    61,    58,   211,   211,   211,   211,    38,
    38,    50,    51,    18,     8,     8,    52,   189,   189,   189,
   189,   189,   189,   189,    58,    53,    58,    54,    55,    38,
    38,    38,    38,    38,    38,    38,   214,    61,    61,    56,
    61,   218,    32,    61,    31,    30,   237,   187,    45,   128,
    18,    28,   211,    18,   222,   214,   189,     8,    45,    45,
    45,    45,    62,    45,    45,    45,    64,    65,    38,    66,
    45,   211,   207,   207,    67,    68,    69,    70,    71,    72,
   209,   209,    74,    45,    45,    45,    45,    45,    45,    45,
    45,    45,    45,    75,   200,    57,    57,    76,    77,   207,
   207,   207,    59,    59,   200,   200,   200,   200,    78,   200,
   200,   200,    79,    80,    81,    45,   200,   209,   209,    82,
    83,   207,    57,    57,    57,   208,    84,   209,    85,   200,
   200,   200,   200,   200,   200,   200,   200,   200,   200,    59,
    59,    86,    87,    88,    57,   208,    89,   208,    91,    59,
    44,    44,    44,    44,    44,    44,    44,    44,    92,   103,
   105,   200,   106,   107,   108,   109,   110,   112,    44,   199,
   199,   199,   199,   199,   199,   199,   199,   113,   116,   117,
   118,   119,   122,   123,   124,   125,   126,   199,   127,    27,
   129,   131,   132,   133,   134,   135,   178,   180,   181,   185,
    42,    19,   188,    17,   196,    15,    14,   202,   203,   204,
    13,    11,     0,     6,     5,   215,   217,     3,     2,   224,
   225,   226,   227,   228,   229,   231,   232,   233,   234,     1,
   239,   240,   243 ]

racc_action_pointer = [
   240,   183,   248,   211,   nil,   244,   167,   nil,    10,   nil,
   nil,   238,   nil,   223,   219,   218,   nil,   155,     6,   214,
   nil,   nil,   nil,   nil,   nil,   nil,   nil,   143,     5,   nil,
    -1,    -2,    -4,     7,   nil,   -58,   nil,   nil,    21,   nil,
   nil,   nil,   152,   nil,   121,    68,    12,   nil,    13,    15,
    24,    25,    29,    38,   -21,    41,    52,    97,   -21,   102,
   nil,    -4,    75,   nil,    79,    19,    82,    87,    88,    89,
    90,    91,    92,   nil,    95,   106,   110,   111,   121,   125,
   126,   127,   132,   133,   139,   141,   154,   155,    95,   159,
   nil,   161,   171,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
   nil,   nil,   nil,   172,   nil,   173,   175,   176,   177,   117,
   179,   nil,   119,   190,   nil,   nil,   191,   131,   193,   194,
   nil,   nil,   195,   196,   197,   198,   140,   142,     9,   203,
   nil,   145,   146,   147,   207,   147,   nil,   nil,   nil,   nil,
   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   153,   nil,
   210,   152,   nil,   nil,   nil,   153,   -52,    -2,   156,     9,
   nil,   nil,   nil,   nil,   nil,   nil,   217,   nil,   nil,   140,
   114,   nil,   158,   221,   160,   nil,   nil,    74,   100,    80,
   nil,    24,   nil,   nil,     8,   228,   nil,   229,    -6,   nil,
   nil,   nil,    14,   nil,   232,   233,   234,   235,   175,   176,
   nil,   238,   239,   240,   241,   nil,   nil,     6,   nil,   243,
   183,   nil,   nil,   189,   nil,   nil,   nil,   nil,   nil,   nil,
   nil,   nil,   nil,   nil,   nil,   nil,   nil ]

racc_action_default = [
    -2,  -128,  -128,   -10,    -4,  -128,  -128,   -21,  -128,   257,
   -12,    -1,    -3,  -128,  -128,  -128,    -7,  -128,  -128,  -128,
   -22,    -9,    -6,    -8,    -5,   -13,   -11,  -128,  -128,   -45,
  -128,  -128,  -128,  -128,   -24,  -128,  -101,   -56,  -128,   -77,
  -124,  -118,  -128,   -25,  -128,  -128,  -128,   -14,  -128,  -128,
  -128,  -128,  -128,  -128,  -128,  -128,  -128,  -128,  -128,  -128,
   -20,  -128,  -128,   -19,  -128,  -128,  -128,  -128,  -128,  -128,
  -128,  -128,  -128,   -15,  -128,  -128,  -128,  -128,  -128,  -128,
  -128,  -128,  -128,  -128,  -128,  -128,  -128,  -128,  -128,  -128,
   -75,  -128,  -128,   -55,   -49,   -50,   -51,   -47,   -52,   -48,
   -46,   -53,   -54,  -128,   -16,  -128,  -128,  -128,  -128,  -128,
  -128,   -18,  -128,  -128,   -17,  -121,  -128,  -128,  -128,  -128,
   -27,   -23,  -128,  -128,  -128,  -128,  -128,  -128,  -128,  -128,
   -45,  -128,  -128,  -128,  -128,  -128,  -110,  -103,  -102,  -104,
  -105,  -106,  -107,  -108,  -109,   -60,   -62,   -61,   -67,   -68,
   -63,   -69,   -64,   -70,   -65,   -71,   -72,   -73,   -74,   -58,
   -57,   -76,   -66,   -59,   -80,   -81,   -82,   -79,   -83,   -78,
  -126,  -125,  -127,  -122,  -119,  -120,  -123,   -31,   -33,   -30,
  -116,  -128,   -44,  -101,   -56,   -32,  -128,  -114,  -128,  -128,
   -77,  -124,  -118,   -28,   -26,   -29,  -128,  -115,   -94,  -128,
  -128,   -84,  -128,  -128,  -128,   -90,   -35,  -128,  -128,  -128,
   -34,  -128,   -40,   -36,  -128,  -128,  -111,  -128,  -128,   -37,
   -39,   -38,  -128,   -41,  -128,  -128,  -128,  -128,  -128,  -128,
   -42,  -128,  -128,  -128,  -128,  -112,  -113,  -128,   -43,  -128,
  -128,   -98,   -96,   -33,  -100,  -117,   -99,   -95,   -85,   -86,
   -87,   -89,   -88,   -93,   -92,   -91,   -97 ]

racc_goto_table = [
    57,    58,    59,    45,    35,   179,    38,    44,   185,   195,
   244,     2,    18,    17,    20,    25,    61,   251,   135,   120,
     8,    11,     7,   181,   211,   214,   218,   229,     3,   240,
   228,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
   nil,   nil,   nil,   nil,   256,   nil,   nil,   nil,   nil,   nil,
   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
   nil,   nil,   241,   nil,   nil,   nil,   nil,   189,   246,   nil,
   nil,   nil,   nil,   nil,   188,   252,   nil,   253,   nil,   nil,
   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
   200,   207,   208,   209,   199 ]

racc_goto_check = [
    11,    13,    12,    10,    16,    21,     9,    14,    22,    20,
    31,     1,     7,     6,    15,     8,    17,    31,    18,    19,
     5,     4,     3,    23,    24,    25,    26,    30,     2,    32,
    33,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
   nil,   nil,   nil,   nil,    20,   nil,   nil,   nil,   nil,   nil,
   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
   nil,   nil,    22,   nil,   nil,   nil,   nil,     9,    21,   nil,
   nil,   nil,   nil,   nil,    16,    21,   nil,    22,   nil,   nil,
   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
    10,    11,    13,    12,    14 ]

racc_goto_pointer = [
   nil,    11,    28,    19,    14,    16,     5,     2,    -3,   -23,
   -34,   -39,   -39,   -39,   -29,     3,   -15,   -27,   -43,   -42,
  -169,  -119,  -120,  -102,  -174,  -176,  -179,   nil,   nil,   nil,
  -187,  -216,  -189,  -181,   nil,   nil,   nil ]

racc_goto_default = [
   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,   nil,
   nil,   nil,   nil,   nil,   nil,   nil,   nil,    54,    88,   109,
   nil,   nil,   nil,   nil,    65,   117,   112 ]

racc_token_table = {
 false => 0,
 Object.new => 1,
 :TK_GLOBAL => 2,
 :TK_RESOURCE => 3,
 :TK_ON => 4,
 :TK_NET => 5,
 :TK_DISK_S => 6,
 :TK_SYNCER => 7,
 :TK_STARTUP => 8,
 :TK_DISABLE_IP_VERIFICATION => 9,
 :TK_PROTOCOL => 10,
 :TK_ADDRESS => 11,
 :TK_DISK => 12,
 :TK_DEVICE => 13,
 :TK_META_DISK => 14,
 :TK_MINOR_COUNT => 15,
 :TK_INTEGER => 16,
 :TK_STRING => 17,
 :TK_ON_IO_ERROR => 18,
 :TK_SIZE => 19,
 :TK_TIMEOUT => 20,
 :TK_CONNECT_INT => 21,
 :TK_PING_INT => 22,
 :TK_MAX_BUFFERS => 23,
 :TK_IPADDR => 24,
 :TK_UNPLUG_WATERMARK => 25,
 :TK_MAX_EPOCH_SIZE => 26,
 :TK_SNDBUF_SIZE => 27,
 :TK_RATE => 28,
 :TK_AL_EXTENTS => 29,
 :TK_WFC_TIMEOUT => 30,
 :TK_DEGR_WFC_TIMEOUT => 31,
 :TK_KO_COUNT => 32,
 :TK_ON_DISCONNECT => 33,
 :TK_DIALOG_REFRESH => 34,
 :TK_USAGE_COUNT => 35,
 :TK_COMMON => 36,
 :TK_HANDLERS => 37,
 :TK_FENCING => 38,
 :TK_USE_BMBV => 39,
 :TK_NO_DISK_BARRIER => 40,
 :TK_NO_DISK_FLUSHES => 41,
 :TK_NO_DISK_DRAIN => 42,
 :TK_NO_MD_FLUSHES => 43,
 :TK_MAX_BIO_BVECS => 44,
 :TK_PINT_TIMEOUT => 45,
 :TK_ALLOW_TWO_PRIMARIES => 46,
 :TK_CRAM_HMAC_ALG => 47,
 :TK_SHARED_SECRET => 48,
 :TK_AFTER_SB_0PRI => 49,
 :TK_AFTER_SB_1PRI => 50,
 :TK_AFTER_SB_2PRI => 51,
 :TK_DATA_INTEGRITY_ALG => 52,
 :TK_RR_CONFLICT => 53,
 :TK_NO_TCP_CORK => 54,
 :TK_CPU_MASK => 55,
 :TK_VERIFY_ALG => 56,
 :TK_AFTER => 57,
 :TK_FLEXIBLE_META_DISK => 58,
 :TK_PRI_ON_INCON_DEGR => 59,
 :TK_PRI_LOST_AFTER_SB => 60,
 :TK_PRI_LOST => 61,
 :TK_FENCE_PEER => 62,
 :TK_LOCAL_IO_ERROR => 63,
 :TK_SPLIT_BRAIN => 64,
 :TK_BEFORE_RESYNC_TARGET => 65,
 :TK_AFTER_RESYNC_TARGET => 66,
 :TK_WAIT_AFTER_SB => 67,
 :TK_BECOME_PRIMARY_ON => 68,
 :TK_IPV6ADDR => 69,
 :TK_IPV6 => 70,
 :TK_FLOATING => 71,
 :TK_STACK_ON_TOP_OF => 72,
 :TK_MINOR => 73,
 :TK_OPTIONS => 74,
 :TK_NO_DATA_ACCESSIBLE => 75,
 "{" => 76,
 "}" => 77,
 ";" => 78,
 ":" => 79 }

racc_use_result_var = true

racc_nt_base = 80

Racc_arg = [
 racc_action_table,
 racc_action_check,
 racc_action_default,
 racc_action_pointer,
 racc_goto_table,
 racc_goto_check,
 racc_goto_default,
 racc_goto_pointer,
 racc_nt_base,
 racc_reduce_table,
 racc_token_table,
 racc_shift_n,
 racc_reduce_n,
 racc_use_result_var ]

Racc_token_to_s_table = [
'$end',
'error',
'TK_GLOBAL',
'TK_RESOURCE',
'TK_ON',
'TK_NET',
'TK_DISK_S',
'TK_SYNCER',
'TK_STARTUP',
'TK_DISABLE_IP_VERIFICATION',
'TK_PROTOCOL',
'TK_ADDRESS',
'TK_DISK',
'TK_DEVICE',
'TK_META_DISK',
'TK_MINOR_COUNT',
'TK_INTEGER',
'TK_STRING',
'TK_ON_IO_ERROR',
'TK_SIZE',
'TK_TIMEOUT',
'TK_CONNECT_INT',
'TK_PING_INT',
'TK_MAX_BUFFERS',
'TK_IPADDR',
'TK_UNPLUG_WATERMARK',
'TK_MAX_EPOCH_SIZE',
'TK_SNDBUF_SIZE',
'TK_RATE',
'TK_AL_EXTENTS',
'TK_WFC_TIMEOUT',
'TK_DEGR_WFC_TIMEOUT',
'TK_KO_COUNT',
'TK_ON_DISCONNECT',
'TK_DIALOG_REFRESH',
'TK_USAGE_COUNT',
'TK_COMMON',
'TK_HANDLERS',
'TK_FENCING',
'TK_USE_BMBV',
'TK_NO_DISK_BARRIER',
'TK_NO_DISK_FLUSHES',
'TK_NO_DISK_DRAIN',
'TK_NO_MD_FLUSHES',
'TK_MAX_BIO_BVECS',
'TK_PINT_TIMEOUT',
'TK_ALLOW_TWO_PRIMARIES',
'TK_CRAM_HMAC_ALG',
'TK_SHARED_SECRET',
'TK_AFTER_SB_0PRI',
'TK_AFTER_SB_1PRI',
'TK_AFTER_SB_2PRI',
'TK_DATA_INTEGRITY_ALG',
'TK_RR_CONFLICT',
'TK_NO_TCP_CORK',
'TK_CPU_MASK',
'TK_VERIFY_ALG',
'TK_AFTER',
'TK_FLEXIBLE_META_DISK',
'TK_PRI_ON_INCON_DEGR',
'TK_PRI_LOST_AFTER_SB',
'TK_PRI_LOST',
'TK_FENCE_PEER',
'TK_LOCAL_IO_ERROR',
'TK_SPLIT_BRAIN',
'TK_BEFORE_RESYNC_TARGET',
'TK_AFTER_RESYNC_TARGET',
'TK_WAIT_AFTER_SB',
'TK_BECOME_PRIMARY_ON',
'TK_IPV6ADDR',
'TK_IPV6',
'TK_FLOATING',
'TK_STACK_ON_TOP_OF',
'TK_MINOR',
'TK_OPTIONS',
'TK_NO_DATA_ACCESSIBLE',
'"{"',
'"}"',
'";"',
'":"',
'$start',
'config',
'global_sec',
'common_sec',
'resources',
'glob_stmts',
'glob_stmt',
'common_stmts',
'common_stmt',
'disk_stmts',
'net_stmts',
'sync_stmts',
'startup_stmts',
'options_stmts',
'handlers_stmts',
'resource',
'resource_name',
'res_stmts',
'res_stmt',
'section',
'minor_stmt',
'meta_disk_and_index',
'ip_and_port',
'hostname',
'host_stmts',
'floating_stmts',
'stack_on_top_of_stmts',
'disk_stmt',
'net_stmt',
'sync_stmt',
'floating_stmt',
'flexible_meta_disk',
'stack_on_top_of_stmt',
'host_stmt',
'handlers_stmt',
'startup_stmt',
'options_stmt']

Racc_debug_parser = true

##### racc system variables end #####

 # reduce 0 omitted

module_eval <<'.,.,', 'drbd.rb.yy', 6
  def _reduce_1( val, _values, result )
 $drbd['global'] = val[0]; $drbd['common'] = val[1]; $drbd['resources'] = val[2]; return $drbd;
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 8
  def _reduce_2( val, _values, result )
 return {};
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 9
  def _reduce_3( val, _values, result )
 return val[2];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 10
  def _reduce_4( val, _values, result )
 return {};
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 11
  def _reduce_5( val, _values, result )
 nk = val[1][0]; val[0][nk] = val[1][1]; return val[0];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 12
  def _reduce_6( val, _values, result )
 return ["#{val[0]}", val[1]];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 13
  def _reduce_7( val, _values, result )
 return ["#{val[0]}", true];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 14
  def _reduce_8( val, _values, result )
 return ["#{val[0]}", val[1]];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 15
  def _reduce_9( val, _values, result )
 return ["#{val[0]}", val[1]];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 17
  def _reduce_10( val, _values, result )
 return {};
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 18
  def _reduce_11( val, _values, result )
 return val[2];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 19
  def _reduce_12( val, _values, result )
 return {};
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 20
  def _reduce_13( val, _values, result )
 nk = val[1][0]; val[0][nk] = val[1][1]; return val[0];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 22
  def _reduce_14( val, _values, result )
 return ["#{val[0]}", val[1]];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 23
  def _reduce_15( val, _values, result )
 return ["#{val[0]}", val[2]];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 24
  def _reduce_16( val, _values, result )
 return ["#{val[0]}", val[2]];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 25
  def _reduce_17( val, _values, result )
 return ["#{val[0]}", val[2]];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 26
  def _reduce_18( val, _values, result )
 return ["#{val[0]}", val[2]];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 27
  def _reduce_19( val, _values, result )
 return ["#{val[0]}", val[2]];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 28
  def _reduce_20( val, _values, result )
 return ["#{val[0]}", val[1]];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 30
  def _reduce_21( val, _values, result )
 return {};
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 31
  def _reduce_22( val, _values, result )
 nk = val[1][0]; val[0][nk] = val[1][1]; return val[0];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 33
  def _reduce_23( val, _values, result )
 return ["#{val[1]}", val[3]];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 35
  def _reduce_24( val, _values, result )
 return val[0];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 37
  def _reduce_25( val, _values, result )
 return {};
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 45
  def _reduce_26( val, _values, result )
 nk = val[1][0]; 
			                      if nk == "floating" then
								    if (!val[0]["floating"]) then val[0]["floating"] = {}; end
									val[0]["floating"][val[1][1]] = {}
								  else
			                        val[0][nk] = val[1][1]; 
								  end
								  return val[0];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 59
  def _reduce_27( val, _values, result )
nk = val[1][0]; 
                                  if nk == "on" then 
				                      if (!val[0]["on"]) then val[0]["on"] = {}; end
                                      val[0]["on"][val[1][1]] = val[1][2];  
								  elsif nk == "floating" then
									  if (!val[0]["floating"]) then val[0]["floating"] = {}; end
									  val[0]["floating"][val[1][1]] = val[1][2];
								  elsif nk == "stacked-on-top-of" then
									  if (!val[0]["stacked-on-top-of"]) then val[0]["stacked-on-top-of"] = {}; end
									  val[0]["stacked-on-top-of"][val[1][1]] = val[1][2]
                                  else
                                      val[0][nk] = val[1][1]; 
                                  end
                                  return val[0];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 61
  def _reduce_28( val, _values, result )
 return ["#{val[0]}", val[1]];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 62
  def _reduce_29( val, _values, result )
 return ["#{val[0]}", "#{val[1]} #{val[2]}"];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 63
  def _reduce_30( val, _values, result )
 return ["#{val[0]}", val[1]];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 64
  def _reduce_31( val, _values, result )
 return ["#{val[0]}", val[1]];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 65
  def _reduce_32( val, _values, result )
 return ["#{val[0]}", val[1]];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 67
  def _reduce_33( val, _values, result )
 return "";
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 68
  def _reduce_34( val, _values, result )
 return "minor #{val[1]}";
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 70
  def _reduce_35( val, _values, result )
 return ["#{val[0]}", val[1]];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 71
  def _reduce_36( val, _values, result )
 return ["#{val[0]}", val[2]];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 72
  def _reduce_37( val, _values, result )
 return ["#{val[0]}", val[2]];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 73
  def _reduce_38( val, _values, result )
 return ["#{val[0]}", val[2]];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 74
  def _reduce_39( val, _values, result )
 return ["#{val[0]}", val[2]];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 75
  def _reduce_40( val, _values, result )
 return ["#{val[0]}", val[2]];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 76
  def _reduce_41( val, _values, result )
 return ["#{val[0]}", "#{val[1]}", val[3]];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 77
  def _reduce_42( val, _values, result )
 return ["#{val[0]}", "#{val[1]}", val[3]];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 78
  def _reduce_43( val, _values, result )
 return ["#{val[0]}", "#{val[1]}", val[3]];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 80
  def _reduce_44( val, _values, result )
 return val[0];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 82
  def _reduce_45( val, _values, result )
 return {};
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 83
  def _reduce_46( val, _values, result )
 nk = val[1][0]; val[0][nk] = val[1][1]; return val[0];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 85
  def _reduce_47( val, _values, result )
 return ["#{val[0]}", val[1]];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 86
  def _reduce_48( val, _values, result )
 return ["#{val[0]}", val[1]];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 87
  def _reduce_49( val, _values, result )
 return ["#{val[0]}", val[1]];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 88
  def _reduce_50( val, _values, result )
 return ["#{val[0]}", val[1]];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 89
  def _reduce_51( val, _values, result )
 return ["#{val[0]}", val[1]];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 90
  def _reduce_52( val, _values, result )
 return ["#{val[0]}", val[1]];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 91
  def _reduce_53( val, _values, result )
 return ["#{val[0]}", val[1]];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 92
  def _reduce_54( val, _values, result )
 return ["#{val[0]}", val[1]];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 93
  def _reduce_55( val, _values, result )
 return ["#{val[0]}", val[1]];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 95
  def _reduce_56( val, _values, result )
 return {};
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 96
  def _reduce_57( val, _values, result )
 nk = val[1][0]; val[0][nk] = val[1][1]; return val[0];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 98
  def _reduce_58( val, _values, result )
 return ["#{val[0]}", val[1]];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 99
  def _reduce_59( val, _values, result )
 return ["#{val[0]}", val[1]];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 100
  def _reduce_60( val, _values, result )
 return ["#{val[0]}", val[1]];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 101
  def _reduce_61( val, _values, result )
 return ["#{val[0]}", val[1]];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 102
  def _reduce_62( val, _values, result )
 return ["#{val[0]}", val[1]];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 103
  def _reduce_63( val, _values, result )
 return ["#{val[0]}", val[1]];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 104
  def _reduce_64( val, _values, result )
 return ["#{val[0]}", val[1]];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 105
  def _reduce_65( val, _values, result )
 return ["#{val[0]}", val[1]];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 106
  def _reduce_66( val, _values, result )
 return ["#{val[0]}", val[1]];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 107
  def _reduce_67( val, _values, result )
 return ["#{val[0]}", val[1]];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 108
  def _reduce_68( val, _values, result )
 return ["#{val[0]}", val[1]];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 109
  def _reduce_69( val, _values, result )
 return ["#{val[0]}", val[1]];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 110
  def _reduce_70( val, _values, result )
 return ["#{val[0]}", val[1]];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 111
  def _reduce_71( val, _values, result )
 return ["#{val[0]}", val[1]];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 112
  def _reduce_72( val, _values, result )
 return ["#{val[0]}", val[1]];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 113
  def _reduce_73( val, _values, result )
 return ["#{val[0]}", val[1]];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 114
  def _reduce_74( val, _values, result )
 return ["#{val[0]}", val[1]];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 115
  def _reduce_75( val, _values, result )
 return ["#{val[0]}", true];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 116
  def _reduce_76( val, _values, result )
 return ["#{val[0]}", val[1]];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 118
  def _reduce_77( val, _values, result )
 return {};
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 119
  def _reduce_78( val, _values, result )
 nk = val[1][0]; val[0][nk] = val[1][1]; return val[0];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 121
  def _reduce_79( val, _values, result )
 return ["#{val[0]}", val[1]];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 122
  def _reduce_80( val, _values, result )
 return ["#{val[0]}", vavl[1]];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 123
  def _reduce_81( val, _values, result )
 return ["#{val[0]}", val[1]];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 124
  def _reduce_82( val, _values, result )
 return ["#{val[0]}", val[1]];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 125
  def _reduce_83( val, _values, result )
 return ["#{val[0]}", val[1]];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 127
  def _reduce_84( val, _values, result )
 return {};
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 128
  def _reduce_85( val, _values, result )
 nk = val[1][0]; val[0][nk] = val[1][1]; return val[0];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 130
  def _reduce_86( val, _values, result )
 return ["#{val[0]}", val[1]];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 131
  def _reduce_87( val, _values, result )
 return ["#{val[0]}", val[1]];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 132
  def _reduce_88( val, _values, result )
 return ["#{val[0]}", val[1]];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 133
  def _reduce_89( val, _values, result )
 return ["#{val[0]}", val[1]];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 135
  def _reduce_90( val, _values, result )
 return {};
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 136
  def _reduce_91( val, _values, result )
 nk = val[1][0]; val[0][nk] = val[1][1]; return val[0];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 138
  def _reduce_92( val, _values, result )
 return ["#{val[0]}", val[1]];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 139
  def _reduce_93( val, _values, result )
 return ["#{val[0]}", val[1]];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 141
  def _reduce_94( val, _values, result )
 return {};
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 142
  def _reduce_95( val, _values, result )
 nk = val[1][0]; val[0][nk] = val[1][1]; return val[0];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 144
  def _reduce_96( val, _values, result )
 return ["#{val[0]}", val[1]];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 145
  def _reduce_97( val, _values, result )
 return ["#{val[0]}", "#{val[1]} #{val[2]}"];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 146
  def _reduce_98( val, _values, result )
 return ["#{val[0]}", val[1]];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 147
  def _reduce_99( val, _values, result )
 return ["#{val[0]}", val[1]];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 148
  def _reduce_100( val, _values, result )
 return ["#{val[0]}", val[1]];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 150
  def _reduce_101( val, _values, result )
 return {};
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 151
  def _reduce_102( val, _values, result )
 nk = val[1][0]; val[0][nk] = val[1][1]; return val[0];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 153
  def _reduce_103( val, _values, result )
 return ["#{val[0]}", val[1]];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 154
  def _reduce_104( val, _values, result )
 return ["#{val[0]}", val[1]];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 155
  def _reduce_105( val, _values, result )
 return ["#{val[0]}", val[1]];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 156
  def _reduce_106( val, _values, result )
 return ["#{val[0]}", val[1]];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 157
  def _reduce_107( val, _values, result )
 return ["#{val[0]}", val[1]];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 158
  def _reduce_108( val, _values, result )
 return ["#{val[0]}", val[1]];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 159
  def _reduce_109( val, _values, result )
 return ["#{val[0]}", val[1]];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 160
  def _reduce_110( val, _values, result )
 return ["#{val[0]}", val[1]];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 162
  def _reduce_111( val, _values, result )
 return "#{val[0]}:#{val[2]}";
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 163
  def _reduce_112( val, _values, result )
 return "#{val[0]} #{val[1]}:#{val[3]}";
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 164
  def _reduce_113( val, _values, result )
 return "#{val[0]} #{val[1]}:#{val[3]}";
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 165
  def _reduce_114( val, _values, result )
 return "#{val[0]}";
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 167
  def _reduce_115( val, _values, result )
 return "#{val[0]} #{val[1]}";
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 168
  def _reduce_116( val, _values, result )
 return val[0];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 170
  def _reduce_117( val, _values, result )
 return val[0];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 172
  def _reduce_118( val, _values, result )
 return {};
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 173
  def _reduce_119( val, _values, result )
 nk = val[1][0]; val[0][nk] = val[1][1]; return val[0];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 175
  def _reduce_120( val, _values, result )
 return ["#{val[0]}", val[1]];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 176
  def _reduce_121( val, _values, result )
 return ["#{val[0]}", true];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 177
  def _reduce_122( val, _values, result )
 return ["#{val[0]}", val[1]];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 178
  def _reduce_123( val, _values, result )
 return ["#{val[0]}", val[1]];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 180
  def _reduce_124( val, _values, result )
 return {};
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 181
  def _reduce_125( val, _values, result )
 nk = val[1][0]; val[0][nk] = val[1][1]; return val[0];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 183
  def _reduce_126( val, _values, result )
 return ["#{val[0]}", val[1]];
   result
  end
.,.,

module_eval <<'.,.,', 'drbd.rb.yy', 184
  def _reduce_127( val, _values, result )
 return ["#{val[0]}", val[1]];
   result
  end
.,.,

 def _reduce_none( val, _values, result )
  result
 end

end   # class DrbdParser

dp = DrbdParser.new

$drbdcfg = "/etc/drbd.conf"
$configstr = ""
in_skip = false

if !File.exist?($drbdcfg+".YaST2prepare")
	file = File.open($drbdcfg+".YaST2prepare", "w")
        file.close
end


File.open($drbdcfg+".YaST2prepare", "r") do |file|
   file.each_line do |line| 
      line = line.gsub(/#.*$/, '').chomp
      if (line =~ /^skip\s+/) then in_skip = true end
      if (line =~ /^\}/ && in_skip == true) then 
      	 in_skip = false 
         line = ""
      end
      if (! in_skip ) then
         $configstr += line.gsub(/#.*$/, '').chomp
      end
   end
end

dp.parse($configstr)



$debug = 0
def errlog (str)
    if $debug == 1 then
	$stderr.puts str
    end
end	

def convertYcp (str)
    return str.gsub(/"/, '\"')
end

def doList (path)
  if path.length == 0 then
    puts "[ \"global\", \"resources\", \"common\" ]"
    return
  end

  res = $drbd
  begin
    path.each do |it|
	  errlog it.to_s
	  errlog "xxx"+res.to_s
	  if res.has_key?(it.chomp) then
		res = res[it.chomp]
      else
	    errlog "quit as not key. " + it
        puts "nil"
        return
      end
    end

	errlog "xxx"+res.to_s
	errlog "xxx"+$drbd.to_s

	if res == nil then
		puts "nil"
		return
	end

    if res.length == 0 then
       str = "[]"
    else
       str = "[ "
       res.keys.each do |key|
          str = str + "\"" + convertYcp(key.to_s) + "\", "
       end
       str = str.chop.chop + " ]"
    end
	puts str
    return

  rescue NoMethodError
    errlog "quit as exceptions happends."
    puts "nil"
    return
  end
end

def doRead(path)
  if path.length == 0 then
    puts "nil"
    return
  end

  res = $drbd
  begin
    path.each do |it|
      if res.has_key?(it.chomp) then
        res = res[it.chomp]
      else
        puts "nil"
        return
      end
    end

    puts '"'+convertYcp(res.to_s)+'"'
    return 
  rescue NoMethodError
    puts "nil"
    return
  end

end

def stripQuote(path)
  path.each_index do |it|
    if ! path[it] == "" and path[it][0] == '"' then
	  path[it]=path[it][1..-2]
	end
  end
  return path
end

def doWrite(path, args)
  errlog "write path is "+path.to_s
  errlog "write args is "+args

  if path.length == 0 then
    commitChange()
    puts "nil"
    return
  end

  path.each_index do |it|
    errlog "found "+path[it]
    if path[it] != "" and path[it][0] == '"' then
	  errlog path[it]+" is changed to "+path[it].chomp()[1..-2]
      path[it]=path[it].chomp()[1..-2]
    end
	if path[it] != "" and path[it][0..1] == "\\\"" then
		errlog path[it]+" is changed to "+path[it].chomp()[1..-3]+"\""
		path[it]=path[it].chomp()[1..-3]+"\""
	end
  end

  if args[0..1] == "\\\"" then
    errlog "args is changed to " + args[1..-3] + "\""
	args = args.chomp()[1..-3]+"\""
  end

  errlog path.to_s

  if path.length < 2 then
    puts "nil"
    return
  end

  if path[-2].chomp == "on" then
    errlog "prepare to change the node name"
    res = $drbd
    res_b = res
    begin
      path.each do |it|
        if res.has_key?(it.chomp) then
          res_b = res
          res = res[it.chomp]
        else
		  puts "nil"
		  return
        end
      end

      errlog "found the node name, change it"
	  if args != "nil" then
        res_b.delete(args)
        res_b[args] = res_b[path[-1].chomp]
        res_b.delete(path[-1].chomp)
	  else
	    res_b.delete(path[-1].chomp)
	  end
      writeFile
      puts "nil"
      return
    rescue
      puts "nil"
      return
    end

  elsif path[-2].chomp == "resources" then
    errlog "prepare to change the resource name"
    if $drbd["resources"].has_key?(path[-1].chomp) then
	  if args != "nil" then
        $drbd["resources"].delete(args)
        $drbd["resources"][args] = $drbd["resources"][path[-1].chomp]
        $drbd["resources"].delete(path[-1].chomp)
	  else
	    $drbd["resources"].delete(path[-1].chomp)
      end	  
      writeFile
      puts "nil"
      return
    end

  else
    errlog "prepare to change the attribute"
    res = $drbd
    res_b = res
    begin
      path.each do |it|
        if res.has_key?(it.chomp) then
          res_b = res
          res = res[it.chomp]
        else
		  res[it.chomp] = Hash.new()
		  res_b = res
		  res = res[it.chomp]
        end
      end

      errlog "found the attribute name, change it"
	  if args != "nil" then
        res_b[path[-1].chomp] = args
	  else
        res_b.delete(path[-1].chomp)
      end	
      writeFile
      puts "nil"
      return
    rescue
      puts "nil"
      return
    end
  end
  puts "nil"
end

def writeFile()
  errlog $drbd.to_s	
  errlog "start to writeFile"
  File.open($drbdcfg+".YaST2new", "w") do |file|
    file.puts "# YaST2 created seperated configuration file"
    file.puts "include \"/etc/drbd.d/global_common.conf\";"
	File.open("/etc/drbd.d/global_common.conf.YaST2new", "w") do |gccfile|

    if $drbd.has_key?("global") then
      gccfile.puts "global {"
      $drbd["global"].each_key do |key|
	    if key == "disable-ip-verification" then
		  if $drbd["global"][key] == "" or $drbd["global"][key] == "true" then
		    gccfile.puts "   "+key+";"
		  end
		else
          gccfile.puts "   "+key+"\t"+$drbd["global"][key]+";"
		end
      end
      gccfile.puts "}"
    end # <-- has global

	if $drbd.has_key?("common") then
		gccfile.puts "common {"

        if $drbd["common"].has_key?("disk_s") then
          gccfile.puts "   disk {"
          $drbd["common"]["disk_s"].each_key do |key|
            gccfile.puts "      "+key+"\t"+$drbd["common"]["disk_s"][key]+";"
          end
          gccfile.puts "   }"
        end

        if $drbd["common"].has_key?("syncer") then
          gccfile.puts "   syncer {"
          $drbd["common"]["syncer"].each_key do |key|
            gccfile.puts "      "+key+"\t"+$drbd["common"]["syncer"][key]+";"
          end
          gccfile.puts "   }"
        end

        if $drbd["common"].has_key?("net") then
          gccfile.puts "   net {"
          $drbd["common"]["net"].each_key do |key|
            gccfile.puts "      "+key+"\t"+$drbd["common"]["net"][key]+";"
          end
          gccfile.puts "   }"
        end

        if $drbd["common"].has_key?("startup") then
          gccfile.puts "   startup {"
          $drbd["common"]["startup"].each_key do |key|
            gccfile.puts "      "+key+"\t"+$drbd["common"]["startup"][key]+";"
          end
          gccfile.puts "   }"
        end

        if $drbd["common"].has_key?("options") then
          gccfile.puts "   options {"
          $drbd["common"]["options"].each_key do |key|
            gccfile.puts "      "+key+"\t"+$drbd["common"]["options"][key]+";"
          end
          gccfile.puts "   }"
        end

        if $drbd["common"].has_key?("handlers") then
          gccfile.puts "   handlers {"
          $drbd["common"]["handlers"].each_key do |key|
            gccfile.puts "      "+key+"\t"+$drbd["common"]["handlers"][key]+";"
          end
          gccfile.puts "   }"
        end

		gccfile.puts "}"
	end # <-- has common

	end # <-- end of File.open(gccfile)

    if $drbd.has_key?("resources") then
      $drbd["resources"].each_key do |res_name|

	    file.puts "include \"/etc/drbd.d/"+res_name+".res\";" # <-- put the config of resource into a split file.

		File.open("/etc/drbd.d/"+res_name+".res.YaST2new", "w") do |resfile|

        resfile.puts "resource "+res_name+" {"

        if $drbd["resources"][res_name].has_key?("protocol") then
          resfile.puts "   protocol\t"+$drbd["resources"][res_name]["protocol"]+";"
        end
		if $drbd["resources"][res_name].has_key?("device") then
          resfile.puts "   device\t"+$drbd["resources"][res_name]["device"]+";"
        end
		if $drbd["resources"][res_name].has_key?("disk") then
          resfile.puts "   disk\t"+$drbd["resources"][res_name]["disk"]+";"
        end
		if $drbd["resources"][res_name].has_key?("meta-disk") then
          resfile.puts "   meta-disk\t"+$drbd["resources"][res_name]["meta-disk"]+";"
        end

        if $drbd["resources"][res_name].has_key?("disk_s") then
          resfile.puts "   disk {"
          $drbd["resources"][res_name]["disk_s"].each_key do |key|
            resfile.puts "      "+key+"\t"+$drbd["resources"][res_name]["disk_s"][key]+";"
          end
          resfile.puts "   }"
        end

        if $drbd["resources"][res_name].has_key?("syncer") then
          resfile.puts "   syncer {"
          $drbd["resources"][res_name]["syncer"].each_key do |key|
            resfile.puts "      "+key+"\t"+$drbd["resources"][res_name]["syncer"][key]+";"
          end
          resfile.puts "   }"
        end

        if $drbd["resources"][res_name].has_key?("net") then
          resfile.puts "   net {"
          $drbd["resources"][res_name]["net"].each_key do |key|
            resfile.puts "      "+key+"\t"+$drbd["resources"][res_name]["net"][key]+";"
          end
          resfile.puts "   }"
        end

        if $drbd["resources"][res_name].has_key?("startup") then
          resfile.puts "   startup {"
          $drbd["resources"][res_name]["startup"].each_key do |key|
            resfile.puts "      "+key+"\t"+$drbd["resources"][res_name]["startup"][key]+";"
          end
          resfile.puts "   }"
        end

        if $drbd["resources"][res_name].has_key?("options") then
          resfile.puts "   options {"
          $drbd["resources"][res_name]["options"].each_key do |key|
            resfile.puts "      "+key+"\t"+$drbd["resources"][res_name]["options"][key]+";"
          end
          resfile.puts "   }"
        end

        if $drbd["resources"][res_name].has_key?("handlers") then
          resfile.puts "   handlers {"
          $drbd["resources"][res_name]["handlers"].each_key do |key|
            resfile.puts "      "+key+"\t"+$drbd["resources"][res_name]["handlers"][key]+";"
          end
          resfile.puts "   }"
        end

        if $drbd["resources"][res_name].has_key?("on") then
          $drbd["resources"][res_name]["on"].each_key do |node_name|
            resfile.puts "   on "+node_name+" {"
            $drbd["resources"][res_name]["on"][node_name].each_key do |key|
              resfile.puts "      "+key+"\t"+$drbd["resources"][res_name]["on"][node_name][key]+";"
            end
            resfile.puts "   }"
          end
        end

		if $drbd["resources"][res_name].has_key?("stacked-on-top-of") then
		  $drbd["resources"][res_name]["stacked-on-top-of"].each_key do |rn|
		    resfile.puts "   stack_on_top_of "+rn+" {"
			$drbd["resources"][res_name]["stacked-on-top-of"][rn].each_key do |key|
			  resfile.puts "      "+key+"\t"+$drbd["resources"][res_name]["stacked-on-top-of"][rn][key]+";"
			end
			resfile.puts "   }"
		  end
		end

		if $drbd["resources"][res_name].has_key?("floating") then
		  $drbd["resources"][res_name]["floating"].each_key do |ipp|
		    if $drbd["resources"][res_name]["floating"][ipp] == {} then
			  resfile.puts "   floating "+ipp+";"
			else
			  resfile.puts "   floating "+ipp+" {"
			  $drbd["resources"][res_name]["floating"][ipp].each_key do |key|
			    resfile.puts "      "+key+"\t"+$drbd["resources"][res_name]["floating"][ipp][key]+";"
			  end
			  resfile.puts "   }"
			end
		  end
		end # <-- floating key
        resfile.puts "}"
		end # <-- File.open(seperate cfg file)
      end # <-- each resource section
    end # <-- has resources
  end # <-- File.open($drbdcfg)
end # <-- end of function

def commitChange()
  Dir.glob("/etc/drbd.d/*.YaST2new") { |newfile|
    origfile = newfile.split(".")[0..-2].join(".")
    if File.exist?(origfile) then
      File.rename(origfile, origfile+".YaST2save")
    end
    File.rename(newfile, origfile)
  }
  if not File.exist?($drbdcfg+".YaST2new") then
    return
  elsif File.exist?($drbdcfg) then
    File.rename($drbdcfg, $drbdcfg+".YaST2save")
  end
  File.rename($drbdcfg+".YaST2new", $drbdcfg)
end

# `Write (.drbd) means to write the file, other wise, the file is not written anyway

errlog($drbd.to_s)

$stdin.each do |line|
  errlog(line)
  line.chomp
  cmd = line.gsub(/^`?([a-zA-Z]+)\s+$/, '\1')
  path = line.gsub(/^`?([a-zA-Z]+)\s+\(([^,]*)(,.*)?\)$/, '\2').split('.')-[""]-["\n"]
  args = line.gsub(/^`?([a-zA-Z]+)\s+\(([^,]*)(,.*)?\)$/, '\3')
  if args.length != 0 then
    args[0] = ' '
    args = args.lstrip().rstrip()
    if args[0] == '"' then
      args = args[1..-2]
    end
  end
  case cmd
    when /Dir/
      doList(path)
    when /Read/
      doRead(path)
	when /Write/
	  doWrite(path, args)
	when /result/
	  exit
    when /.*/
      puts "nil"
  end
  $stdout.flush
end

