anchor.diff:  		))* '<' '/' 'var' '>'
   			{
   				// add global variables to initial state vector and label as an input & output
  +				System.out.println("GlobalVarHashMap size = " + GlobalVarHashMap.size());
   				for(Entry<String, Integer> e : GlobalVarHashMap.entrySet()){
   					String globalVar = e.getKey();
  -					StatevectorMap.put(globalVar, e.getValue());
  -					
  +					StatevectorMap.put(globalVar, e.getValue());			
   					Integer index =  VariableIndex++;
  -	    			VarIndexMap.insert(globalVar, index);
  -	    			VarNodeMap.put(globalVar, new VarNode(globalVar, index));
  -	    			
  -	    			Inputs.add(globalVar);
  -	    			Outputs.add(globalVar);
  -	    		}
  +	    		VarIndexMap.insert(globalVar, index);
  +	    		//VarNodeMap.put(globalVar, new VarNode(globalVar, index));
  +	    		VarNodeMap.put(globalVar, new ExprTree(globalVar));	    		
  +	    		Inputs.add(globalVar);
  +	    		System.out.println("Added globalVar (" + globalVar + ") to Inputs.");
  +	    		Outputs.add(globalVar);
  +	    	}
   			}
   	;
   
  
positive.code: }
  
  @lexer::header{
      package platu.lpn.io;
  }
  
  parseLpnFile[Project prj, boolean instance, HashMap<String, String> portMap] returns [Set<LPN> lpnSet]
  	:	
  	;
  	
  lpn[Project prj] returns [Set<LPN> lpnSet]
      :   {$lpnSet = new HashSet<LPN>();}
          ((globalConstants globalVariables) | (globalVariables globalConstants) | (globalVariables) | (globalConstants))?
          	{
          		// check that global constants are consistently defined in each lpn file
  
negative.code:     private int TransitionIndex = 0;
      private int GlobalCount = 0;  // number of global variables defined in this lpn file
      private int GlobalSize = 0;  // number of global variables defined
      private String curLpn = "";
  //    private boolean Instance = false;
  //    private HashMap<String, VarNode> VarNodeMap = null; // maps variable name to variable object
  //    private HashMap<String, ArrayNode> ArrayNodeMap = null; // maps array variable name to variable object
  //    private DualHashMap<String, Integer> VarIndexMap = null;  // maps variables to an array index
  //    private HashMap<String, Integer> GlobalConstHashMap = new HashMap<String, Integer>();  // global constants within a single lpn file
  //    private HashMap<String, Integer> ConstHashMap = null;  // constants within a single module
  //    private HashMap<String, Integer> StatevectorMap = null;  // module variables mapped to initial values
  //    private HashMap<String, Integer> VarCountMap = null; // count of the references to each module variable
  //    private List<LPNTran> inputTranList = null;  // list of lpn transitions which affect a modules input
  //    private List<LPNTran> outputTranList = null; // list of lpn transitions which affect a modules output
  //    private VarSet Inputs = null;  // module inputs
  //    private VarSet Internals = null; // module internal variables
  //    private VarSet Outputs = null;  // module outputs
      
      public enum VarType {
      	INPUT, OUTPUT, INTERNAL, GLOBAL	
      }
  }
  
  @rulecatch{
  