*** parse1.yrl	Thu Jul 10 13:50:11 2008
--- parse4.yrl	Wed Sep 10 13:38:42 2008
***************
*** 33,39 ****
  %struct
  record_expr record_tuple record_field record_fields
  if_expr if_clause if_clauses case_expr cr_clause cr_clauses receive_expr
! fun_expr fun_clause fun_clauses
  %% cond_expr cond_clause cond_clauses
  try_expr try_catch try_clause try_clauses query_expr
  function_call argument_list
--- 33,39 ----
  %struct
  record_expr record_tuple record_field record_fields
  if_expr if_clause if_clauses case_expr cr_clause cr_clauses receive_expr
! fun_expr fun_clause fun_clauses atom_or_var integer_or_var
  %% cond_expr cond_clause cond_clauses
  try_expr try_catch try_clause try_clauses query_expr
  function_call argument_list
***************
*** 302,312 ****
  
  fun_expr -> 'fun' atom '/' integer :
  	{'fun',line('$1'),{function,element(3, '$2'),element(3, '$4')}}.
! fun_expr -> 'fun' atom ':' atom '/' integer :
! 	{'fun',line('$1'),{function,element(3, '$2'),element(3, '$4'),element(3,'$6')}}.
  fun_expr -> 'fun' fun_clauses 'end' :
  	build_fun(line('$1'), '$2').
  
  fun_clauses -> fun_clause : ['$1'].
  fun_clauses -> fun_clause ';' fun_clauses : ['$1' | '$3'].
  
--- 302,324 ----
  
  fun_expr -> 'fun' atom '/' integer :
  	{'fun',line('$1'),{function,element(3, '$2'),element(3, '$4')}}.
! fun_expr -> 'fun' atom_or_var ':' atom_or_var '/' integer_or_var :
!         Line = line('$1'),
! 	case {'$2','$4','$6'}
! 	  of {{atom,_,M},{atom,_,F},{integer,_,A}}
!           -> {'fun',Line,{function,M,F,A}}
! 	   ; _
! 	  -> {call,Line,{remote,Line,{atom,Line,erlang},{atom,Line,make_fun}},
! 	                ['$2','$4','$6']}
! 	end.
  fun_expr -> 'fun' fun_clauses 'end' :
  	build_fun(line('$1'), '$2').
  
+ atom_or_var -> atom.
+ atom_or_var -> var.
+ integer_or_var -> integer.
+ integer_or_var -> var.
+ 
  fun_clauses -> fun_clause : ['$1'].
  fun_clauses -> fun_clause ';' fun_clauses : ['$1' | '$3'].
  
