%{ (* -*- caml -*- *) open Types open Common open Parser_helper let parse_error msg = die_rule msg let prog_ref = ref None let to_String e = Parser_helper.to_String (some !prog_ref) e let from_PATTERN e = Parser_helper.from_PATTERN (some !prog_ref) e let from_PATTERN_SUBST e = Parser_helper.from_PATTERN_SUBST (some !prog_ref) e %} %token EOF %token NUM RAW_STRING BAREWORD BAREWORD_PAREN REVISION COMMENT POD LABEL PO_COMMENT PERL_CHECKER_COMMENT ONE_SCALAR_PARA %token <(string * string) Types.any_spaces_pos> PRINT_TO_STAR PRINT_TO_SCALAR %token QUOTEWORDS COMPACT_HASH_SUBSCRIPT %token <(string * Types.raw_pos) Types.any_spaces_pos> RAW_HERE_DOC %token <(string * ((int * int) * token) list) list Types.any_spaces_pos> STRING COMMAND_STRING %token <((string * ((int * int) * token) list) list * Types.raw_pos) Types.any_spaces_pos> HERE_DOC FORMAT %token <((string * ((int * int) * token) list) list * string) Types.any_spaces_pos> PATTERN QR_PATTERN %token <((string * ((int * int) * token) list) list * (string * ((int * int) * token) list) list * string) Types.any_spaces_pos> PATTERN_SUBST %token <(string option * string) Types.any_spaces_pos> SCALAR_IDENT ARRAY_IDENT HASH_IDENT FUNC_IDENT STAR_IDENT RAW_IDENT RAW_IDENT_PAREN ARRAYLEN_IDENT %token SUB_WITH_PROTO %token <(string option * string * string) Types.any_spaces_pos> FUNC_DECL_WITH_PROTO %token FOR PRINT %token NEW %token COMPARE_OP COMPARE_OP_STR EQ_OP EQ_OP_STR %token ASSIGN MY_OUR %token IF ELSIF ELSE UNLESS DO WHILE UNTIL CONTINUE SUB LOCAL %token USE PACKAGE BEGIN END %token AT DOLLAR PERCENT AMPERSAND STAR ARRAYLEN %token SEMI_COLON PKG_SCOPE %token PAREN PAREN_END %token BRACKET BRACKET_END BRACKET_HASHREF %token ARRAYREF ARRAYREF_END %token ARROW %token INCR DECR %token POWER %token TIGHT_NOT BIT_NEG REF %token PATTERN_MATCH PATTERN_MATCH_NOT %token MULT %token PLUS %token BIT_SHIFT %token LT GT CONCAT MULT_L_STR %token BIT_AND %token BIT_OR BIT_XOR %token AND_TIGHT %token OR_TIGHT %token DOTDOT %token QUESTION_MARK COLON %token COMMA RIGHT_ARROW %token NOT %token AND %token OR XOR %nonassoc PREC_LOW %nonassoc LOOPEX %right OR XOR %right AND %right NOT %nonassoc LSTOP %left COMMA RIGHT_ARROW %right ASSIGN %right QUESTION_MARK COLON %nonassoc DOTDOT %left OR_TIGHT %left AND_TIGHT %left BIT_OR BIT_XOR %left BIT_AND %nonassoc EQ_OP EQ_OP_STR %nonassoc LT GT COMPARE_OP COMPARE_OP_STR %nonassoc UNIOP %left BIT_SHIFT %left PLUS CONCAT %left MULT MULT_L_STR %left PATTERN_MATCH PATTERN_MATCH_NOT %right TIGHT_NOT BIT_NEG REF UNARY_MINUS %right POWER %nonassoc INCR DECR %left ARROW %nonassoc PAREN_END %left PAREN PREC_HIGH %left ARRAYREF BRACKET %type prog %type expr term %type scalar bracket_subscript variable restricted_subscripted %start prog %% prog: lines EOF {$1.any} lines: /* A collection of "lines" in the program */ | { default_esp [] } | sideff { new_1esp [$1.any] $1 } | line lines { if $2.any <> [] then mcontext_check_none "value is dropped" $1.any $1; new_esp $2.mcontext ($1.any @ $2.any) $1 $2 } line: | decl { new_1esp [$1.any] $1 } | if_then_else { new_1esp [$1.any] $1 } | loop { new_1esp [$1.any] $1 } | LABEL { sp_cr($1); new_1esp [Label $1.any] $1 } | PERL_CHECKER_COMMENT {sp_p($1); new_1esp [Perl_checker_comment($1.any, get_pos $1)] $1 } | semi_colon {new_1esp [Semi_colon] $1 } | sideff semi_colon {new_1esp [$1.any ; Semi_colon] $1 } | BRACKET lines BRACKET_END {check_block_sub $2 $3; new_esp $2.mcontext [Block $2.any] $1 $3} | BRACKET lines BRACKET_END semi_colon {check_block_sub $2 $3; new_esp $2.mcontext [Block $2.any] $1 $4} if_then_else: /* Real conditional expressions */ | IF PAREN expr PAREN_END BRACKET lines BRACKET_END elsif else_ {sp_p($1); sp_n($2); sp_0($3); sp_0_or_cr($4); sp_p($5); mcontext_check M_scalar $3; check_block_sub $6 $7; to_Call_op (if $9.any = [] then M_none else mcontext_lmerge ($6.mcontext :: mcontext_lmaybe $8 @ [$9.mcontext])) "if" (prio_lo P_loose $3 :: Block $6.any :: $8.any @ $9.any) $1 $9} | UNLESS PAREN expr PAREN_END BRACKET lines BRACKET_END elsif else_ {sp_p($1); sp_n($2); sp_0($3); sp_0_or_cr($4); sp_p($5); mcontext_check M_scalar $3; check_block_sub $6 $7; check_unless_else $8 $9; to_Call_op M_none "unless" (prio_lo P_loose $3 :: Block $6.any :: $8.any @ $9.any) $1 $9} elsif: | {default_esp []} | ELSIF PAREN expr PAREN_END BRACKET lines BRACKET_END elsif {sp_p($1); sp_n($2); sp_0($3); sp_0_or_cr($4); sp_p($5); mcontext_check M_scalar $3; check_block_sub $6 $7; new_esp (mcontext_lmerge ($6.mcontext :: mcontext_lmaybe $8)) (prio_lo P_loose $3 :: Block $6.any :: $8.any) $1 $8} else_: | { default_esp [] } | ELSE BRACKET lines BRACKET_END {sp_p($1); sp_n($2); check_block_sub $3 $4; new_esp $3.mcontext [Block $3.any] $1 $4} loop: | WHILE PAREN expr PAREN_END BRACKET lines BRACKET_END cont {sp_p($1); sp_n($2); sp_0($3); sp_0_or_cr($4); sp_p($5); mcontext_check M_scalar $3; check_block_sub $6 $7; to_Call_op M_none "while" [ prio_lo P_loose $3; Block $6.any ] $1 $8} | UNTIL PAREN expr PAREN_END BRACKET lines BRACKET_END cont {sp_p($1); sp_n($2); sp_0($3); sp_0_or_cr($4); sp_p($5); mcontext_check M_scalar $3; check_block_sub $6 $7; to_Call_op M_none "until" [ prio_lo P_loose $3; Block $6.any ] $1 $8} | FOR PAREN expr_or_empty semi_colon expr_or_empty semi_colon expr_or_empty PAREN_END BRACKET lines BRACKET_END {sp_p($1); check_for($1); sp_n($2); sp_0($3); sp_p($5); sp_p($7); sp_0($8); sp_n($9); check_block_sub $10 $11; to_Call_op M_none "for" [ $3.any; $5.any; $7.any; Block $10.any ] $1 $11} | FOR SCALAR_IDENT PAREN expr PAREN_END BRACKET lines BRACKET_END cont { die_rule "don't use for without \"my\"ing the iteration variable" } | FOR PAREN expr PAREN_END BRACKET lines BRACKET_END cont {sp_p($1); sp_n($2); sp_0($3); sp_0_or_cr($4); sp_p($5); mcontext_check M_list $3; check_block_sub $6 $7; check_for_foreach $1 $3; to_Call_op M_none "foreach" [ prio_lo P_loose $3; Block $6.any ] $1 $8} | for_my lines BRACKET_END cont {check_block_sub $2 $3; to_Call_op M_none "foreach my" ($1.any @ [ Block $2.any ]) $1 $4} for_my: | FOR MY_OUR SCALAR_IDENT PAREN expr PAREN_END BRACKET {sp_p($1); check_my($2); check_foreach($1); sp_n($4); sp_0($5); sp_0_or_cr($6); sp_p($7); new_esp M_none [ My_our($2.any, [I_scalar, snd $3.any], get_pos $3); prio_lo P_loose $5 ] $1 $7} cont: /* Continue blocks */ | {default_esp ()} | CONTINUE BRACKET lines BRACKET_END {sp_p($1); sp_n($2); check_block_sub $3 $4; new_esp $3.mcontext () $1 $4} sideff: /* An expression which may have a side-effect */ | expr { new_1esp $1.any.expr $1 } | expr IF expr {sp_p($2); sp_p($3); mcontext_check M_scalar $3; call_op_if_infix (prio_lo P_loose $1) (prio_lo P_loose $3) $1 $3} | expr UNLESS expr {sp_p($2); sp_p($3); mcontext_check M_scalar $3; call_op_unless_infix (prio_lo P_loose $1) (prio_lo P_loose $3) $1 $3} | expr WHILE expr {sp_p($2); sp_p($3); mcontext_check M_scalar $3; to_Call_op M_none "while infix" [ prio_lo P_loose $1 ; prio_lo P_loose $3 ] $1 $3} | expr UNTIL expr {sp_p($2); sp_p($3); mcontext_check M_scalar $3; to_Call_op M_none "until infix" [ prio_lo P_loose $1 ; prio_lo P_loose $3 ] $1 $3} | expr FOR expr {sp_p($2); sp_p($3); mcontext_check M_list $3; check_foreach($2); to_Call_op M_none "for infix" [ prio_lo P_loose $1 ; prio_lo P_loose $3 ] $1 $3} decl: | FORMAT BAREWORD ASSIGN {to_Call_op M_none "format" [Raw_string($2.any, get_pos $2) ; to_String false (new_1esp (fst $1.any) $1)] $1 $3} | FORMAT ASSIGN {new_esp M_none Too_complex $1 $2} | func_decl semi_colon {if snd $1.any = None then die_rule "there is no need to pre-declare in Perl!" else (warn_rule "please don't use prototype pre-declaration" ; new_esp M_special Too_complex $1 $2) } | func_decl BRACKET BRACKET_END {sp_n($2); sp_0_or_cr($3); let name, proto = $1.any in new_esp M_none (sub_declaration (name, proto) [] Real_sub_declaration) $1 $3} | func_decl BRACKET lines BRACKET_END {sp_n($2); check_block_sub $3 $4; new_esp M_none (sub_declaration $1.any $3.any Real_sub_declaration) $1 $4} | func_decl BRACKET BRACKET expr BRACKET_END BRACKET_END {sp_n($2); sp_p($3); sp_p($4); sp_p($5); sp_p($6); new_esp M_none (sub_declaration $1.any [hash_ref $4] Real_sub_declaration) $1 $6} | func_decl BRACKET BRACKET expr BRACKET_END semi_colon BRACKET_END {sp_n($2); sp_p($3); sp_p($4); sp_p($5); sp_p($7); new_esp M_none (sub_declaration $1.any [hash_ref $4; Semi_colon] Real_sub_declaration) $1 $7} | PACKAGE word semi_colon {sp_0_or_cr($1); sp_1($2); new_esp M_none (Package $2.any) $1 $3} | BEGIN BRACKET lines BRACKET_END {sp_0_or_cr($1); sp_1($2); check_block_sub $3 $4; new_esp M_none (Sub_declaration(Ident(None, "BEGIN", get_pos $1), None, Block $3.any, Glob_assign)) $1 $4} | END BRACKET lines BRACKET_END {sp_0_or_cr($1); sp_1($2); check_block_sub $3 $4; new_esp M_none (Sub_declaration(Ident(None, "END", get_pos $1), None, Block $3.any, Glob_assign)) $1 $4} | use {$1} use: | use_word listexpr semi_colon {sp_n($2); new_esp M_none (Use($1.any, $2.any.expr)) $1 $3} | use_revision word_paren PAREN listexpr PAREN_END {sp_0($4); sp_0_or_cr($5); new_esp M_none (Use($2.any, $4.any.expr)) $1 $5} use_word: | use_revision word comma {new_esp M_none $2.any $1 $3} | use_revision word {new_esp M_none $2.any $1 $2} | use_revision {new_1esp (Ident(None, "", get_pos $1)) $1 } use_revision: | USE REVISION comma {$1} | USE REVISION {$1} | USE {$1} func_decl: | SUB word { new_esp M_none ($2.any, None) $1 $2} | FUNC_DECL_WITH_PROTO {new_1esp (Ident(fst3 $1.any, snd3 $1.any, get_pos $1), Some (ter3 $1.any)) $1 } listexpr: /* Basic list expressions */ | %prec PREC_LOW { default_pesp P_tok []} | argexpr %prec PREC_LOW {$1} expr: /* Ordinary expressions; logical combinations */ | expr AND expr {sp_p($2); sp_p($3); mcontext_check M_scalar $1; mcontext_check_none "value should be dropped" [$3.any.expr] $3; to_Call_op_ M_none P_and "and" [ prio_lo P_and $1; prio_lo_after P_and $3 ] $1 $3} | expr OR expr {sp_p($2); sp_p($3); mcontext_check M_scalar $1; mcontext_check_none "value should be dropped" [$3.any.expr] $3; to_Call_op_ M_none P_or "or" [ prio_lo P_or $1; prio_lo_after P_or $3 ] $1 $3} | argexpr %prec PREC_LOW { new_1pesp $1.any.priority (List $1.any.expr) $1 } argexpr: /* Expressions are a list of terms joined by commas */ | argexpr comma { new_pesp $1.mcontext P_comma $1.any.expr $1 $2} | bareword RIGHT_ARROW term {if not_simple ($3.any.expr) then sp_p($3); new_pesp (mtuple_context_concat M_string $3.mcontext) P_comma (followed_by_comma [$1.any] false @ [$3.any.expr]) $1 $3} | bareword RIGHT_ARROW BRACKET expr BRACKET_END {sp_p($3); sp_p($5); new_pesp (mtuple_context_concat M_string (M_ref M_hash)) P_comma (followed_by_comma [$1.any] false @ [ hash_ref $4 ]) $1 $5} | argexpr comma term {prio_lo_check P_comma $1.any.priority $1.pos (last $1.any.expr); if not_simple ($3.any.expr) then sp_p($3); new_pesp (mtuple_context_concat $1.mcontext $3.mcontext) P_comma (followed_by_comma $1.any.expr $2.any @ [$3.any.expr]) $1 $3} | argexpr comma BRACKET expr BRACKET_END {sp_p($3); sp_p($5); new_pesp (mtuple_context_concat $1.mcontext (M_ref M_hash)) P_comma (followed_by_comma $1.any.expr $2.any @ [ hash_ref $4 ]) $1 $5} | term %prec PREC_LOW { new_1pesp $1.any.priority [$1.any.expr] $1 } /********************************************************************************/ term: | term COMPARE_OP_STR term {sp_same $2 $3; sp_p $2; let pri = P_cmp in to_Call_op_ (mcontext_symops M_string $1 $3) pri $2.any [prio_lo pri $1; prio_lo_after pri $3] $1 $3} | term COMPARE_OP term {sp_same $2 $3; sp_p $2; let pri = P_cmp in to_Call_op_ (mcontext_symops M_float $1 $3) pri $2.any [prio_lo pri $1; prio_lo_after pri $3] $1 $3} | term LT term {sp_same $2 $3; sp_p $2; let pri = P_cmp in to_Call_op_ (mcontext_symops M_float $1 $3) pri "<" [prio_lo pri $1; prio_lo_after pri $3] $1 $3} | term GT term {sp_same $2 $3; sp_p $2; let pri = P_cmp in to_Call_op_ (mcontext_symops M_float $1 $3) pri ">" [prio_lo pri $1; prio_lo_after pri $3] $1 $3} | term EQ_OP term {sp_same $2 $3; sp_p $2; let pri = P_eq in to_Call_op_ (mcontext_symops M_float $1 $3) pri $2.any [prio_lo pri $1; prio_lo_after pri $3] $1 $3} | term EQ_OP_STR term {sp_same $2 $3; sp_p $2; let pri = P_eq in to_Call_op_ (mcontext_symops M_string $1 $3) pri $2.any [prio_lo pri $1; prio_lo_after pri $3] $1 $3} | term POWER term {sp_same $2 $3; let pri = P_tight in to_Call_op_ (mcontext_symops M_float $1 $3) pri "**" [prio_lo pri $1; prio_lo_after pri $3] $1 $3} | term BIT_AND term {sp_same $2 $3; sp_p $2; let pri = P_bit in to_Call_op_ (mcontext_symops M_int $1 $3) pri "&" [prio_lo pri $1; prio_lo_after pri $3] $1 $3} | term BIT_OR term {sp_same $2 $3; let pri = P_bit in to_Call_op_ (mcontext_symops M_int $1 $3) pri "|" [prio_lo pri $1; prio_lo_after pri $3] $1 $3} | term BIT_XOR term {sp_same $2 $3; sp_p $2; let pri = P_bit in to_Call_op_ (mcontext_symops M_int $1 $3) pri "^" [prio_lo pri $1; prio_lo_after pri $3] $1 $3} | term AND_TIGHT term {sp_same $2 $3; sp_p $2; let pri = P_tight_and in to_Call_op_ (mcontext_rightops M_scalar $1 $3) pri "&&" [prio_lo pri $1; prio_lo_after pri $3] $1 $3} | term OR_TIGHT term {sp_same $2 $3; sp_p $2; let pri = P_tight_or in to_Call_op_ (mcontext_symops M_scalar $1 $3) pri "||" [prio_lo pri $1; prio_lo_after pri $3] $1 $3} | term MULT term {sp_same $2 $3; let pri = P_mul in to_Call_op_ (mcontext_symops M_float $1 $3) pri $2.any [prio_lo_concat $1; prio_lo_after pri $3] $1 $3} | term MULT_L_STR term {sp_same $2 $3; mcontext_check M_int $3; let pri = P_mul in to_Call_op_ (if mcontext_lower $1.mcontext M_string then M_string else M_list) pri "x" [prio_lo_concat $1; prio_lo_after pri $3] $1 $3} | term PLUS term {sp_same $2 $3; let pri = P_add in to_Call_op_ (mcontext_symops M_float $1 $3) pri $2.any [prio_lo pri $1; prio_lo_after pri $3] $1 $3} | term CONCAT term {sp_same $2 $3; let pri = P_add in to_Call_op_ (mcontext_symops M_string $1 $3) pri "." [prio_lo pri $1; prio_lo_after pri $3] $1 $3} | term ASSIGN term {sp_same $2 $3; let pri = P_assign in to_Call_op_ (mcontext_op_assign $1 $3) pri $2.any [$1.any.expr ; prio_lo_after pri $3] $1 $3} | term DOTDOT term {sp_same $2 $3; let pri = P_paren_wanted P_expr in to_Call_op_ (mcontext_symops M_scalar $1 $3) pri $2.any [prio_lo pri $1; prio_lo_after pri $3] $1 $3} | term BIT_SHIFT term {sp_same $2 $3; let pri = P_paren_wanted P_tight in to_Call_op_ (mcontext_symops M_int $1 $3) pri $2.any [prio_lo pri $1; prio_lo_after pri $3] $1 $3} | term XOR term {sp_same $2 $3; sp_p $2; let pri = P_paren_wanted P_expr in to_Call_op_ (mcontext_symops M_scalar $1 $3) pri "xor" [prio_lo pri $1; prio_lo_after pri $3] $1 $3} | term ASSIGN BRACKET expr BRACKET_END {sp_p($2); sp_p($3); sp_p($4); sp_p($5); to_Call_op_ (M_mixed [M_ref M_hash; M_none]) P_assign $2.any [prio_lo P_assign $1; hash_ref $4] $1 $5} | term AND_TIGHT BRACKET expr BRACKET_END {sp_p($2); sp_p($3); sp_p($4); sp_p($5); to_Call_op_ M_scalar P_tight_and "&&" [prio_lo P_assign $1; hash_ref $4] $1 $5} | term OR_TIGHT BRACKET expr BRACKET_END {sp_p($2); sp_p($3); sp_p($4); sp_p($5); to_Call_op_ M_scalar P_tight_or "||" [prio_lo P_assign $1; hash_ref $4] $1 $5} | term PATTERN_MATCH PATTERN {sp_n($2); sp_p($3); check_unneeded_var_dollar_ ($1); mcontext_check M_string $1; let pattern = from_PATTERN $3 in check_simple_pattern pattern ; to_Call_op_ M_array P_expr "m//" ($1.any.expr :: pattern) $1 $3} | term PATTERN_MATCH_NOT PATTERN {sp_n($2); sp_p($3); check_unneeded_var_dollar_not($1); mcontext_check M_string $1; let pattern = from_PATTERN $3 in check_simple_pattern pattern ; to_Call_op_ M_int P_expr "!m//" ($1.any.expr :: pattern) $1 $3} | term PATTERN_MATCH PATTERN_SUBST {sp_n($2); sp_p($3); check_unneeded_var_dollar_s ($1); to_Call_op_ (M_mixed[M_none; M_int]) P_expr "s///" ($1.any.expr :: from_PATTERN_SUBST $3) $1 $3} | term PATTERN_MATCH_NOT PATTERN_SUBST {die_with_rawpos $2.pos "use =~ instead of !~ and negate the return value"} | term PATTERN_MATCH QR_PATTERN {sp_n($2); sp_p($3); to_Call_op_ M_array P_expr "m//" ($1.any.expr :: from_PATTERN $3) $1 $3} | term PATTERN_MATCH_NOT QR_PATTERN {sp_n($2); sp_p($3); to_Call_op_ M_int P_expr "!m//" ($1.any.expr :: from_PATTERN $3) $1 $3} | term PATTERN_MATCH scalar { new_pesp M_array P_expr (Call(Too_complex, [$1.any.expr ; $3.any ])) $1 $3} | term PATTERN_MATCH_NOT scalar { new_pesp M_int P_expr (Call(Too_complex, [$1.any.expr ; $3.any ])) $1 $3} | term PATTERN_MATCH RAW_STRING {die_with_rawpos $3.pos "use a regexp, not a string"} | term PATTERN_MATCH_NOT RAW_STRING {die_with_rawpos $3.pos "use a regexp, not a string"} | term PATTERN_MATCH STRING {die_with_rawpos $3.pos "use a regexp, not a string"} | term PATTERN_MATCH_NOT STRING {die_with_rawpos $3.pos "use a regexp, not a string"} | term QUESTION_MARK term COLON term {sp_p($2); sp_p($3); sp_p($4); sp_p($5); mcontext_check M_scalar $1; to_Call_op_ (mcontext_merge $3.mcontext $5.mcontext) P_ternary "?:" (check_ternary_paras(prio_lo P_ternary $1, prio_lo_after P_ternary $3, prio_lo_after P_ternary $5)) $1 $5} | term QUESTION_MARK term COLON BRACKET expr BRACKET_END {sp_p($2); sp_p($3); sp_p($4); sp_p($5); sp_p($6); sp_p($7); mcontext_check M_scalar $1; to_Call_op_ (mcontext_merge $3.mcontext (M_ref M_hash)) P_ternary "?:" (check_ternary_paras(prio_lo P_ternary $1, prio_lo_after P_ternary $3, hash_ref $6)) $1 $7} | term QUESTION_MARK BRACKET expr BRACKET_END COLON term {sp_p($2); sp_p($3); sp_p($4); sp_p($5); sp_p($6); sp_p($7); mcontext_check M_scalar $1; to_Call_op_ (mcontext_merge $7.mcontext (M_ref M_hash)) P_ternary "?:" (check_ternary_paras(prio_lo P_ternary $1, hash_ref $4, prio_lo_after P_ternary $7)) $1 $7} | term QUESTION_MARK BRACKET expr BRACKET_END COLON BRACKET expr BRACKET_END {sp_p($2); sp_p($3); sp_p($4); sp_p($5); sp_p($6); sp_p($7); sp_p($8); sp_p($9); mcontext_check M_scalar $1; to_Call_op_ (M_ref M_hash) P_ternary "?:" (check_ternary_paras(prio_lo P_ternary $1, hash_ref $4, hash_ref $8)) $1 $9} /* Unary operators and terms */ | PLUS term %prec UNARY_MINUS { sp_0($2); match $1.any with | "+" -> warn_rule "don't use unary +" ; to_Call_op_ (mcontext_unop M_float $2) P_tight "+ unary" [$2.any.expr] $1 $2 | "-" -> to_Call_op_ (mcontext_unop M_float $2) P_tight "- unary" [$2.any.expr] $1 $2 | _ -> die_rule "syntax error" } | TIGHT_NOT term {check_negatable_expr $2; mcontext_check M_scalar $2; to_Call_op_ M_bool P_tight "not" [$2.any.expr] $1 $2} | BIT_NEG term {to_Call_op_ (mcontext_unop M_int $2) P_expr "~" [$2.any.expr] $1 $2} | INCR term {sp_0($2); mcontext_check M_int $2; to_Call_op_ (M_mixed [M_int ; M_none]) P_tight "++" [$2.any.expr] $1 $2} | DECR term {sp_0($2); mcontext_check M_int $2; to_Call_op_ (M_mixed [M_int ; M_none]) P_tight "--" [$2.any.expr] $1 $2} | term INCR {sp_0($2); mcontext_check M_int $1; to_Call_op_ (M_mixed [M_int ; M_none]) P_tight "++ post" [$1.any.expr] $1 $2} | term DECR {sp_0($2); mcontext_check M_int $1; to_Call_op_ (M_mixed [M_int ; M_none]) P_tight "-- post" [$1.any.expr] $1 $2} | NOT argexpr {warn_rule "don't use \"not\", use \"!\" instead"; to_Call_op_ (mcontext_unop_l M_scalar $2) P_and "not" ($2.any.expr) $1 $2} /* Constructors for anonymous data */ | ARRAYREF ARRAYREF_END {sp_0($2); new_pesp (M_ref M_array) P_expr (Ref(I_array, List[])) $1 $2} | arrayref_start ARRAYREF_END {(if $1.any = [] then sp_0 else sp_p)($2) ; new_pesp (M_ref M_array) P_expr (Ref(I_array, List $1.any)) $1 $2} | arrayref_start expr ARRAYREF_END {sp_same $2 $3; new_pesp (M_ref M_array) P_expr (Ref(I_array, List($1.any @ [$2.any.expr]))) $1 $3} | arrayref_start BRACKET expr BRACKET_END ARRAYREF_END {sp_same $2 $5; new_pesp (M_ref M_array) P_expr (Ref(I_array, List($1.any @ [hash_ref $3]))) $1 $5} | BRACKET BRACKET_END {new_pesp (M_ref M_hash) P_expr (Ref(I_hash, List [])) $1 $2} /* empty hash */ | BRACKET_HASHREF expr BRACKET_END %prec PREC_HIGH {sp_p($3); new_pesp (M_ref M_hash) P_expr (hash_ref $2) $1 $3} /* { foo => "Bar" } */ | SUB BRACKET BRACKET_END %prec PREC_HIGH {sp_n($2); sp_0($3); new_pesp (M_ref M_sub) P_expr (anonymous_sub None (new_esp (M_ref M_array) [] $2 $2)) $1 $3} | SUB_WITH_PROTO BRACKET BRACKET_END %prec PREC_HIGH {sp_n($2); sp_0($3); new_pesp (M_ref M_sub) P_expr (anonymous_sub (Some $1.any) (new_esp (M_ref M_array) [] $2 $2)) $1 $3} | SUB BRACKET lines BRACKET_END %prec PREC_HIGH {sp_n($2); check_block_sub $3 $4; new_pesp (M_ref M_sub) P_expr (anonymous_sub None $3) $1 $4} | SUB_WITH_PROTO BRACKET lines BRACKET_END %prec PREC_HIGH {sp_n($2); check_block_sub $3 $4; new_pesp (M_ref M_sub) P_expr (anonymous_sub (Some $1.any) $3) $1 $4} | termdo {new_1pesp P_tok $1.any $1} | REF term {new_pesp (M_ref $2.mcontext) P_expr (Ref(I_scalar, remove_call_with_same_para_special $2.any.expr)) $1 $2} /* \$x, \@y, \%z */ | my_our %prec UNIOP {new_1pesp P_expr $1.any $1} | LOCAL term %prec UNIOP {sp_n($2); new_pesp (M_mixed [ $2.mcontext ; M_none ]) P_expr (to_Local $2) $1 $2} | parenthesized {new_1pesp $1.any.priority (List $1.any.expr) $1} /* (1, 2) */ | parenthesized arrayref {sp_0($2); let is_slice = not (is_only_one_in_List $2.any) in new_pesp (if is_slice then M_list else M_scalar) P_tok (to_Deref_with(I_array, (if is_slice then I_array else I_scalar), List $1.any.expr, List $2.any)) $1 $2} /* list indexing or slicing */ | variable { let e = match $1.any with | Deref(I_func, Ident _) -> call_with_same_para_special $1.any (* not the same as f(@_) *) | e -> e in new_1pesp P_tok e $1 } | subscripted {new_1pesp P_tok $1.any $1} | array arrayref {new_pesp M_list P_expr (to_Deref_with(I_array, I_array, from_array $1, List $2.any)) $1 $2} /* array slice: @array[vals] */ | array BRACKET expr BRACKET_END {sp_0($2); sp_0($3); sp_0($4); new_pesp M_list P_expr (to_Deref_with(I_hash, I_array, from_array $1, $3.any.expr)) $1 $4} /* hash slice: @hash{@keys} */ /* function_calls */ | ONE_SCALAR_PARA RAW_STRING {call_one_scalar_para $1 [to_Raw_string $2] $1 $2} | ONE_SCALAR_PARA STRING {call_one_scalar_para $1 [to_String true $2] $1 $2} | ONE_SCALAR_PARA variable {call_one_scalar_para $1 [$2.any] $1 $2} | ONE_SCALAR_PARA restricted_subscripted {call_one_scalar_para $1 [$2.any] $1 $2} | ONE_SCALAR_PARA parenthesized {call_one_scalar_para $1 $2.any.expr $1 $2} | ONE_SCALAR_PARA BRACKET lines BRACKET_END {sp_n($2); check_block_sub $3 $4; new_pesp M_unknown P_tok (call(Deref(I_func, Ident(None, $1.any, raw_pos2pos $1.pos)), [anonymous_sub None $3])) $1 $4} /* eval { foo } */ | ONE_SCALAR_PARA diamond {call_one_scalar_para $1 [$2.any] $1 $2} | ONE_SCALAR_PARA {call_one_scalar_para $1 [] $1 $1} | ONE_SCALAR_PARA word argexpr {check_parenthesized_first_argexpr_with_Ident $2.any $3; call_one_scalar_para $1 [call(Deref(I_func, $2.any), $3.any.expr)] $1 $3} /* ref foo $a, $b */ | ONE_SCALAR_PARA hash PKG_SCOPE {sp_0($3); call_one_scalar_para $1 [ Call(Too_complex, [$2.any]) ] $1 $3} /* keys %main:: */ | func parenthesized {sp_0($2); call_func $1 $2} /* &foo(@args) */ | word argexpr {check_parenthesized_first_argexpr_with_Ident $1.any $2; call_no_paren $1 $2} /* foo $a, $b */ | word BRACKET lines BRACKET_END MULT { die_with_rawpos $5.pos "I can't handle this correctly, please add parentheses" } | word BRACKET lines BRACKET_END COMMA argexpr %prec LSTOP {sp_n($2); new_pesp M_unknown P_call_no_paren (call(Deref(I_func, $1.any), Ref(I_hash, List $3.any) :: $6.any.expr)) $1 $6} /* bless { foo }, $bar */ | word_paren parenthesized {sp_0($2); call_with_paren $1 $2} /* foo(@args) */ | word BRACKET lines BRACKET_END listexpr %prec LSTOP {sp_n($2); check_block_sub $3 $4; call_and_context(Deref(I_func, $1.any), anonymous_sub None $3 :: $5.any.expr) false (if $5.any.expr = [] then P_tok else P_call_no_paren) $1 $5} /* map { foo } @bar */ | word BRACKET BRACKET expr BRACKET_END BRACKET_END listexpr %prec LSTOP {sp_n($2); sp_p($3); sp_p($4); sp_p($5); sp_p($6); new_pesp M_unknown (if $7.any.expr = [] then P_tok else P_call_no_paren) (call(Deref(I_func, $1.any), anonymous_sub None (new_esp (M_ref M_hash) [ hash_ref $4 ] $4 $4) :: $7.any.expr)) $1 $7} /* map { { foo } } @bar */ | word BRACKET BRACKET expr BRACKET_END semi_colon BRACKET_END listexpr %prec LSTOP {sp_n($2); sp_p($3); sp_p($4); sp_p($5); sp_p($7); new_pesp M_unknown (if $8.any.expr = [] then P_tok else P_call_no_paren) (call(Deref(I_func, $1.any), anonymous_sub None (new_esp (M_ref M_hash) [ hash_ref $4; Semi_colon ] $4 $4) :: $8.any.expr)) $1 $8} /* map { { foo }; } @bar */ | term ARROW word_or_scalar parenthesized {sp_0($2); sp_0($3); sp_0($4); if $4.any.expr = [] then warn $4.pos "remove these unneeded parentheses"; new_pesp M_unknown P_tok (to_Method_call($1.any.expr, $3.any, $4.any.expr)) $1 $4} /* $foo->bar(list) */ | term ARROW word_or_scalar {sp_0($2); sp_0($3); new_pesp M_unknown P_tok (to_Method_call($1.any.expr, $3.any, [])) $1 $3} /* $foo->bar */ | NEW word { sp_n($2); new_pesp (M_ref M_unknown) P_expr (to_Method_call ($2.any, Ident(None, "new", get_pos $1), [])) $1 $2} /* new Class */ | NEW word_paren parenthesized { sp_n($2); sp_0($3); new_pesp (M_ref M_unknown) P_expr (to_Method_call($2.any, Ident(None, "new", get_pos $1), $3.any.expr)) $1 $3} /* new Class(...) */ | NEW word terminal { die_rule "you must parenthesize parameters: \"new Class(...)\" instead of \"new Class ...\"" } | NEW word variable { die_rule "you must parenthesize parameters: \"new Class(...)\" instead of \"new Class ...\"" } | PRINT { to_Call_op_ (M_mixed [M_int; M_none]) P_call_no_paren $1.any (var_STDOUT :: [ var_dollar_ (get_pos $1) ]) $1 $1} | PRINT argexpr {check_parenthesized_first_argexpr $1.any $2; to_Call_op_ (M_mixed [M_int; M_none]) P_call_no_paren $1.any (var_STDOUT :: $2.any.expr) $1 $2} | PRINT_TO_SCALAR { to_Call_op_ (M_mixed [M_int; M_none]) P_call_no_paren (fst $1.any) (var_STDOUT :: [ Deref(I_scalar, Ident(None, snd $1.any, get_pos $1)) ]) $1 $1} | PRINT_TO_SCALAR argexpr { to_Call_op_ (M_mixed [M_int; M_none]) P_call_no_paren (fst $1.any) (Deref(I_scalar, Ident(None, snd $1.any, get_pos $1)) :: $2.any.expr) $1 $2} | PRINT_TO_STAR { to_Call_op_ (M_mixed [M_int; M_none]) P_call_no_paren (fst $1.any) (Deref(I_star, Ident(None, snd $1.any, get_pos $1)) :: [ var_dollar_ (get_pos $1) ]) $1 $1} | PRINT_TO_STAR argexpr { to_Call_op_ (M_mixed [M_int; M_none]) P_call_no_paren (fst $1.any) (Deref(I_star, Ident(None, snd $1.any, get_pos $1)) :: $2.any.expr) $1 $2} | hash PKG_SCOPE {sp_0($2); new_pesp M_hash P_tok (Call(Too_complex, [$1.any])) $1 $2} /* %main:: */ | terminal {$1} terminal: | word {word_alone $1} | NUM {new_1pesp P_tok (Num($1.any, get_pos $1)) $1} | STRING {new_1pesp P_tok (to_String true $1) $1} | RAW_STRING {new_1pesp P_tok (to_Raw_string $1) $1} | REVISION {new_1pesp P_tok (to_Raw_string $1) $1} | COMMAND_STRING {to_Call_op_ (M_mixed[M_string; M_list]) P_tok "``" [to_String false $1] $1 $1} | QUOTEWORDS {let l = List.map (fun s -> Raw_string(s, raw_pos2pos $1.pos)) (words $1.any) in new_pesp (M_tuple (repeat M_string (List.length l))) P_tok (List [ List l ]) $1 $1} | HERE_DOC {new_1pesp P_tok (to_String false (new_1esp (fst $1.any) $1)) $1 } | RAW_HERE_DOC {new_1pesp P_tok (Raw_string(fst $1.any, raw_pos2pos (snd $1.any))) $1} | QR_PATTERN {to_Call_op_ M_string P_tok "qr//" (from_PATTERN $1) $1 $1} | PATTERN {to_Call_op_ M_array P_expr "m//" (var_dollar_ (get_pos $1) :: from_PATTERN $1) $1 $1} | PATTERN_SUBST {to_Call_op_ (M_mixed[M_none; M_int]) P_expr "s///" (var_dollar_ (get_pos $1) :: from_PATTERN_SUBST $1) $1 $1} | diamond {new_1pesp P_expr $1.any $1} diamond: | LT GT {sp_0($2); to_Call_op (M_mixed[M_string; M_list]) "<>" [] $1 $2} | LT term GT {sp_0($2); sp_0($3); to_Call_op (M_mixed[M_string; M_list]) "<>" [$2.any.expr] $1 $3} subscripted: /* Some kind of subscripted expression */ | variable PKG_SCOPE bracket_subscript {sp_0($2); sp_0($3); new_esp M_unknown (Call(Too_complex, [$3.any])) $1 $3} /* $foo::{something} */ | scalar bracket_subscript {sp_0($2); check_scalar_subscripted $1; new_esp M_scalar (to_Deref_with(I_hash , I_scalar, from_scalar $1, $2.any )) $1 $2} /* $foo{bar} */ | scalar arrayref {sp_0($2); check_scalar_subscripted $1; new_esp M_scalar (to_Deref_with(I_array, I_scalar, from_scalar $1, only_one_array_ref $2)) $1 $2} /* $array[$element] */ | term ARROW bracket_subscript {sp_0($2); sp_0($3); check_arrow_needed $1 $2; new_esp M_scalar (to_Deref_with(I_hash , I_scalar, $1.any.expr, $3.any )) $1 $3} /* somehref->{bar} */ | term ARROW arrayref {sp_0($2); sp_0($3); check_arrow_needed $1 $2; new_esp M_scalar (to_Deref_with(I_array, I_scalar, $1.any.expr, only_one_array_ref $3)) $1 $3} /* somearef->[$element] */ | term ARROW parenthesized {sp_0($2); sp_0($3); new_esp M_unknown (to_Deref_with(I_func , I_scalar, $1.any.expr, List($3.any.expr))) $1 $3} /* $subref->(@args) */ | subscripted bracket_subscript {sp_0($2); new_esp M_scalar (to_Deref_with(I_hash , I_scalar, $1.any, $2.any )) $1 $2} /* $foo->[bar]{baz} */ | subscripted arrayref {sp_0($2); new_esp M_scalar (to_Deref_with(I_array, I_scalar, $1.any, only_one_array_ref $2)) $1 $2} /* $foo->[$bar][$baz] */ | subscripted parenthesized {sp_0($2); new_esp M_unknown (to_Deref_with(I_func , I_scalar, $1.any, List($2.any.expr))) $1 $2} /* $foo->{bar}(@args) */ restricted_subscripted: /* Some kind of subscripted expression */ | variable PKG_SCOPE bracket_subscript {sp_0($2); sp_0($3); new_esp M_unknown (Call(Too_complex, [$3.any])) $1 $3} /* $foo::{something} */ | word_paren parenthesized {new_esp M_unknown (call(Deref(I_func, $1.any), $2.any.expr)) $1 $2} | scalar bracket_subscript {sp_0($2); check_scalar_subscripted $1; new_esp M_scalar (to_Deref_with(I_hash , I_scalar, from_scalar $1, $2.any )) $1 $2} /* $foo{bar} */ | scalar arrayref {sp_0($2); check_scalar_subscripted $1; new_esp M_scalar (to_Deref_with(I_array, I_scalar, from_scalar $1, only_one_array_ref $2)) $1 $2} /* $array[$element] */ | restricted_subscripted ARROW bracket_subscript {sp_0($2); sp_0($3); new_esp M_scalar (to_Deref_with(I_hash , I_scalar, $1.any, $3.any )) $1 $3} /* somehref->{bar} */ | restricted_subscripted ARROW arrayref {sp_0($2); sp_0($3); new_esp M_scalar (to_Deref_with(I_array, I_scalar, $1.any, only_one_array_ref $3)) $1 $3} /* somearef->[$element] */ | restricted_subscripted ARROW parenthesized {sp_0($2); sp_0($3); new_esp M_unknown (to_Deref_with(I_func , I_scalar, $1.any, List($3.any.expr))) $1 $3} /* $subref->(@args) */ | restricted_subscripted bracket_subscript {sp_0($2); new_esp M_scalar (to_Deref_with(I_hash , I_scalar, $1.any, $2.any )) $1 $2} /* $foo->[bar]{baz} */ | restricted_subscripted arrayref {sp_0($2); new_esp M_scalar (to_Deref_with(I_array, I_scalar, $1.any, only_one_array_ref $2)) $1 $2} /* $foo->[$bar][$baz] */ | restricted_subscripted parenthesized {sp_0($2); new_esp M_unknown (to_Deref_with(I_func , I_scalar, $1.any, List($2.any.expr))) $1 $2} /* $foo->{bar}(@args) */ | restricted_subscripted ARROW word_or_scalar parenthesized {sp_0($2); sp_0($3); sp_0($4); if $4.any.expr = [] then warn $4.pos "remove these unneeded parentheses"; new_esp M_unknown (to_Method_call($1.any, $3.any, $4.any.expr)) $1 $4} /* $foo->bar(list) */ | restricted_subscripted ARROW word_or_scalar {sp_0($2); sp_0($3); new_esp M_unknown (to_Method_call($1.any, $3.any, [])) $1 $3} /* $foo->bar */ arrayref: | arrayref_start ARRAYREF_END {sp_0($2); new_esp (M_ref M_array) $1.any $1 $2} | arrayref_start expr ARRAYREF_END {sp_0($3); new_esp (M_ref M_array) ($1.any @ [$2.any.expr]) $1 $3} | arrayref_start BRACKET expr BRACKET_END ARRAYREF_END {sp_p($2); sp_p($4); sp_0($5); new_esp (M_ref M_hash) ($1.any @ [hash_ref $3]) $1 $5} parenthesized: | parenthesized_start PAREN_END {sp_0_or_cr($2); new_pesp (if $1.any = [] then M_list else $1.mcontext) (if $1.any = [] then P_tok else P_paren P_comma) $1.any $1 $2} | parenthesized_start expr PAREN_END {sp_0_or_cr($3); (if $1.any = [] then sp_0_or_cr else sp_p)($2); new_pesp (if $1.any = [] then $2.mcontext else M_list) (P_paren (if $1.any = [] then $2.any.priority else P_comma)) ($1.any @ [(if $1.any = [] then prio_lo P_loose else prio_lo_after P_comma) $2]) $1 $3} | parenthesized_start BRACKET expr BRACKET_END PAREN_END {sp_p($4); sp_0_or_cr($5); new_pesp (if $1.any = [] then M_ref M_hash else M_list) (P_paren (if $1.any = [] then P_expr else P_comma)) ($1.any @ [hash_ref $3]) $1 $5} arrayref_start: | ARRAYREF {new_1esp [] $1 } | arrayref_start BRACKET expr BRACKET_END comma {sp_p($2); sp_p($3); sp_p($4); new_esp M_special ($1.any @ [hash_ref $3]) $1 $5} parenthesized_start: | PAREN {new_1esp [] $1 } | parenthesized_start BRACKET expr BRACKET_END comma {(if $1.any = [] then sp_0_or_cr else sp_p)($2); sp_p($3); sp_p($4); new_esp (M_ref M_hash) ($1.any @ [hash_ref $3]) $1 $5} my_our: /* Things that can be "my"'d */ | my_our_paren PAREN_END {sp_0($2); if snd $1.any <> [] && fstfst $1.any then die_rule "syntax error"; new_esp (M_mixed [ $1.mcontext ; M_none ]) (My_our(sndfst $1.any, snd $1.any, get_pos $1)) $1 $2} | my_our_paren SCALAR_IDENT PAREN_END {check_my_our_paren $1 $2; new_esp (M_mixed [ mtuple_context_concat $1.mcontext M_scalar; M_none ]) (My_our(sndfst $1.any, snd $1.any @ [I_scalar, snd $2.any], pos_range $1 $3)) $1 $3} | my_our_paren HASH_IDENT PAREN_END {check_my_our_paren $1 $2; new_esp (M_mixed [ M_list ; M_none ]) (My_our(sndfst $1.any, snd $1.any @ [I_hash, snd $2.any], pos_range $1 $3)) $1 $3} | my_our_paren ARRAY_IDENT PAREN_END {check_my_our_paren $1 $2; new_esp (M_mixed [ M_list ; M_none ]) (My_our(sndfst $1.any, snd $1.any @ [I_array, snd $2.any], pos_range $1 $3)) $1 $3} | MY_OUR SCALAR_IDENT {new_esp (M_mixed [M_scalar; M_none]) (My_our($1.any, [I_scalar, snd $2.any], get_pos $2)) $1 $2} | MY_OUR HASH_IDENT {new_esp (M_mixed [M_hash ; M_none]) (My_our($1.any, [I_hash, snd $2.any], get_pos $2)) $1 $2} | MY_OUR ARRAY_IDENT {new_esp (M_mixed [M_array ; M_none]) (My_our($1.any, [I_array, snd $2.any], get_pos $2)) $1 $2} my_our_paren: | MY_OUR PAREN {sp_1($2); new_esp (M_tuple []) ((true, $1.any), []) $1 $2} | my_our_paren comma {if fstfst $1.any then die_rule "syntax error"; new_esp $1.mcontext ((true, sndfst $1.any), snd $1.any) $1 $2} | my_our_paren BAREWORD {check_my_our_paren $1 $2; if $2.any <> "undef" then die_rule "scalar expected"; new_esp (mtuple_context_concat $1.mcontext M_none) ((false, sndfst $1.any), snd $1.any @ [I_raw, $2.any]) $1 $2} | my_our_paren SCALAR_IDENT {check_my_our_paren $1 $2; new_esp (mtuple_context_concat $1.mcontext M_scalar) ((false, sndfst $1.any), snd $1.any @ [I_scalar, snd $2.any]) $1 $2} | my_our_paren HASH_IDENT {check_my_our_paren $1 $2; new_esp M_list ((false, sndfst $1.any), snd $1.any @ [I_hash, snd $2.any]) $1 $2} | my_our_paren ARRAY_IDENT {check_my_our_paren $1 $2; new_esp M_list ((false, sndfst $1.any), snd $1.any @ [I_array, snd $2.any]) $1 $2} termdo: /* Things called with "do" */ | DO term %prec UNIOP { die_rule "\"do EXPR\" not allowed" } /* do $filename */ | DO BRACKET lines BRACKET_END %prec PREC_HIGH {sp_n($2); check_block_sub $3 $4; new_esp $3.mcontext (Block $3.any) $1 $4} /* do { code */ bracket_subscript: | BRACKET expr BRACKET_END {sp_0($1); sp_same $2 $3; check_hash_subscript $2; new_esp M_special (only_one_in_List $2) $1 $3} | COMPACT_HASH_SUBSCRIPT {sp_0($1); new_1esp (to_Raw_string $1) $1 } variable: | scalar %prec PREC_HIGH {$1} | star %prec PREC_HIGH {$1} | hash %prec PREC_HIGH {$1} | array %prec PREC_HIGH {$1} | arraylen %prec PREC_HIGH {$1} /* $#x, $#{ something } */ | func %prec PREC_HIGH {$1} /* &foo; */ word: | bareword { $1 } | RAW_IDENT { new_1esp (to_Ident $1) $1 } comma: COMMA {new_esp M_special true $1 $1} | RIGHT_ARROW {sp_p($1); new_1esp false $1 } semi_colon: SEMI_COLON {sp_0($1); $1} word_or_scalar: | word {$1} | scalar {$1} | word_paren {$1} | MULT_L_STR { new_1esp (Ident(None, "x", get_pos $1)) $1 } | FOR { new_1esp (Ident(None, $1.any, get_pos $1)) $1 } bareword: | NEW { new_1esp (Ident(None, "new", get_pos $1)) $1 } | BAREWORD { new_1esp (Ident(None, $1.any, get_pos $1)) $1 } word_paren: | BAREWORD_PAREN { new_1esp (Ident(None, $1.any, get_pos $1)) $1 } | RAW_IDENT_PAREN { new_1esp (to_Ident $1) $1 } | PO_COMMENT word_paren { po_comment($1); new_esp M_special $2.any $1 $2 } | PO_COMMENT { die_rule "N(...) must follow the #-PO: comment, with nothing in between" } arraylen: ARRAYLEN_IDENT {new_esp M_int (deref_arraylen (to_Ident $1)) $1 $1} | ARRAYLEN scalar {sp_0($2); new_esp M_int (deref_arraylen $2.any ) $1 $1 } | ARRAYLEN bracket_subscript {new_esp M_int (deref_arraylen $2.any) $1 $2} scalar: SCALAR_IDENT {new_esp M_scalar (Deref(I_scalar, to_Ident $1)) $1 $1} | DOLLAR scalar {sp_0($2); new_esp M_scalar (Deref(I_scalar, $2.any)) $1 $1 } | DOLLAR bracket_subscript {new_esp M_scalar (deref_raw I_scalar $2.any) $1 $2} | DOLLAR BRACKET BRACKET expr BRACKET_END BRACKET_END {sp_0($2); sp_0($3); sp_p($5); sp_0($6); new_esp M_scalar (Deref(I_scalar, hash_ref $4)) $1 $6} func: FUNC_IDENT {new_esp M_unknown (Deref(I_func , to_Ident $1)) $1 $1} | AMPERSAND scalar {sp_0($2); new_esp M_unknown (Deref(I_func , $2.any)) $1 $1 } | AMPERSAND bracket_subscript {new_esp M_unknown (deref_raw I_func $2.any) $1 $2} array: ARRAY_IDENT {new_esp M_array (Deref(I_array , to_Ident $1)) $1 $1} | AT scalar {sp_0($2); new_esp M_array (Deref(I_array , $2.any)) $1 $1 } | AT bracket_subscript {new_esp M_array (deref_raw I_array $2.any) $1 $2} hash: HASH_IDENT {new_esp M_hash (Deref(I_hash , to_Ident $1)) $1 $1} | PERCENT scalar {sp_0($2); new_esp M_hash (Deref(I_hash , $2.any)) $1 $1 } | PERCENT bracket_subscript {new_esp M_hash (deref_raw I_hash $2.any) $1 $2} star: STAR_IDENT {new_esp M_unknown (Deref(I_star , to_Ident $1)) $1 $1} | STAR scalar {sp_0($2); new_esp M_unknown (Deref(I_star , $2.any)) $1 $1 } | STAR bracket_subscript {new_esp M_unknown (deref_raw I_star $2.any) $1 $2} expr_or_empty: {default_esp (Block [])} | expr {new_1esp $1.any.expr $1 } %% prog_ref := Some prog ;; nux-"
-"systemer."
+"SMB: Eit fildelingssystem brukt i Windows, Mac OS X og i flere moderne "
+"Linux-system."
#: any.pm:1286
#, c-format
-msgid ""
-"You can export using NFS or SMB. Please select which you would like to use."
+msgid "You can export using NFS or SMB. Please select which you would like to use."
msgstr "Du kan eksportere med NFS eller SMB. Velg den du ønsker å bruke."
#: any.pm:1314
#, c-format
msgid "Launch userdrake"
-msgstr "Start userdrake"
+msgstr "Sett opp brukere"
#: any.pm:1316
#, c-format
@@ -688,8 +679,9 @@ msgid ""
"The per-user sharing uses the group \"fileshare\". \n"
"You can use userdrake to add a user to this group."
msgstr ""
-"Per-bruker deling benytter gruppen «fileshare». \n"
-"Du kan bruke userdrake til å legge til en bruker i denne gruppen."
+"De brukerspesifikke delingsinnstillingene bruker gruppa\n"
+"«fileshare». Du kan bruke brukeroppsettprogrammet til\n"
+"å legge til brukere her."
#: any.pm:1421
#, c-format
@@ -697,8 +689,8 @@ msgid ""
"You need to logout and back in again for changes to take effect. Press OK to "
"logout now."
msgstr ""
-"Du må logge ut og inn igjen for at endringene skal tre i kraft. Klikk OK for "
-"å logge ut nå."
+"Du må logge ut og inn igjen for at endringene skal tre i kraft. Klikk «OK» for "
+"å logge ut."
#: any.pm:1425
#, c-format
@@ -713,12 +705,12 @@ msgstr "Tidssone"
#: any.pm:1460
#, c-format
msgid "Which is your timezone?"
-msgstr "Hva er din tidssone?"
+msgstr "I hvilken tidssone er du?"
#: any.pm:1483 any.pm:1485
#, c-format
msgid "Date, Clock & Time Zone Settings"
-msgstr "Dato-, klokke- og tidssoneoppsett"
+msgstr "Dato, klokkeslett og tidssone"
#: any.pm:1486
#, c-format
@@ -728,12 +720,12 @@ msgstr "Hva er den beste tiden?"
#: any.pm:1490
#, c-format
msgid "%s (hardware clock set to UTC)"
-msgstr "%s (maskinvareklokke satt til UTC)"
+msgstr "%s (maskinvareklokke er satt til UTC)"
#: any.pm:1491
#, c-format
msgid "%s (hardware clock set to local time)"
-msgstr "%s (maskinvareklokke satt til lokal tid) "
+msgstr "%s (maskinvareklokke er satt til lokal tid) "
#: any.pm:1493
#, c-format
@@ -743,7 +735,7 @@ msgstr "NTP-tjener"
#: any.pm:1494
#, c-format
msgid "Automatic time synchronization (using NTP)"
-msgstr "Automatisk tidssynkronisering (ved hjelp av NTP)"
+msgstr "Automatisk tidssynkronisering (med NTP)"
#: authentication.pm:24
#, c-format
@@ -763,7 +755,7 @@ msgstr "NIS"
#: authentication.pm:27
#, c-format
msgid "Smart Card"
-msgstr "Smart Kort"
+msgstr "Smart-kort"
#: authentication.pm:28 authentication.pm:216
#, c-format
@@ -782,9 +774,8 @@ msgstr "Lokal fil:"
#: authentication.pm:63
#, c-format
-msgid ""
-"Use local for all authentication and information user tell in local file"
-msgstr "Benytt lokal fil for all autentisering."
+msgid "Use local for all authentication and information user tell in local file"
+msgstr "Bruk lokal for all autentisering og informasjon brukere oppgir i lokal fil."
#: authentication.pm:64
#, c-format
@@ -797,8 +788,8 @@ msgid ""
"Tells your computer to use LDAP for some or all authentication. LDAP "
"consolidates certain types of information within your organization."
msgstr ""
-"Forteller din maskin om å bruke LDAP til noe eller all autentisering. LDAP "
-"forener noen typer informasjon innen din organisasjon."
+"Ber maskina bruka LDAP for noe eller all autentisering. LDAP samler enkelte "
+"typer informasjon innen organisasjonen."
#: authentication.pm:65
#, c-format
@@ -811,8 +802,8 @@ msgid ""
"Allows you to run a group of computers in the same Network Information "
"Service domain with a common password and group file."
msgstr ""
-"Lar deg kjøre en gruppe av maskiner i samme Network Information Service-"
-"domene med en felles passord- og gruppefil."
+"Lar deg kjøre en gruppe datamaskiner i samme nettverksinformasjonsdomene "
+"(NIS), med felles passord og gruppefil."
#: authentication.pm:66
#, c-format
@@ -825,8 +816,8 @@ msgid ""
"Winbind allows the system to retrieve information and authenticate users in "
"a Windows domain."
msgstr ""
-"Winbind tillater systemet å hente informasjon og autentisere brukere i et "
-"Windows-domene."
+"Winbind lar systemet hente informasjon og autentisere brukere i Windows-"
+"domene."
#: authentication.pm:67
#, c-format
@@ -849,16 +840,14 @@ msgstr " "
#: authentication.pm:212
#, c-format
msgid "Welcome to the Authentication Wizard"
-msgstr "Velkommen til veiviseren for autentisering"
+msgstr "Velkommen til autentiseringsveiviseren"
#: authentication.pm:110
#, c-format
msgid ""
"You have selected LDAP authentication. Please review the configuration "
"options below "
-msgstr ""
-"Du har valgt LDAP-autentisering. Vær vennlig å se gjennom instillingsvalgene "
-"nedenfor"
+msgstr "Du har valgt LDAP-autentisering. Se gjennom oppsettsvalga nedenfor."
#: authentication.pm:112 authentication.pm:167
#, c-format
@@ -868,12 +857,12 @@ msgstr "LDAP-tjener"
#: authentication.pm:113 authentication.pm:168
#, c-format
msgid "Base dn"
-msgstr "LDAP grunnleggende-dn"
+msgstr "Grunn-DN"
#: authentication.pm:114
#, c-format
msgid "Fetch base Dn "
-msgstr "Hent base-dn"
+msgstr "Hent grunn-Dn "
#: authentication.pm:116 authentication.pm:171
#, c-format
@@ -888,7 +877,7 @@ msgstr "Last ned CA-sertifikat"
#: authentication.pm:119 authentication.pm:152
#, c-format
msgid "Use Disconnect mode "
-msgstr "Bruk Frakoblingsmodus"
+msgstr "Bruk frakoblingsmodus"
#: authentication.pm:120 authentication.pm:173
#, c-format
@@ -904,7 +893,7 @@ msgstr " "
#: authentication.pm:122 authentication.pm:174
#, c-format
msgid "Bind DN "
-msgstr "Bind DN"
+msgstr "Bind DN "
#: authentication.pm:123 authentication.pm:175
#, c-format
@@ -914,31 +903,29 @@ msgstr "Bind-passord"
#: authentication.pm:125
#, c-format
msgid "Advanced path for group "
-msgstr "Avansert gruppesti"
+msgstr "Avansert adresse til gruppe "
#: authentication.pm:127
#, c-format
msgid "Password base"
-msgstr "Passord"
+msgstr "Passordbase"
#: authentication.pm:128
#, c-format
msgid "Group base"
-msgstr "Gruppe"
+msgstr "Gruppebase"
#: authentication.pm:129
#, c-format
msgid "Shadow base"
-msgstr "Shadow"
+msgstr "Skyggebase"
#: authentication.pm:144
#, c-format
msgid ""
"You have selected Kerberos 5 authentication. Please review the configuration "
"options below "
-msgstr ""
-"Du har valgt Kerberos 5-autentisering. Vær vennlig å se gjennom "
-"instillingsvalgene nedenfor"
+msgstr "Du har valgt Kerberos 5-autentisering. Se gjennom oppsettsvalga nedenfor."
#: authentication.pm:146
#, c-format
@@ -953,17 +940,17 @@ msgstr "KDCs-tjenere"
#: authentication.pm:150
#, c-format
msgid "Use DNS to locate KDC for the realm"
-msgstr "Bruk DNS for å løse KDCs for områder"
+msgstr "Bruk DNS for å finne KDC i området"
#: authentication.pm:151
#, c-format
msgid "Use DNS to locate realms"
-msgstr "Bruk DNS for å løse verter for områder"
+msgstr "Bruk DNS for å finne område"
#: authentication.pm:156
#, c-format
msgid "Use local file for users information"
-msgstr "Bruk lokal fil for brukerinformasjon"
+msgstr "Bruk lokalfil for brukerinformasjon"
#: authentication.pm:157
#, c-format
@@ -976,22 +963,20 @@ msgid ""
"You have selected Kerberos 5 for authentication, now you must choose the "
"type of users information "
msgstr ""
-"Du har valgt Kerberos 5 for autentisering. Du må nå velge "
-"brukerinformasjonstype"
+"Du har valgt Kerberos 5 for autentisering. Du må nå velge typen "
+"brukerinformasjon."
#: authentication.pm:169
#, c-format
msgid "Fecth base Dn "
-msgstr "Hent base-Dn"
+msgstr "Hent grunn-Dn "
#: authentication.pm:190
#, c-format
msgid ""
"You have selected NIS authentication. Please review the configuration "
"options below "
-msgstr ""
-"Du har valgt NIS-autentisering. Vær vennlig å se gjennom innstillingsvalgene "
-"nedenfor"
+msgstr "Du har valgt NIS-autentisering. Se gjennom oppsettsvalga nedenfor."
#: authentication.pm:192
#, c-format
@@ -1008,9 +993,7 @@ msgstr "NIS-tjener"
msgid ""
"You have selected Windows Domain authentication. Please review the "
"configuration options below "
-msgstr ""
-"Du har valgt Windows-domene-autentisering. Vær vennlig å se gjennom "
-"innstillingsvalgene nedenfor"
+msgstr "Du har valgt Windows-domene-autentisering. Se gjennom oppsettsvalga nedenfor."
#: authentication.pm:218
#, c-format
@@ -1030,7 +1013,7 @@ msgstr "NIS-domene"
#: authentication.pm:222
#, c-format
msgid "DC Server"
-msgstr "KDCs-tjenere"
+msgstr "DC-tenar"
#: authentication.pm:236 authentication.pm:252
#, c-format
@@ -1046,17 +1029,17 @@ msgstr "Autentiseringsmetode"
#: authentication.pm:243
#, c-format
msgid "No password"
-msgstr "Intet passord"
+msgstr "Ingen passord"
#: authentication.pm:264
#, c-format
msgid "This password is too short (it must be at least %d characters long)"
-msgstr "Dette passordet er for kort (må være minst %d tegn langt)"
+msgstr "Passordet er for kort (det må ha minst %d tegn)"
#: authentication.pm:375
#, c-format
msgid "Can not use broadcast with no NIS domain"
-msgstr "Kan ikke bruke broadcast uten NIS-domene"
+msgstr "Kan ikke kringkaste uten NIS-domene"
#: authentication.pm:891
#, c-format
@@ -1066,17 +1049,17 @@ msgstr "Velg fil"
#: authentication.pm:897
#, c-format
msgid "Domain Windows for authentication : "
-msgstr "Windows-domene for autentisering : "
+msgstr "Domene for autentisering:"
#: authentication.pm:899
#, c-format
msgid "Domain Admin User Name"
-msgstr "Domeneadministrator-brukernavn"
+msgstr "Brukernavn til domeneadministrator"
#: authentication.pm:900
#, c-format
msgid "Domain Admin Password"
-msgstr "Domeneadministratorpassord"
+msgstr "Passord for domeneadministrator"
#. -PO: these messages will be displayed at boot time in the BIOS, use only ASCII (7bit)
#: bootloader.pm:960
@@ -1090,8 +1073,8 @@ msgid ""
msgstr ""
"Velkommen til operativsystem-velgeren!\n"
"\n"
-"Velg et operativsystem fra listen over eller\n"
-"vent for standardoppstart.\n"
+"Velg et operativsystem fra lista over eller\n"
+"vent for ( for standard operativsystem).\n"
"\n"
#: bootloader.pm:1132
@@ -1122,21 +1105,19 @@ msgstr "SILO"
#: bootloader.pm:1218
#, c-format
msgid "not enough room in /boot"
-msgstr "ikke nok plass i /boot"
+msgstr "Ikke nok plass på «/boot»"
#: bootloader.pm:1874
#, c-format
msgid "You can not install the bootloader on a %s partition\n"
-msgstr "Du kan ikke installere oppstartslasteren på en %s-partisjon\n"
+msgstr "Du kan ikke installere oppstartslasteren på en «%s»-partisjon\n"
#: bootloader.pm:1995
#, c-format
msgid ""
"Your bootloader configuration must be updated because partition has been "
"renumbered"
-msgstr ""
-"Din oppstartslasters oppsett trenger å oppdateres pga. rekkefølgen på dine "
-"partisjoner har blitt endret"
+msgstr "Oppstartslasteren må oppdateres, da partisjonene har fått ny rekkefølge"
#: bootloader.pm:2008
#, c-format
@@ -1144,8 +1125,8 @@ msgid ""
"The bootloader can not be installed correctly. You have to boot rescue and "
"choose \"%s\""
msgstr ""
-"Oppstartslasteren kan ikke bli installert korrekt. Du må gjøre nødoppstart "
-"og velge «%s»"
+"Klarte ikke å installere oppstartslasteren. Du må kjøre redningsmodus og "
+"velge «%s»"
#: bootloader.pm:2009
#, c-format
@@ -1155,32 +1136,32 @@ msgstr "Installer oppstartslaster på nytt"
#: common.pm:142
#, c-format
msgid "B"
-msgstr "B"
+msgstr " B"
#: common.pm:142
#, c-format
msgid "KB"
-msgstr "KB"
+msgstr " KiB"
#: common.pm:142
#, c-format
msgid "MB"
-msgstr "MB"
+msgstr " MiB"
#: common.pm:142
#, c-format
msgid "GB"
-msgstr "GB"
+msgstr " GiB"
#: common.pm:142 common.pm:151
#, c-format
msgid "TB"
-msgstr "TB"
+msgstr " TiB"
#: common.pm:159
#, c-format
msgid "%d minutes"
-msgstr "%d minutter"
+msgstr "%d minutt"
#: common.pm:161
#, c-format
@@ -1195,7 +1176,7 @@ msgstr "%d sekunder"
#: common.pm:383
#, c-format
msgid "command %s missing"
-msgstr "kommando %s mangler"
+msgstr "kommandoen %s mangler"
#: diskdrake/dav.pm:17
#, c-format
@@ -1205,10 +1186,10 @@ msgid ""
"configured as a WebDAV server). If you would like to add WebDAV mount\n"
"points, select \"New\"."
msgstr ""
-"WebDAV er en protokoll som lar deg montere en vevtjeners kataloger lokalt,\n"
-"og behandle den som et lokalt filsystem (forutsatt at vevtjeneren er satt "
-"opp som\n"
-"WebDAV-tjener). Hvis du vil legge til WebDAV monteringspunkter, velg \"Ny\"."
+"WebDAV er en protokoll som gjør at du kan montere en mappe\n"
+"på en vevtjener lokalt, og bruke den som en vanlig mappe . Dette\n"
+"virker bare hvis vevtjeneren er satt opp som en WebDAV-tjener.\n"
+"Velg «Ny» hvis du ønsker å montere WebDAV-mapper."
#: diskdrake/dav.pm:25
#, c-format
@@ -1223,7 +1204,7 @@ msgstr "Avmonter"
#: diskdrake/dav.pm:64 diskdrake/interactive.pm:407 diskdrake/smbnfs_gtk.pm:76
#, c-format
msgid "Mount"
-msgstr "Montér"
+msgstr "Monter"
#: diskdrake/dav.pm:65
#, c-format
@@ -1274,12 +1255,12 @@ msgstr "Feil"
#: diskdrake/dav.pm:86
#, c-format
msgid "Please enter the WebDAV server URL"
-msgstr "Tast inn WebDAV-tjeners URL"
+msgstr "Skriv inn WebDAV-tjeneradresse"
#: diskdrake/dav.pm:90
#, c-format
msgid "The URL must begin with http:// or https://"
-msgstr "URL'en må begynne med http:// eller https://"
+msgstr "URL-en må begynne med «http://» eller «https://»"
#: diskdrake/dav.pm:106 diskdrake/hd_gtk.pm:407 diskdrake/interactive.pm:303
#: diskdrake/interactive.pm:388 diskdrake/interactive.pm:550
@@ -1293,9 +1274,9 @@ msgid "Warning"
msgstr "Advarsel"
#: diskdrake/dav.pm:106
-#, fuzzy, c-format
+#, c-format
msgid "Are you sure you want to delete this mountpoint?"
-msgstr "Ønsker du å klikke på denne knappen? "
+msgstr "Vil du virkelig slette dette monteringspunktet?"
#: diskdrake/dav.pm:124
#, c-format
@@ -1325,8 +1306,7 @@ msgstr "Partisjonering"
#: diskdrake/hd_gtk.pm:68
#, c-format
msgid "Click on a partition, choose a filesystem type then choose an action"
-msgstr ""
-"Klikk på en partisjon og velg en filsystemtype. Velg deretter en handling"
+msgstr "Trykk på en partisjon og velg en filsystemtype og så en handling."
#: diskdrake/hd_gtk.pm:105 diskdrake/interactive.pm:1093
#: diskdrake/interactive.pm:1103 diskdrake/interactive.pm:1156
@@ -1337,7 +1317,7 @@ msgstr "Les nøye"
#: diskdrake/hd_gtk.pm:105
#, c-format
msgid "Please make a backup of your data first"
-msgstr "Ta sikkerhetskopi av dine data først"
+msgstr "Husk å ta reservekopi av alle viktige data først."
#: diskdrake/hd_gtk.pm:106 diskdrake/interactive.pm:240
#, c-format
@@ -1362,24 +1342,24 @@ msgid ""
"I suggest you first resize that partition\n"
"(click on it, then click on \"Resize\")"
msgstr ""
-"Du har én stor Microsoft Windows-partisjon\n"
-"Jeg foreslår at du først endrer størrelsen på denne partisjonen\n"
-"(klikk på den, klikk så på «Endre størrelse»)"
+"Du har en stor Microsoft Windows-partisjon\n"
+"Du bør først endre størrelsen på denne\n"
+"(trykk på den, og velg «Endre størrelse»)"
#: diskdrake/hd_gtk.pm:225
#, c-format
msgid "Please click on a partition"
-msgstr "Klikk på en partisjon"
+msgstr "Trykk på en partisjon"
#: diskdrake/hd_gtk.pm:239 diskdrake/smbnfs_gtk.pm:63
#, c-format
msgid "Details"
-msgstr "Detaljer"
+msgstr "Vis detaljer"
#: diskdrake/hd_gtk.pm:289
#, c-format
msgid "No hard drives found"
-msgstr "Ingen harddisker funnet"
+msgstr "Fant ingen harddisker"
#: diskdrake/hd_gtk.pm:316
#, c-format
@@ -1399,7 +1379,7 @@ msgstr "XFS"
#: diskdrake/hd_gtk.pm:378
#, c-format
msgid "Swap"
-msgstr "Veksel"
+msgstr "Vekselpartisjon"
#: diskdrake/hd_gtk.pm:378
#, c-format
@@ -1419,7 +1399,7 @@ msgstr "Windows"
#: diskdrake/hd_gtk.pm:379 services.pm:158
#, c-format
msgid "Other"
-msgstr "Andre"
+msgstr "Annet"
#: diskdrake/hd_gtk.pm:379 diskdrake/interactive.pm:1292
#, c-format
@@ -1434,7 +1414,7 @@ msgstr "Filsystemtyper:"
#: diskdrake/hd_gtk.pm:407
#, c-format
msgid "This partition is already empty"
-msgstr "Partisjonen er allerede tom"
+msgstr "Denne partisjonen er allerede tom."
#: diskdrake/hd_gtk.pm:416
#, c-format
@@ -1444,7 +1424,7 @@ msgstr "Bruk «Avmonter» først"
#: diskdrake/hd_gtk.pm:416
#, c-format
msgid "Use ``%s'' instead (in expert mode)"
-msgstr "Bruk \"%s\" i stedet (i ekspertmodus)"
+msgstr "Bruk «%s» i stedet (i ekspertmodus)"
#: diskdrake/hd_gtk.pm:416 diskdrake/interactive.pm:402
#: diskdrake/interactive.pm:588 diskdrake/removable.pm:25
@@ -1461,7 +1441,7 @@ msgstr "Velg en annen partisjon"
#: diskdrake/interactive.pm:211
#, c-format
msgid "Choose a partition"
-msgstr "Velg en partisjon"
+msgstr "Velg partisjon"
#: diskdrake/interactive.pm:273 diskdrake/interactive.pm:379
#: interactive/curses.pm:512
@@ -1478,7 +1458,7 @@ msgstr "Bekreftelse"
#: diskdrake/interactive.pm:281
#, c-format
msgid "Continue anyway?"
-msgstr "Fortsett likevel?"
+msgstr "Vil du likevel fortsette?"
#: diskdrake/interactive.pm:286
#, c-format
@@ -1488,12 +1468,12 @@ msgstr "Avslutt uten å lagre"
#: diskdrake/interactive.pm:286
#, c-format
msgid "Quit without writing the partition table?"
-msgstr "Avslutt uten å skrive partisjonstabellen?"
+msgstr "Vil du avslutte uten å lagre partisjonstabellen?"
#: diskdrake/interactive.pm:291
#, c-format
msgid "Do you want to save /etc/fstab modifications"
-msgstr "Ønsker du å lagre endringene i /etc/fstab"
+msgstr "Vil du å lagre endringene i «/etc/fstab»"
#: diskdrake/interactive.pm:298 fs/partitioning_wizard.pm:250
#, c-format
@@ -1507,9 +1487,10 @@ msgid ""
"Otherwise no entry for mount point %s will be written in fstab.\n"
"Quit anyway?"
msgstr ""
-"Du burde formatere partisjon %s.\n"
-"Hvis ikke vil ingen oppføring for monteringspunkt %s bli skrevet til fstab.\n"
-"Avslutt allikevel?"
+"Du bør formatere partisjonen «%s».\n"
+"Om du ikke gjør dette, blir det ikke lagt til en oppføring for "
+"monteringspunktet «%s» i «fstab».\n"
+"Vil du likevel avslutte?"
#: diskdrake/interactive.pm:316
#, c-format
@@ -1519,7 +1500,7 @@ msgstr "Fjern alle"
#: diskdrake/interactive.pm:317
#, c-format
msgid "Auto allocate"
-msgstr "Automatisk tildeling"
+msgstr "Tildel automatisk"
#: diskdrake/interactive.pm:323
#, c-format
@@ -1539,12 +1520,12 @@ msgstr "Harddiskinformasjon"
#: diskdrake/interactive.pm:368
#, c-format
msgid "All primary partitions are used"
-msgstr "Alle primærpartisjoner er i bruk"
+msgstr "Alle primærpartisjoner er brukt"
#: diskdrake/interactive.pm:369
#, c-format
msgid "I can not add any more partitions"
-msgstr "Jeg kan ikke legge til flere partisjoner"
+msgstr "Kan ikke legge til flere partisjoner"
#: diskdrake/interactive.pm:370
#, c-format
@@ -1552,13 +1533,13 @@ msgid ""
"To have more partitions, please delete one to be able to create an extended "
"partition"
msgstr ""
-"For å ha flere partisjoner, slett en for å kunne opprette en utvidet "
-"partisjon"
+"Du har flere partisjoner. Du må først slette én av de for å kunne lage "
+"en utvida partisjon."
#: diskdrake/interactive.pm:381
#, c-format
msgid "Reload partition table"
-msgstr "Last inn partisjonstabell på nytt"
+msgstr "Last partisjonstabell på nytt"
#: diskdrake/interactive.pm:388
#, c-format
@@ -1583,12 +1564,12 @@ msgstr "Formater"
#: diskdrake/interactive.pm:408 diskdrake/interactive.pm:870
#, c-format
msgid "Add to RAID"
-msgstr "Legg til RAID"
+msgstr "Legg til i RAID"
#: diskdrake/interactive.pm:409 diskdrake/interactive.pm:888
#, c-format
msgid "Add to LVM"
-msgstr "Legg til LVM"
+msgstr "Legg til i LVM"
#: diskdrake/interactive.pm:410
#, c-format
@@ -1613,17 +1594,17 @@ msgstr "Fjern fra LVM"
#: diskdrake/interactive.pm:415
#, c-format
msgid "Remove from dm"
-msgstr "Fjern fra dm"
+msgstr "Fjern fra DM"
#: diskdrake/interactive.pm:416
#, c-format
msgid "Modify RAID"
-msgstr "Modifiser RAID"
+msgstr "Endre RAID"
#: diskdrake/interactive.pm:417
#, c-format
msgid "Use for loopback"
-msgstr "Bruk for loopback"
+msgstr "Bruk til filmontering"
#: diskdrake/interactive.pm:428
#, c-format
@@ -1631,19 +1612,19 @@ msgid "Create"
msgstr "Opprett"
#: diskdrake/interactive.pm:450
-#, fuzzy, c-format
+#, c-format
msgid "Failed to mount partition"
-msgstr "Flytt filer til en ny partisjon"
+msgstr "Kunne ikke montere partisjonen"
#: diskdrake/interactive.pm:482 diskdrake/interactive.pm:484
#, c-format
msgid "Create a new partition"
-msgstr "Opprett en ny partisjon"
+msgstr "Lag ny partisjon"
#: diskdrake/interactive.pm:486
#, c-format
msgid "Start sector: "
-msgstr "Start-sektor: "
+msgstr "Startsektor: "
#: diskdrake/interactive.pm:489 diskdrake/interactive.pm:957
#, c-format
@@ -1658,12 +1639,12 @@ msgstr "Filsystemtype: "
#: diskdrake/interactive.pm:497
#, c-format
msgid "Preference: "
-msgstr "Valg: "
+msgstr "Innstilling: "
#: diskdrake/interactive.pm:500
#, c-format
msgid "Logical volume name "
-msgstr "Lokalt volumnavn"
+msgstr "Logisk volumnavn"
#: diskdrake/interactive.pm:520
#, c-format
@@ -1673,21 +1654,20 @@ msgid ""
"First remove a primary partition and create an extended partition."
msgstr ""
"Du kan ikke lage en ny partisjon\n"
-"(ettersom du har nådd det maksimale antallet primærpartisjoner).\n"
-"Du må først fjerne en primærpartisjon og lage en utvidet partisjon."
+"(ettersom du har nådd grensa på antallet partisjoner).\n"
+"Du må først fjerne en primærpartisjon, og lage en utvida partisjon."
#: diskdrake/interactive.pm:550
#, c-format
msgid "Remove the loopback file?"
-msgstr "Fjern loopback-filen?"
+msgstr "Vil du fjerne filmonteringsfila?"
#: diskdrake/interactive.pm:572
#, c-format
-msgid ""
-"After changing type of partition %s, all data on this partition will be lost"
+msgid "After changing type of partition %s, all data on this partition will be lost"
msgstr ""
-"Etter endring av type på partisjon %s, vil alle data på denne partisjonen gå "
-"tapt"
+"Når du har endra partisjonstypen til «%s» vil alle data på denne partisjonen "
+"være tapt"
#: diskdrake/interactive.pm:585
#, c-format
@@ -1697,47 +1677,49 @@ msgstr "Endre partisjonstype"
#: diskdrake/interactive.pm:587 diskdrake/removable.pm:47
#, c-format
msgid "Which filesystem do you want?"
-msgstr "Hvilket filsystem ønsker du?"
+msgstr "Hvilket filsystem vil du ha?"
#: diskdrake/interactive.pm:594
#, c-format
msgid "Switching from %s to %s"
-msgstr "Bytter fra %s til %s"
+msgstr "Bytter fra «%s» til «%s»"
#: diskdrake/interactive.pm:624
#, c-format
msgid "Set volume label"
-msgstr "Sett volumetikett"
+msgstr "Velg volumnavn"
#: diskdrake/interactive.pm:626
#, c-format
msgid "Beware, this will be written to disk as soon as you validate!"
-msgstr "Dette vil bli skrevet til disk så fort du godkjenner!"
+msgstr "Merk at denne blir skrevet til disken med én gang."
#: diskdrake/interactive.pm:627
#, c-format
msgid "Beware, this will be written to disk only after formatting!"
-msgstr "Dette vil kun bli skrevet til disk etter formatering!"
+msgstr ""
+"Merk at denne blir skrevet til disken bare etter at formateringa er "
+"fullført."
#: diskdrake/interactive.pm:629
#, c-format
msgid "Which volume label?"
-msgstr "Hvilken volumetikett?"
+msgstr "Hvilket volumnavn?"
#: diskdrake/interactive.pm:630
#, c-format
msgid "Label:"
-msgstr "Etikett:"
+msgstr "Volumnavn:"
#: diskdrake/interactive.pm:651
#, c-format
msgid "Where do you want to mount the loopback file %s?"
-msgstr "Hvor vil du montere loopback-filen %s?"
+msgstr "Hvor vil du montere filmonteringsfila «%s»?"
#: diskdrake/interactive.pm:652
#, c-format
msgid "Where do you want to mount device %s?"
-msgstr "Hvor vil du montere %s-enheten?"
+msgstr "Hvor vil du montere enheten «%s»?"
#: diskdrake/interactive.pm:657
#, c-format
@@ -1952,8 +1934,7 @@ msgstr "Formaterer partisjon %s"
#: diskdrake/interactive.pm:1191
#, c-format
msgid "After formatting partition %s, all data on this partition will be lost"
-msgstr ""
-"Etter formatering av partisjon %s vil alle data på denne partisjonen gå tapt"
+msgstr "Etter formatering av partisjon %s vil alle data på denne partisjonen gå tapt"
#: diskdrake/interactive.pm:1200 fs/partitioning.pm:48
#, c-format
@@ -2273,8 +2254,7 @@ msgstr "Enda ett"
#: diskdrake/smbnfs_gtk.pm:178
#, c-format
-msgid ""
-"Please enter your username, password and domain name to access this host."
+msgid "Please enter your username, password and domain name to access this host."
msgstr ""
"Tast inn brukernavnet, passordet og domenenavnet ditt for å få tilgang til "
"denne verten."
@@ -2706,8 +2686,7 @@ msgstr "Partisjonering"
#: fs/partitioning_wizard.pm:168
#, c-format
msgid "Which size do you want to keep for Microsoft Windows® on partition %s?"
-msgstr ""
-"Hvilken størrelse ønsker du å beholde Microsoft Windows® på partisjon %s?"
+msgstr "Hvilken størrelse ønsker du å beholde Microsoft Windows® på partisjon %s?"
#: fs/partitioning_wizard.pm:169
#, c-format
@@ -3223,7 +3202,7 @@ msgstr ""
"Her kan du velge en alternativ driver (enten OSS eller ALSA) for lydkortet "
"ditt (%s)."
-#. -PO: here the first %s is either "OSS" or "ALSA",
+#. -PO: here the first %s is either "OSS" or "ALSA",
#. -PO: the second %s is the name of the current driver
#. -PO: and the third %s is the name of the default driver
#: harddrake/sound.pm:412
@@ -5406,17 +5385,17 @@ msgstr ""
#: mygtk2.pm:1538 mygtk2.pm:1539
#, c-format
msgid "Password is trivial to guess"
-msgstr ""
+msgstr "Passordet er for lett å gjette"
#: mygtk2.pm:1540
#, c-format
msgid "Password should resist to basic attacks"
-msgstr ""
+msgstr "Passord bør stå i mot grunnleggende angrep"
#: mygtk2.pm:1541 mygtk2.pm:1542
-#, fuzzy, c-format
+#, c-format
msgid "Password seems secure"
-msgstr "Passord"
+msgstr "Passordet ser ut til å være sikkert"
#: partition_table.pm:411
#, c-format
@@ -5472,8 +5451,7 @@ msgstr "Finner ubrukte oversettelsespakker … "
msgid ""
"We have detected that some packages are not needed for your system "
"configuration."
-msgstr ""
-"Vi har funnet ut at noen av pakkene ikke trengs for systemoppsettet ditt."
+msgstr "Vi har funnet ut at noen av pakkene ikke trengs for systemoppsettet ditt."
#: pkgs.pm:266
#, c-format
@@ -5533,8 +5511,7 @@ msgstr "Kunne ikke installere pakkene som trengs for å dele din(e) skanner(e)."
#: scanner.pm:202
#, c-format
msgid "Your scanner(s) will not be available for non-root users."
-msgstr ""
-"Din(e) skanner(e) vil ikke være tilgjengelig(e) for brukere som ikke er root."
+msgstr "Din(e) skanner(e) vil ikke være tilgjengelig(e) for brukere som ikke er root."
#: security/help.pm:11
#, c-format
@@ -5589,8 +5566,7 @@ msgstr "Tillat direkte root-innlogging."
#: security/help.pm:33
#, c-format
-msgid ""
-"Allow the list of users on the system on display managers (kdm and gdm)."
+msgid "Allow the list of users on the system on display managers (kdm and gdm)."
msgstr "Tillat visning av brukere i innloggingshåndterer (kdm og gdm)."
#: security/help.pm:35
@@ -5768,8 +5744,7 @@ msgstr "Slå på sulogin(8) i enbrukermodus."
#: security/help.pm:100
#, c-format
msgid "Add the name as an exception to the handling of password aging by msec."
-msgstr ""
-"Legg til navnet som et unntak for håndteringen av passordforeldelse av msec."
+msgstr "Legg til navnet som et unntak for håndteringen av passordforeldelse av msec."
#: security/help.pm:102
#, c-format
@@ -5824,8 +5799,7 @@ msgstr ""
#: security/help.pm:117
#, c-format
msgid "if set to yes, check permissions of files in the users' home."
-msgstr ""
-"hvis satt til ja, sjekk rettigheter på filer i brukerenes hjemmekatalog."
+msgstr "hvis satt til ja, sjekk rettigheter på filer i brukerenes hjemmekatalog."
#: security/help.pm:118
#, c-format
@@ -5865,8 +5839,7 @@ msgstr "hvis satt til ja, rapporter filer uten eier."
#: security/help.pm:125
#, c-format
msgid "if set to yes, check files/directories writable by everybody."
-msgstr ""
-"hvis satt til ja, sjekk filer eller kataloger som er skrivbare av alle."
+msgstr "hvis satt til ja, sjekk filer eller kataloger som er skrivbare av alle."
#: security/help.pm:126
#, c-format
@@ -5875,8 +5848,7 @@ msgstr "hvis satt til ja, kjør chkrootkit-kontroller."
#: security/help.pm:127
#, c-format
-msgid ""
-"if set, send the mail report to this email address else send it to root."
+msgid "if set, send the mail report to this email address else send it to root."
msgstr "sender e-postrapport til denne adressen dersom satt, ellers til root."
#: security/help.pm:128
@@ -6157,8 +6129,7 @@ msgstr "Ikke send tomme e-postrapporter"
#: security/l10n.pm:58
#, c-format
msgid "If set, send the mail report to this email address else send it to root"
-msgstr ""
-"Hvis satt, send e-postrapport til denne e-postadressen, ellers send til root."
+msgstr "Hvis satt, send e-postrapport til denne e-postadressen, ellers send til root."
#: security/l10n.pm:59
#, c-format
@@ -6306,8 +6277,7 @@ msgstr ""
#: services.pm:28
#, c-format
-msgid ""
-"Common UNIX Printing System (CUPS) is an advanced printer spooling system"
+msgid "Common UNIX Printing System (CUPS) is an advanced printer spooling system"
msgstr "Common UNIX Printing System (CUPS) er et avansert utskriftskøsystem."
#: services.pm:29
@@ -6342,8 +6312,7 @@ msgstr ""
#: services.pm:35
#, c-format
msgid "HAL is a daemon that collects and maintains information about hardware"
-msgstr ""
-"HAL er en tjeneste som samler inn og vedlikeholder informasjon om maskinvare."
+msgstr "HAL er en tjeneste som samler inn og vedlikeholder informasjon om maskinvare."
#: services.pm:36
#, c-format
@@ -6356,8 +6325,7 @@ msgstr ""
#: services.pm:38
#, c-format
-msgid ""
-"Apache is a World Wide Web server. It is used to serve HTML files and CGI."
+msgid "Apache is a World Wide Web server. It is used to serve HTML files and CGI."
msgstr ""
"Apache er en World Wide Web-tjener. Den blir brukt til å tjene HTML-filer og "
"CGI."
@@ -6608,8 +6576,7 @@ msgstr ""
#: services.pm:92
#, c-format
-msgid ""
-"SANE (Scanner Access Now Easy) enables to access scanners, video cameras, ..."
+msgid "SANE (Scanner Access Now Easy) enables to access scanners, video cameras, ..."
msgstr ""
"SANE (Scanner Access Now Easy) gir tilgang til skannere, filmkamera og "
"lignende … "
@@ -7093,5 +7060,3 @@ msgstr ""
msgid "Installation failed"
msgstr "Installasjon mislyktes"
-#~ msgid "Automatic routing from ALSA to PulseAudio"
-#~ msgstr "Automatisk ruting fra ALSA til PulseAudio"