anchor.diff:  
   build_term returns [ret]
   	: i:INT 
  -		{ ret = "self.factory.makeInt(%s)" % #i.getText() }
  +		{ ret = "_f.makeInt(%s)" % #i.getText() }
   	| r:REAL 
  -		{ ret = "self.factory.makeReal(%s)" % #r.getText() }
  +		{ ret = "_f.makeReal(%s)" % #r.getText() }
   	| s:STR 
  -		{ ret = "self.factory.parse(%r)" % #s.getText() }
  +		{ ret = "_f.parse(%r)" % #s.getText() }
   	| c:UCID 
  -		{ ret = "self.factory.makeStr(%r)" % #c.getText() }
  +		{ ret = "_f.makeStr(%r)" % #c.getText() }
   	| v:LCID 
  -//		{ ret = "self.factory.makeVar(%r,self.factory.makeWildcard())" % #v.getText() }
  -		{ ret = "_kargs[%r]" % #v.getText() }
  +//		{ ret = "_f.makeVar(%r,_f.makeWildcard())" % #v.getText() }
  +		{ ret = "_k[%r]" % #v.getText() }
   	| w:WILDCARD 
  -//		{ ret = "self.factory.makeWildcard()" }
  +//		{ ret = "_f.makeWildcard()" }
   		{
  -            ret = "_args[%d]" % self.argn
  +            ret = "_[%d]" % self.argn
               self.argn += 1
           }
   	| #( LIST l=build_term )
   		{ ret = l }
   	| #( APPL c=build_term a=build_term )
  -		{ ret = "self.factory.makeAppl(%s,%s)" % (c, a) }
  +		{ ret = "_f.makeAppl(%s,%s)" % (c, a) }
   	| #( TRNSF n=id a=build_trnsf_args)
   		{ ret = "self.%s(%s)" % (n, a) }
   	| a:ACTION
   		{ ret = #a.getText() }
   	| NIL
  -		{ ret = "self.factory.makeNilList()" }
  +		{ ret = "_f.makeNilList()" }
   	| #( COMMA h=build_term t=build_term )
  -		{ ret = "self.factory.makeConsList(%s,%s)" % (h, t) }
  +		{ ret = "_f.makeConsList(%s,%s)" % (h, t) }
   	| #( STAR p=build_term )
   		{ ret = p }
   	;
  
positive.code: 		{
              if flag:
                  pattern = self.stringify_term(#t)
                  self.writeln("_result = self.factory.make(%r, *_args, **_kargs)" % pattern)
              else:
                  self.argn = 0
                  pattern = self.build_term(#t)
                  self.writeln("_result = %s" % pattern)
          }
  	;
  
  
negative.code: 	        }
  	| pattern=t:stringify_term
  	        {
                  self.writeln("if not _f.match(%r, _t, _, _k):" % pattern)
                  self.indent()
                  self.writeln("raise Failure")
                  self.deindent()
                  if not self.is_static_term(#t):
                      self.argn = 0
                      self.post_match_term(#t)
                      self.writeln("_r = _f.make(%r, *_, **_k)" % pattern)
  	        }
  	;
  
  