(command.CommandList children: [ (command.If arms: [ (if_arm cond: [ (C {(Id.Lit_LBracket '[')} {($ Id.VSub_Pound '$#')} {(-lt)} {(1)} {(Id.Lit_RBracket ']')}) ] action: [ (command.Sentence child: (C {(echo)} {(DQ (' ') ($ Id.VSub_Number '$0') (' <driver source (e.g., if_em.c)>'))}) terminator: (Token id:Id.Op_Semi val:';' span_id:129) ) (command.Sentence child: (command.ControlFlow token: (Token id:Id.ControlFlow_Exit val:exit span_id:132) arg_word: {(1)} ) terminator: (Token id:Id.Op_Semi val:';' span_id:135) ) ] spids: [107 119] ) ] ) (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:__ifp__) op: assign_op.Equal rhs: {(DQ (ifp))} spids: [143] ) ] ) terminator: (Token id:Id.Op_Semi val:';' span_id:147) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:file) op: assign_op.Equal rhs: {($ Id.VSub_Number '$1')} spids: [150] ) ] ) (command.ShFunction name: rotateCursor body: (command.BraceGroup children: [ (command.Case to_match: {($ Id.VSub_DollarName '$toggle')} arms: [ (case_arm pat_list: [{(1)}] action: [ (C {(printf)} { (DQ (' ') (word_part.EscapedLiteral token: (Token id:Id.Lit_EscapedChar val:'\\\\' span_id:177) ) (' ') ) } ) (C {(printf)} {(DQ (Id.Lit_Other '\\') (b) (Id.Lit_Other '\\') (b))}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:toggle) op: assign_op.Equal rhs: {(DQ (2))} spids: [192] ) ] ) ] spids: [169 170 198 -1] ) (case_arm pat_list: [{(2)}] action: [ (C {(printf)} {(DQ (' | '))}) (C {(printf)} {(DQ (Id.Lit_Other '\\') (b) (Id.Lit_Other '\\') (b) (Id.Lit_Other '\\') (b))} ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:toggle) op: assign_op.Equal rhs: {(DQ (3))} spids: [225] ) ] ) ] spids: [202 203 231 -1] ) (case_arm pat_list: [{(3)}] action: [ (C {(printf)} {(DQ (' / '))}) (C {(printf)} {(DQ (Id.Lit_Other '\\') (b) (Id.Lit_Other '\\') (b) (Id.Lit_Other '\\') (b))} ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:toggle) op: assign_op.Equal rhs: {(DQ (4))} spids: [258] ) ] ) ] spids: [235 236 264 -1] ) (case_arm pat_list: [{(Id.Lit_Star '*')}] action: [ (C {(printf)} {(DQ (' - '))}) (C {(printf)} {(DQ (Id.Lit_Other '\\') (b) (Id.Lit_Other '\\') (b) (Id.Lit_Other '\\') (b))} ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:toggle) op: assign_op.Equal rhs: {(DQ (1))} spids: [291] ) ] ) ] spids: [268 269 297 -1] ) ] ) ] ) ) (command.ShFunction name: handle_set body: (command.BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:line) op: assign_op.Equal rhs: {($ Id.VSub_Number '$1')} spids: [315] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:set) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_Backtick val:'`' span_id:320) command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(echo)} {($ Id.VSub_DollarName '$line')}) (C {(grep)} {(DQ ($ Id.VSub_DollarName '$__ifp__') ('->.* = '))}) ] negated: F ) ] ) ) } spids: [319] ) ] ) (command.If arms: [ (if_arm cond: [ (C {(Id.Lit_LBracket '[')} {(Id.KW_Bang '!')} {(-z)} {(DQ ($ Id.VSub_DollarName '$set'))} {(Id.Lit_RBracket ']')} ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:word) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_Backtick val:'`' span_id:356) command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(echo)} {($ Id.VSub_DollarName '$line')}) (C {(awk)} {(-F)} {(DQ (if_))} { (SQ (Token id: Id.Lit_Chars val: ' { print $2 }' span_id: 374 ) ) } ) (C {(awk)} {(-F) (DQ (' ='))} { (SQ (Token id: Id.Lit_Chars val: '{ print $1 }' span_id: 387 ) ) } ) ] negated: F ) ] ) ) } spids: [355] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:value) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_Backtick val:'`' span_id:393) command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(echo)} {($ Id.VSub_DollarName '$line')}) (C {(awk)} {(-F)} {(DQ ('='))} { (SQ (Token id: Id.Lit_Chars val: '{ print $2 }' span_id: 411 ) ) } ) (C {(sed)} {(-e)} {(SQ (Token id:Id.Lit_Chars val:'s/;//g' span_id:421))} ) ] negated: F ) ] ) ) } spids: [392] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:new) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_Backtick val:'`' span_id:427) command_list: (command.CommandList children: [ (C {(echo)} {(if_set) ($ Id.VSub_DollarName '$word') (DQ (Id.Lit_Other '\\') ('(') ($ Id.VSub_DollarName '$__ifp__') (',') ) ($ Id.VSub_DollarName '$value') (DQ (');')) } ) ] ) ) } spids: [426] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:new) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_Backtick val:'`' span_id:450) command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(echo)} {($ Id.VSub_DollarName '$new')}) (C {(sed)} {(-e)} { (SQ (Token id: Id.Lit_Chars val: 's/&/\\\\&/' span_id: 467 ) ) } ) ] negated: F ) ] ) ) } spids: [449] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:old) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_Backtick val:'`' span_id:473) command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(echo)} {($ Id.VSub_DollarName '$line')}) (C {(sed)} {(-e)} { (SQ (Token id: Id.Lit_Chars val: 's/^[ \t]*//' span_id: 485 ) ) } ) ] negated: F ) ] ) ) } spids: [472] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:line) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_Backtick val:'`' span_id:491) command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(echo)} {($ Id.VSub_DollarName '$line')}) (C {(sed)} {(-e) (SQ (Token id:Id.Lit_Chars val:s/ span_id:503)) ($ Id.VSub_DollarName '$old') (SQ (Token id:Id.Lit_Chars val:/ span_id:507)) ($ Id.VSub_DollarName '$new') (SQ (Token id:Id.Lit_Chars val:/g span_id:511)) } ) ] negated: F ) ] ) ) } spids: [490] ) ] ) (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:516) arg_word: {(0)} ) ] spids: [337 352] ) ] ) (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:524) arg_word: {(1)} ) ] ) ) (command.ShFunction name: handle_inc body: (command.BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:line) op: assign_op.Equal rhs: {($ Id.VSub_Number '$1')} spids: [538] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:inc) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_Backtick val:'`' span_id:544) command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(echo)} {($ Id.VSub_DollarName '$line')}) (C {(grep)} { (DQ ($ Id.VSub_DollarName '$__ifp__') ('->.*++') (Id.Lit_Other '\\') ('|++') ($ Id.VSub_DollarName '$__ifp__') ('->.*') ) } ) ] negated: F ) ] ) ) } spids: [543] ) ] ) (command.If arms: [ (if_arm cond: [ (C {(Id.Lit_LBracket '[')} {(Id.KW_Bang '!')} {(-z)} {(DQ ($ Id.VSub_DollarName '$inc'))} {(Id.Lit_RBracket ']')} ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:word) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_Backtick val:'`' span_id:587) command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(echo)} {($ Id.VSub_DollarName '$line')}) (C {(awk)} {(-F) (DQ (if_))} { (SQ (Token id: Id.Lit_Chars val: '{ print $2 }' span_id: 606 ) ) } ) (C {(awk)} {(-F) (DQ (Id.Lit_Other '\\') ('+'))} { (SQ (Token id: Id.Lit_Chars val: '{ print $1}' span_id: 618 ) ) } ) ] negated: F ) ] ) ) } spids: [586] ) ] ) (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:value) op: assign_op.Equal rhs: {(SQ (Token id:Id.Lit_Chars val:' 1' span_id:625))} spids: [623] ) ] ) terminator: (Token id:Id.Op_Semi val:';' span_id:627) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:old) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_Backtick val:'`' span_id:631) command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(echo)} {($ Id.VSub_DollarName '$line')}) (C {(sed)} {(-e)} { (SQ (Token id: Id.Lit_Chars val: 's/^[ \t]*//' span_id: 643 ) ) } ) ] negated: F ) ] ) ) } spids: [630] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:new) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_Backtick val:'`' span_id:649) command_list: (command.CommandList children: [ (C {(echo)} {(if_inc) ($ Id.VSub_DollarName '$word') (DQ (Id.Lit_Other '\\') ('(') ($ Id.VSub_DollarName '$__ifp__') (',') ) ($ Id.VSub_DollarName '$value') (DQ (');')) } ) ] ) ) } spids: [648] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:new) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_Backtick val:'`' span_id:672) command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(echo)} {($ Id.VSub_DollarName '$new')}) (C {(sed)} {(-e)} { (SQ (Token id: Id.Lit_Chars val: 's/&/\\\\&/' span_id: 689 ) ) } ) ] negated: F ) ] ) ) } spids: [671] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:line) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_Backtick val:'`' span_id:695) command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(echo)} {($ Id.VSub_DollarName '$line')}) (C {(sed)} {(-e) (SQ (Token id:Id.Lit_Chars val:s/ span_id:707)) ($ Id.VSub_DollarName '$old') (SQ (Token id:Id.Lit_Chars val:/ span_id:711)) ($ Id.VSub_DollarName '$new') (SQ (Token id:Id.Lit_Chars val:/g span_id:715)) } ) ] negated: F ) ] ) ) } spids: [694] ) ] ) (command.Sentence child: (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:720) arg_word: {(0)} ) terminator: (Token id:Id.Op_Semi val:';' span_id:723) ) ] spids: [568 583] ) ] ) (command.Sentence child: (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:730) arg_word: {(1)} ) terminator: (Token id:Id.Op_Semi val:';' span_id:733) ) ] ) ) (command.ShFunction name: handle_add body: (command.BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:line) op: assign_op.Equal rhs: {($ Id.VSub_Number '$1')} spids: [745] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:add) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_Backtick val:'`' span_id:750) command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(echo)} {($ Id.VSub_DollarName '$line')}) (C {(grep)} {(DQ ($ Id.VSub_DollarName '$__ifp__') ('->.*+= '))}) ] negated: F ) ] ) ) } spids: [749] ) ] ) (command.If arms: [ (if_arm cond: [ (C {(Id.Lit_LBracket '[')} {(Id.KW_Bang '!')} {(-z)} {(DQ ($ Id.VSub_DollarName '$add'))} {(Id.Lit_RBracket ']')} ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:word) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_Backtick val:'`' span_id:785) command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(echo)} {($ Id.VSub_DollarName '$line')}) (C {(awk)} {(-F) (DQ (if_))} { (SQ (Token id: Id.Lit_Chars val: '{ print $2 }' span_id: 802 ) ) } ) (C {(awk)} { (SQ (Token id: Id.Lit_Chars val: '{ print $1}' span_id: 808 ) ) } ) ] negated: F ) ] ) ) } spids: [784] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:value) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_Backtick val:'`' span_id:814) command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(echo)} {($ Id.VSub_DollarName '$line')}) (C {(awk)} {(-F) (DQ ('='))} { (SQ (Token id: Id.Lit_Chars val: '{ print $2}' span_id: 831 ) ) } ) (C {(sed)} {(-e)} {(SQ (Token id:Id.Lit_Chars val:'s/;//g' span_id:841))} ) ] negated: F ) ] ) ) } spids: [813] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:new) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_Backtick val:'`' span_id:847) command_list: (command.CommandList children: [ (C {(echo)} {(if_inc) ($ Id.VSub_DollarName '$word') (DQ (Id.Lit_Other '\\') ('(') ($ Id.VSub_DollarName '$__ifp__') (',') ($ Id.VSub_DollarName '$value') (');') ) } ) ] ) ) } spids: [846] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:new) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_Backtick val:'`' span_id:868) command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(echo)} {($ Id.VSub_DollarName '$new')}) (C {(sed)} {(-e)} { (SQ (Token id: Id.Lit_Chars val: 's/&/\\\\&/' span_id: 885 ) ) } ) ] negated: F ) ] ) ) } spids: [867] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:old) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_Backtick val:'`' span_id:891) command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(echo)} {($ Id.VSub_DollarName '$line')}) (C {(sed)} {(-e)} { (SQ (Token id: Id.Lit_Chars val: 's/^[ \t]*//' span_id: 903 ) ) } ) ] negated: F ) ] ) ) } spids: [890] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:line) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_Backtick val:'`' span_id:909) command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(echo)} {($ Id.VSub_DollarName '$line')}) (C {(sed)} {(-e) (SQ (Token id:Id.Lit_Chars val:s/ span_id:921)) ($ Id.VSub_DollarName '$old') (SQ (Token id:Id.Lit_Chars val:/ span_id:925)) ($ Id.VSub_DollarName '$new') (SQ (Token id:Id.Lit_Chars val:/g span_id:929)) } ) ] negated: F ) ] ) ) } spids: [908] ) ] ) (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:934) arg_word: {(0)} ) ] spids: [766 781] ) ] ) (command.Sentence child: (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:942) arg_word: {(1)} ) terminator: (Token id:Id.Op_Semi val:';' span_id:945) ) ] ) ) (command.ShFunction name: handle_or body: (command.BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:line) op: assign_op.Equal rhs: {($ Id.VSub_Number '$1')} spids: [958] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:or) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_Backtick val:'`' span_id:963) command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(echo)} {($ Id.VSub_DollarName '$line')}) (C {(grep)} {(DQ ($ Id.VSub_DollarName '$__ifp__') ('->.*|= '))}) ] negated: F ) ] ) ) } spids: [962] ) ] ) (command.If arms: [ (if_arm cond: [ (C {(Id.Lit_LBracket '[')} {(Id.KW_Bang '!')} {(-z)} {(DQ ($ Id.VSub_DollarName '$or'))} {(Id.Lit_RBracket ']')} ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:word) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_Backtick val:'`' span_id:998) command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(echo)} {($ Id.VSub_DollarName '$line')}) (C {(awk)} {(-F) (DQ (if_))} { (SQ (Token id: Id.Lit_Chars val: '{ print $2 }' span_id: 1015 ) ) } ) (C {(awk)} { (SQ (Token id: Id.Lit_Chars val: '{ print $1}' span_id: 1021 ) ) } ) ] negated: F ) ] ) ) } spids: [997] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:value) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_Backtick val:'`' span_id:1028) command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(echo)} {($ Id.VSub_DollarName '$line')}) (C {(awk)} {(-F) (DQ ('='))} { (SQ (Token id: Id.Lit_Chars val: '{ print $2}' span_id: 1045 ) ) } ) (C {(sed)} {(-e)} {(SQ (Token id:Id.Lit_Chars val:'s/;//g' span_id:1055))} ) ] negated: F ) ] ) ) } spids: [1027] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:new) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_Backtick val:'`' span_id:1061) command_list: (command.CommandList children: [ (C {(echo)} {(if_set) (${ Id.VSub_Name word) (bit) (DQ ('(') ($ Id.VSub_DollarName '$__ifp__') (',') ($ Id.VSub_DollarName '$value') (', 0);') ) } ) ] ) ) } spids: [1060] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:new) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_Backtick val:'`' span_id:1082) command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(echo)} {($ Id.VSub_DollarName '$new')}) (C {(sed)} {(-e)} { (SQ (Token id: Id.Lit_Chars val: 's/&/\\\\&/' span_id: 1099 ) ) } ) ] negated: F ) ] ) ) } spids: [1081] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:old) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_Backtick val:'`' span_id:1110) command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(echo)} {($ Id.VSub_DollarName '$line')}) (C {(sed)} {(-e)} { (SQ (Token id: Id.Lit_Chars val: 's/^[ \t]*//' span_id: 1122 ) ) } ) ] negated: F ) ] ) ) } spids: [1109] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:line) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_Backtick val:'`' span_id:1128) command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(echo)} {($ Id.VSub_DollarName '$line')}) (C {(sed)} {(-e) (SQ (Token id:Id.Lit_Chars val:s/ span_id:1140)) ($ Id.VSub_DollarName '$old') (SQ (Token id:Id.Lit_Chars val:/ span_id:1144)) ($ Id.VSub_DollarName '$new') (SQ (Token id:Id.Lit_Chars val:/g span_id:1148)) } ) ] negated: F ) ] ) ) } spids: [1127] ) ] ) (command.Sentence child: (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:1153) arg_word: {(0)} ) terminator: (Token id:Id.Op_Semi val:';' span_id:1156) ) ] spids: [979 994] ) ] ) (command.Sentence child: (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:1162) arg_word: {(1)} ) terminator: (Token id:Id.Op_Semi val:';' span_id:1165) ) ] ) ) (command.ShFunction name: handle_and body: (command.BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:line) op: assign_op.Equal rhs: {($ Id.VSub_Number '$1')} spids: [1178] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:or) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_Backtick val:'`' span_id:1183) command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(echo)} {($ Id.VSub_DollarName '$line')}) (C {(grep)} {(DQ ($ Id.VSub_DollarName '$__ifp__') ('->.*&= '))}) ] negated: F ) ] ) ) } spids: [1182] ) ] ) (command.If arms: [ (if_arm cond: [ (C {(Id.Lit_LBracket '[')} {(Id.KW_Bang '!')} {(-z)} {(DQ ($ Id.VSub_DollarName '$or'))} {(Id.Lit_RBracket ']')} ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:word) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_Backtick val:'`' span_id:1218) command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(echo)} {($ Id.VSub_DollarName '$line')}) (C {(awk)} {(-F) (DQ (if_))} { (SQ (Token id: Id.Lit_Chars val: '{ print $2 }' span_id: 1235 ) ) } ) (C {(awk)} { (SQ (Token id: Id.Lit_Chars val: '{ print $1}' span_id: 1241 ) ) } ) ] negated: F ) ] ) ) } spids: [1217] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:value) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_Backtick val:'`' span_id:1248) command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(echo)} {($ Id.VSub_DollarName '$line')}) (C {(awk)} {(-F) (DQ ('='))} { (SQ (Token id: Id.Lit_Chars val: '{ print $2}' span_id: 1265 ) ) } ) (C {(sed)} {(-e)} {(SQ (Token id:Id.Lit_Chars val:'s/;//g' span_id:1275))} ) ] negated: F ) ] ) ) } spids: [1247] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:value) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_Backtick val:'`' span_id:1281) command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(echo)} {($ Id.VSub_DollarName '$value')}) (C {(sed)} {(-e) (SQ (Token id:Id.Lit_Chars val:'s/~//g' span_id:1294)) } ) ] negated: F ) ] ) ) } spids: [1280] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:new) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_Backtick val:'`' span_id:1300) command_list: (command.CommandList children: [ (C {(echo)} {(if_set) (${ Id.VSub_Name word) (bit) (DQ (Id.Lit_Other '\\') ('(') ($ Id.VSub_DollarName '$__ifp__') (', 0,') ($ Id.VSub_DollarName '$value') (');') ) } ) ] ) ) } spids: [1299] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:new) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_Backtick val:'`' span_id:1324) command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(echo)} {($ Id.VSub_DollarName '$new')}) (C {(sed)} {(-e)} { (SQ (Token id: Id.Lit_Chars val: 's/&/\\\\&/' span_id: 1341 ) ) } ) ] negated: F ) ] ) ) } spids: [1323] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:old) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_Backtick val:'`' span_id:1347) command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(echo)} {($ Id.VSub_DollarName '$line')}) (C {(sed)} {(-e)} { (SQ (Token id: Id.Lit_Chars val: 's/^[ \t]*//' span_id: 1359 ) ) } ) ] negated: F ) ] ) ) } spids: [1346] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:line) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_Backtick val:'`' span_id:1365) command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(echo)} {($ Id.VSub_DollarName '$line')}) (C {(sed)} {(-e) (SQ (Token id:Id.Lit_Chars val:s/ span_id:1377)) ($ Id.VSub_DollarName '$old') (SQ (Token id:Id.Lit_Chars val:/ span_id:1381)) ($ Id.VSub_DollarName '$new') (SQ (Token id:Id.Lit_Chars val:/g span_id:1385)) } ) ] negated: F ) ] ) ) } spids: [1364] ) ] ) (command.Sentence child: (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:1390) arg_word: {(0)} ) terminator: (Token id:Id.Op_Semi val:';' span_id:1393) ) ] spids: [1199 1214] ) ] ) (command.Sentence child: (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:1399) arg_word: {(1)} ) terminator: (Token id:Id.Op_Semi val:';' span_id:1402) ) ] ) ) (command.ShFunction name: handle_toggle body: (command.BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:line) op: assign_op.Equal rhs: {($ Id.VSub_Number '$1')} spids: [1415] ) ] ) (command.If arms: [ (if_arm cond: [ (C {(Id.Lit_LBracket '[')} {(Id.KW_Bang '!')} {(-z)} { (command_sub left_token: (Token id:Id.Left_Backtick val:'`' span_id:1427) command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(echo)} {($ Id.VSub_DollarName '$line')}) (C {(grep)} {(DQ (Id.Lit_Other '\\') ('^='))}) ] negated: F ) ] ) ) } {(Id.Lit_RBracket ']')} ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:line) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_Backtick val:'`' span_id:1453) command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(echo)} {($ Id.VSub_DollarName '$line')}) (C {(sed)} {(-e)} {(SQ (Token id:Id.Lit_Chars val:s/ span_id:1479)) (DQ ($ Id.VSub_DollarName '$__ifp__')) (SQ (Token id:Id.Lit_Chars val:'->if_\\(.*\\) ^=\\(.*\\);/if_toggle\\1(' span_id:1485)) (DQ ($ Id.VSub_DollarName '$__ifp__')) (SQ (Token id:Id.Lit_Chars val:',\\2);/g' span_id:1491)) } ) ] negated: F ) ] ) ) } spids: [1452] ) ] ) (command.Sentence child: (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:1496) arg_word: {(0)} ) terminator: (Token id:Id.Op_Semi val:';' span_id:1499) ) ] spids: [1419 1449] ) ] ) (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:1505) arg_word: {(1)} ) ] ) ) (command.ShFunction name: handle_misc body: (command.BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:line) op: assign_op.Equal rhs: {($ Id.VSub_Number '$1')} spids: [1523] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:get) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_Backtick val:'`' span_id:1528) command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(echo)} {($ Id.VSub_DollarName '$line')}) (C {(grep)} { (DQ (if_capabilities) (Id.Lit_Other '\\') ('|if_flags') (Id.Lit_Other '\\') ('|if_softc') (Id.Lit_Other '\\') ('|if_capenable') (Id.Lit_Other '\\') ('|if_mtu') (Id.Lit_Other '\\') ('|if_drv_flags') ) } ) ] negated: F ) ] ) ) } spids: [1527] ) ] ) (command.If arms: [ (if_arm cond: [ (C {(Id.Lit_LBracket '[')} {(Id.KW_Bang '!')} {(-z)} {(DQ ($ Id.VSub_DollarName '$get'))} {(Id.Lit_RBracket ']')} ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:word) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_Backtick val:'`' span_id:1584) command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(echo)} {($ Id.VSub_DollarName '$line')}) (C {(awk)} {(-F) (DQ ($ Id.VSub_DollarName '$__ifp__') ('->if_'))} {(SQ (Token id:Id.Lit_Chars val:'{ print $2 }' span_id:1608))} ) (C {(sed)} {(-e) (SQ (Token id: Id.Lit_Chars val: 's/[^a-zA-Z0-9_]/\\@/' span_id: 1619 ) ) } ) (C {(awk)} {(-F) (DQ (Id.Lit_Other '\\') ('@'))} { (SQ (Token id: Id.Lit_Chars val: '{ print $1}' span_id: 1631 ) ) } ) ] negated: F ) ] ) ) } spids: [1583] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:old) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_Backtick val:'`' span_id:1637) command_list: (command.CommandList children: [ (C {(echo)} {(DQ ($ Id.VSub_DollarName '$__ifp__') ('->if_')) (${ Id.VSub_Name word) } ) ] ) ) } spids: [1636] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:new) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_Backtick val:'`' span_id:1653) command_list: (command.CommandList children: [ (C {(echo)} {(DQ (if_get)) (${ Id.VSub_Name word) (DQ ('(') ($ Id.VSub_DollarName '$__ifp__') (')')) } ) ] ) ) } spids: [1652] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:new) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_Backtick val:'`' span_id:1673) command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(echo)} {($ Id.VSub_DollarName '$new')}) (C {(sed)} {(-e)} { (SQ (Token id: Id.Lit_Chars val: 's/&/\\\\&/' span_id: 1690 ) ) } ) ] negated: F ) ] ) ) } spids: [1672] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:line) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_Backtick val:'`' span_id:1696) command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(echo)} {($ Id.VSub_DollarName '$line')}) (C {(sed)} {(-e) (SQ (Token id:Id.Lit_Chars val:s/ span_id:1708)) ($ Id.VSub_DollarName '$old') (SQ (Token id:Id.Lit_Chars val:/ span_id:1712)) ($ Id.VSub_DollarName '$new') (SQ (Token id:Id.Lit_Chars val:/g span_id:1716)) } ) ] negated: F ) ] ) ) } spids: [1695] ) ] ) (command.Sentence child: (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:1721) arg_word: {(0)} ) terminator: (Token id:Id.Op_Semi val:';' span_id:1724) ) ] spids: [1565 1580] ) ] ) (command.Sentence child: (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:1730) arg_word: {(1)} ) terminator: (Token id:Id.Op_Semi val:';' span_id:1733) ) ] ) ) (command.ShFunction name: replace_str body: (command.BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:line) op: assign_op.Equal rhs: {($ Id.VSub_Number '$1')} spids: [1747] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:orig) op: assign_op.Equal rhs: {($ Id.VSub_Number '$2')} spids: [1751] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:new) op: assign_op.Equal rhs: {($ Id.VSub_Number '$3')} spids: [1755] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:line) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_Backtick val:'`' span_id:1760) command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(echo)} {($ Id.VSub_DollarName '$line')}) (C {(sed)} {(-e)} {(SQ (Token id:Id.Lit_Chars val:s/ span_id:1780)) (DQ ($ Id.VSub_DollarName '$orig')) (SQ (Token id:Id.Lit_Chars val:'\\(.*\\)/' span_id:1786)) (DQ ($ Id.VSub_DollarName '$new')) (SQ (Token id:Id.Lit_Chars val:'\\1/g' span_id:1792)) } ) ] negated: F ) ] ) ) } spids: [1759] ) ] ) (command.Sentence child: (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:1797) arg_word: {(0)} ) terminator: (Token id:Id.Op_Semi val:';' span_id:1800) ) ] ) ) (command.ShFunction name: handle_special body: (command.BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:line) op: assign_op.Equal rhs: {($ Id.VSub_Number '$1')} spids: [1816] ) ] ) (C {(replace_str)} {($ Id.VSub_DollarName '$line')} {(DQ ('(') (Id.Lit_Other '\\') ('*') ($ Id.VSub_DollarName '$__ifp__') ('->if_input)'))} {(DQ (if_input))} ) (C {(replace_str)} {($ Id.VSub_DollarName '$line')} {(DQ (if_setinit))} {(DQ (if_setinitfn))}) (C {(replace_str)} {($ Id.VSub_DollarName '$line')} {(DQ (if_setioctl))} {(DQ (if_setioctlfn))} ) (C {(replace_str)} {($ Id.VSub_DollarName '$line')} {(DQ (if_getdrv_flags))} {(DQ (if_getdrvflags))} ) (C {(replace_str)} {($ Id.VSub_DollarName '$line')} {(DQ (if_setdrv_flagsbit))} {(DQ (if_setdrvflagbits))} ) (C {(replace_str)} {($ Id.VSub_DollarName '$line')} {(DQ (if_setstart))} {(DQ (if_setstartfn))} ) (C {(replace_str)} {($ Id.VSub_DollarName '$line')} {(DQ (if_sethwassistbit))} {(DQ (if_sethwassistbits))} ) (C {(replace_str)} {($ Id.VSub_DollarName '$line')} {(DQ (ifmedia_init))} {(DQ (ifmedia_init_drv))} ) (C {(replace_str)} {($ Id.VSub_DollarName '$line')} {(DQ ('IFQ_DRV_IS_EMPTY(&') ($ Id.VSub_DollarName '$__ifp__') ('->if_snd)'))} {(DQ ('if_sendq_empty(') ($ Id.VSub_DollarName '$__ifp__') (')'))} ) (C {(replace_str)} {($ Id.VSub_DollarName '$line')} {(DQ ('IFQ_DRV_PREPEND(&') ($ Id.VSub_DollarName '$__ifp__') ('->if_snd'))} {(DQ ('if_sendq_prepend(') ($ Id.VSub_DollarName '$__ifp__'))} ) (C {(replace_str)} {($ Id.VSub_DollarName '$line')} {(DQ ('IFQ_SET_READY(&ifp->if_snd)'))} {(DQ ('if_setsendqready(') ($ Id.VSub_DollarName '$__ifp__') (')'))} ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:line) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_Backtick val:'`' span_id:1977) command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(echo)} {($ Id.VSub_DollarName '$line')}) (C {(sed)} {(-e)} { (SQ (Token id: Id.Lit_Chars val: 's/IFQ_SET_MAXLEN(&' span_id: 1997 ) ) ($ Id.VSub_DollarName '$__ifp__') (SQ (Token id: Id.Lit_Chars val: '->if_snd, \\(.*\\))/if_setsendqlen(' span_id: 2001 ) ) ($ Id.VSub_DollarName '$__ifp__') (SQ (Token id:Id.Lit_Chars val:', \\1)/g' span_id:2005)) } ) ] negated: F ) ] ) ) } spids: [1976] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:line) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_Backtick val:'`' span_id:2011) command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(echo)} {($ Id.VSub_DollarName '$line')}) (C {(sed)} {(-e)} { (SQ (Token id: Id.Lit_Chars val: 's/IFQ_DRV_DEQUEUE(&' span_id: 2031 ) ) ($ Id.VSub_DollarName '$__ifp__') (SQ (Token id: Id.Lit_Chars val: '->if_snd, \\(.*\\))/\\1 = if_dequeue(' span_id: 2035 ) ) ($ Id.VSub_DollarName '$__ifp__') (SQ (Token id:Id.Lit_Chars val:')/g' span_id:2039)) } ) ] negated: F ) ] ) ) } spids: [2010] ) ] ) (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:2044) arg_word: {(0)} ) ] ) ) (command.If arms: [ (if_arm cond: [ (C {(Id.Lit_LBracket '[')} {(-e)} {($ Id.VSub_DollarName '$file') (.tmp)} {(Id.Lit_RBracket ']')} ) ] action: [(C {(rm)} {($ Id.VSub_DollarName '$file') (.tmp)})] spids: [2051 2062] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:IFS) op: assign_op.Equal rhs: (word.Empty) spids: [2072] ) ] ) (C {(echo)} {(-n)} {(DQ ('Conversion for ') ($ Id.VSub_DollarName '$file') (' started, please wait: '))} ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:FAIL_PAT) op: assign_op.Equal rhs: {(DQ ('XXX - DRVAPI'))} spids: [2084] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:count) op: assign_op.Equal rhs: {(0)} spids: [2089] ) ] ) (command.Pipeline children: [ (C {(cat)} {($ Id.VSub_Number '$1')}) (command.WhileUntil keyword: (Token id:Id.KW_While val:while span_id:2098) cond: [(C {(read)} {(-r)} {(line)})] body: (command.DoGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:count) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_Backtick val:'`' span_id:2109) command_list: (command.CommandList children: [ (C {(expr)} {($ Id.VSub_DollarName '$count')} {(Id.Lit_Other '+')} {(1)} ) ] ) ) } spids: [2108] ) ] ) (C {(rotateCursor)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:pat) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_Backtick val:'`' span_id:2125) command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(echo)} {($ Id.VSub_DollarName '$line')}) (C {(grep)} {(DQ ($ Id.VSub_DollarName '$__ifp__') ('->'))}) ] negated: F ) ] ) ) } spids: [2124] ) ] ) (command.WhileUntil keyword: (Token id:Id.KW_While val:while span_id:2142) cond: [ (C {(Id.Lit_LBracket '[')} {(DQ ($ Id.VSub_DollarName '$pat'))} {(Id.KW_Bang '!') (Id.Lit_Equals '=')} {(DQ )} {(Id.Lit_RBracket ']')} ) ] body: (command.DoGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:pat) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_Backtick val:'`' span_id:2162) command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(echo)} {($ Id.VSub_DollarName '$line')}) (C {(grep)} {(DQ ($ Id.VSub_DollarName '$__ifp__') ('->'))} ) ] negated: F ) ] ) ) } spids: [2161] ) ] ) (command.If arms: [ (if_arm cond: [ (C {(Id.Lit_LBracket '[')} {(Id.KW_Bang '!')} {(-z)} { (command_sub left_token: (Token id:Id.Left_Backtick val:'`' span_id:2188) command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(echo)} {($ Id.VSub_DollarName '$pat')}) (C {(grep)} {(DQ ($ Id.VSub_DollarName '$FAIL_PAT'))}) ] negated: F ) ] ) ) } {(Id.Lit_RBracket ']')} ) ] action: [ (command.Sentence child: (command.ControlFlow token: (Token id:Id.ControlFlow_Break val:break span_id:2210) ) terminator: (Token id:Id.Op_Semi val:';' span_id:2211) ) ] spids: [2180 2207] ) ] ) (C {(handle_set)} {($ Id.VSub_DollarName '$line')}) (command.If arms: [ (if_arm cond: [ (C {(Id.Lit_LBracket '[')} {($ Id.VSub_QMark '$?')} {(Id.KW_Bang '!') (Id.Lit_Equals '=')} {(0)} {(Id.Lit_RBracket ']')} ) ] action: [(C {(handle_inc)} {($ Id.VSub_DollarName '$line')})] spids: [2224 2238] ) ] ) (command.If arms: [ (if_arm cond: [ (C {(Id.Lit_LBracket '[')} {($ Id.VSub_QMark '$?')} {(Id.KW_Bang '!') (Id.Lit_Equals '=')} {(0)} {(Id.Lit_RBracket ']')} ) ] action: [(C {(handle_add)} {($ Id.VSub_DollarName '$line')})] spids: [2251 2265] ) ] ) (command.If arms: [ (if_arm cond: [ (C {(Id.Lit_LBracket '[')} {($ Id.VSub_QMark '$?')} {(Id.KW_Bang '!') (Id.Lit_Equals '=')} {(0)} {(Id.Lit_RBracket ']')} ) ] action: [(C {(handle_or)} {($ Id.VSub_DollarName '$line')})] spids: [2277 2291] ) ] ) (command.If arms: [ (if_arm cond: [ (C {(Id.Lit_LBracket '[')} {($ Id.VSub_QMark '$?')} {(Id.KW_Bang '!') (Id.Lit_Equals '=')} {(0)} {(Id.Lit_RBracket ']')} ) ] action: [(C {(handle_and)} {($ Id.VSub_DollarName '$line')})] spids: [2303 2317] ) ] ) (command.If arms: [ (if_arm cond: [ (C {(Id.Lit_LBracket '[')} {($ Id.VSub_QMark '$?')} {(Id.KW_Bang '!') (Id.Lit_Equals '=')} {(0)} {(Id.Lit_RBracket ']')} ) ] action: [(C {(handle_toggle)} {($ Id.VSub_DollarName '$line')})] spids: [2329 2343] ) ] ) (command.If arms: [ (if_arm cond: [ (C {(Id.Lit_LBracket '[')} {($ Id.VSub_QMark '$?')} {(Id.KW_Bang '!') (Id.Lit_Equals '=')} {(0)} {(Id.Lit_RBracket ']')} ) ] action: [(C {(handle_misc)} {($ Id.VSub_DollarName '$line')})] spids: [2355 2369] ) ] ) (command.If arms: [ (if_arm cond: [ (C {(Id.Lit_LBracket '[')} {($ Id.VSub_QMark '$?')} {(Id.KW_Bang '!') (Id.Lit_Equals '=')} {(0)} {(Id.Lit_RBracket ']')} ) ] action: [(C {(handle_special)} {($ Id.VSub_DollarName '$line')})] spids: [2382 2396] ) ] ) (command.If arms: [ (if_arm cond: [ (C {(Id.Lit_LBracket '[')} {(Id.KW_Bang '!')} {(-z)} { (command_sub left_token: (Token id:Id.Left_Backtick val:'`' span_id:2417) command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(echo)} {($ Id.VSub_DollarName '$line')}) (C {(grep)} {(DQ ($ Id.VSub_DollarName '$__ifp__') ('->'))} ) ] negated: F ) ] ) ) } {(Id.Lit_RBracket ']')} ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:line) op: assign_op.Equal rhs: { (command_sub left_token: (Token id: Id.Left_Backtick val: '`' span_id: 2441 ) command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(echo)} {($ Id.VSub_DollarName '$line')}) (C {(sed)} {(-e)} { (SQ (Token id: Id.Lit_Chars val: 's:$: \\/* ' span_id: 2459 ) ) (${ Id.VSub_Name FAIL_PAT) (SQ (Token id:Id.Lit_Chars val:' *\\/:g' span_id:2465)) } ) ] negated: F ) ] ) ) } spids: [2440] ) ] ) ] spids: [2409 2437] ) ] ) ] ) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:line) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_Backtick val:'`' span_id:2476) command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(echo)} {(DQ ($ Id.VSub_DollarName '$line'))}) (C {(sed)} {(-e)} { (SQ (Token id: Id.Lit_Chars val: 's:VLAN_CAPABILITIES(' span_id: 2492 ) ) ($ Id.VSub_DollarName '$__ifp__') (SQ (Token id:Id.Lit_Chars val:'):if_vlancap(' span_id:2496)) ($ Id.VSub_DollarName '$__ifp__') (SQ (Token id:Id.Lit_Chars val:'):g' span_id:2500)) } ) ] negated: F ) ] ) ) } spids: [2475] ) ] ) (command.If arms: [ (if_arm cond: [ (C {(Id.Lit_LBracket '[')} {(Id.KW_Bang '!')} {(-z)} { (command_sub left_token: (Token id:Id.Left_Backtick val:'`' span_id:2517) command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(echo)} {($ Id.VSub_DollarName '$line')}) (C {(grep)} {(DQ ('struct ifnet'))}) ] negated: F ) ] ) ) } {(Id.Lit_RBracket ']')} ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:line) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_Backtick val:'`' span_id:2540) command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(echo)} {($ Id.VSub_DollarName '$line')}) (C {(sed)} {(-e)} { (SQ (Token id: Id.Lit_Chars val: 's/struct ifnet[ \\t]*\\*/if_t /g' span_id: 2558 ) ) } ) ] negated: F ) ] ) ) } spids: [2539] ) ] ) ] spids: [2509 2536] ) ] ) (command.Simple words: [{(echo)} {(DQ ($ Id.VSub_DollarName '$line'))}] redirects: [ (redir.Redir op: (Token id:Id.Redir_DGreat val:'>>' span_id:2572) fd: -1 arg_word: {($ Id.VSub_DollarName '$file') (.tmp)} ) ] ) ] ) ) ] negated: F ) (C {(echo)} {(DQ )}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:count) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_Backtick val:'`' span_id:2585) command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(grep)} {($ Id.VSub_DollarName '$FAIL_PAT')} {($ Id.VSub_DollarName '$file') (.tmp)} ) (C {(wc)} {(-l)}) ] negated: F ) ] ) ) } spids: [2584] ) ] ) (command.If arms: [ (if_arm cond: [ (C {(Id.Lit_LBracket '[')} {($ Id.VSub_DollarName '$count')} {(-gt)} {(0)} {(Id.Lit_RBracket ']')} ) ] action: [ (C {(echo)} {(DQ ($ Id.VSub_DollarName '$count') (' lines could not be converted to DRVAPI'))} ) (C {(echo)} {(DQ ('Look for /* ') ($ Id.VSub_DollarName '$FAIL_PAT') (' */ in the converted file'))} ) ] spids: [2602 2614] ) ] ) (C {(echo)} { (DQ ('original ') ($ Id.VSub_DollarName '$file') (' has been moved to ') ($ Id.VSub_DollarName '$file') (.orig) ) } ) (C {(mv)} {($ Id.VSub_DollarName '$file')} {($ Id.VSub_DollarName '$file') (.orig)}) (C {(mv)} {($ Id.VSub_DollarName '$file') (.tmp)} {($ Id.VSub_DollarName '$file')}) ] )