anchor.diff:  			}
   		| var2=ID
   			{
  +			  String var2_tmp = $var2.text;
  +        if ($var2.text.contains(".")) {
  +          var2_tmp = var2_tmp.replace(".", "_");
  +        }
  +        else {
  +          var2_tmp = $var2.text;
  +        }
   				// get variable initial value
  -				if(GlobalConstHashMap.containsKey($var2.text)){
  -					value = GlobalConstHashMap.get($var2.text);
  -				}
  -				else if(GlobalVarHashMap.containsKey($var2.text)){
  -					value = GlobalVarHashMap.get($var2.text);
  -				}
  -				else if(ConstHashMap.containsKey($var2.text)){
  -					value = ConstHashMap.get($var2.text);
  -				}
  -				else if(StatevectorMap.containsKey($var2.text)){ // Should var be allowed to assign a var?
  -					value = StatevectorMap.get($var2.text);
  +				if(GlobalConstHashMap.containsKey(var2_tmp)){
  +					value = GlobalConstHashMap.get(var2_tmp);
  +				}
  +				else if(GlobalVarHashMap.containsKey(var2_tmp)){
  +					value = GlobalVarHashMap.get(var2_tmp);
  +				}
  +				else if(ConstHashMap.containsKey(var2_tmp)){
  +					value = ConstHashMap.get(var2_tmp);
  +				}
  +				else if(StatevectorMap.containsKey(var2_tmp)){ // Should var be allowed to assign a var?
  +					value = StatevectorMap.get(var2_tmp);
   				}
   				else{
   					System.err.println("error on line " + $var2.getLine() + ": " + $var2.text + " is not defined"); 
  
positive.code:         			System.exit(1);
          		}
          	} 
        	(module[prj]
              {
              	$lpnSet.add($module.lpn);
              }
          | main[prj]
          	{
          		
          	}
          )+ EOF
      ;
      
  main[Project prj]
  	:	'<' 'mod' 'name' '=' '"' 'main' '"' '>'
  			{
  				if(main == true){
  
negative.code: 			}
  		| var2=ID
  			{
  			  String var2_tmp = $var2.text;
          if ($var2.text.contains(".")) {
            var2_tmp = var2_tmp.replace(".", "_");
          }
          else {
            var2_tmp = $var2.text;
          }
  				// get value of variable
  				Integer value = null;
  				if(GlobalConstHashMap.containsKey(var2_tmp)){
  					value = GlobalConstHashMap.get(var2_tmp);
  				}
  				else if(GlobalVarHashMap.containsKey(var2_tmp)){
  					System.err.println("error on line " + $var2.getLine() + ": global variable " + $var2.text + " cannot be assigned to global variable " + $var.text); 
      				System.exit(1);
  				}
  