| 
														
															@@ -137,7 +137,7 @@ public class SPSAssembler { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
 
														 | 
														
														 | 
														
															 
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       CommandlineProcessor.processCommandline(SPSAssembler.class, args);
 
														 | 
														
														 | 
														
															       CommandlineProcessor.processCommandline(SPSAssembler.class, args);
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
 
														 | 
														
														 | 
														
															 
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-      registerOutputter();
 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+      registerAllOutputter();
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
 
														 | 
														
														 | 
														
															 
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       if ((source == null) || (!source.exists())) {
 
														 | 
														
														 | 
														
															       if ((source == null) || (!source.exists())) {
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         CommandlineProcessor.showHelp(
 
														 | 
														
														 | 
														
															         CommandlineProcessor.showHelp(
 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -171,6 +171,7 @@ public class SPSAssembler { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
 
														 | 
														
														 | 
														
															 
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         outputFile(mnemonics);
 
														 | 
														
														 | 
														
															         outputFile(mnemonics);
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
 
														 | 
														
														 | 
														
															 
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        System.out.println("assembling succesfully");
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       } catch (SyntaxError e) {
 
														 | 
														
														 | 
														
															       } catch (SyntaxError e) {
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         e.printStackTrace();
 
														 | 
														
														 | 
														
															         e.printStackTrace();
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         System.err.println(e.getMessage());
 
														 | 
														
														 | 
														
															         System.err.println(e.getMessage());
 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -186,8 +187,8 @@ public class SPSAssembler { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															    * @throws IllegalAccessException
 
														 | 
														
														 | 
														
															    * @throws IllegalAccessException
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															    * @throws Exception
 
														 | 
														
														 | 
														
															    * @throws Exception
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															    */
 
														 | 
														
														 | 
														
															    */
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-  private static void registerOutputter() throws InstantiationException, IllegalAccessException, Exception {
 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    Set<Class<?>> outputClasses = registerOutputter(SPSOutputter.class);
 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  private static void registerAllOutputter() throws InstantiationException, IllegalAccessException, Exception {
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    Set<Class<?>> outputClasses = searchOutputter(SPSOutputter.class);
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     for (Class<?> outClass : outputClasses) {
 
														 | 
														
														 | 
														
															     for (Class<?> outClass : outputClasses) {
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       SPSOutputter annotation = outClass.getAnnotation(SPSOutputter.class);
 
														 | 
														
														 | 
														
															       SPSOutputter annotation = outClass.getAnnotation(SPSOutputter.class);
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       if (annotation.name().equalsIgnoreCase(outputFormat)) {
 
														 | 
														
														 | 
														
															       if (annotation.name().equalsIgnoreCase(outputFormat)) {
 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -200,14 +201,12 @@ public class SPSAssembler { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     }
 
														 | 
														
														 | 
														
															     }
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   }
 
														 | 
														
														 | 
														
															   }
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
 
														 | 
														
														 | 
														
															 
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-  private static Set<Class<?>> registerOutputter(Class<? extends Annotation>... annotationClasses) {
 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+  private static Set<Class<?>> searchOutputter(Class<? extends Annotation> annotationClass) {
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     ConfigurationBuilder builder = new ConfigurationBuilder();
 
														 | 
														
														 | 
														
															     ConfigurationBuilder builder = new ConfigurationBuilder();
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     builder.addUrls(ClasspathHelper.forPackage(DEFAULT_PACKAGE_FILTER));
 
														 | 
														
														 | 
														
															     builder.addUrls(ClasspathHelper.forPackage(DEFAULT_PACKAGE_FILTER));
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     Reflections reflections = new Reflections(builder);
 
														 | 
														
														 | 
														
															     Reflections reflections = new Reflections(builder);
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     Set<Class<?>> classes = new HashSet<Class<?>>();
 
														 | 
														
														 | 
														
															     Set<Class<?>> classes = new HashSet<Class<?>>();
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    for (Class<? extends Annotation> class1 : annotationClasses) {
 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-      classes.addAll(reflections.getTypesAnnotatedWith(class1));
 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    }
 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    classes.addAll(reflections.getTypesAnnotatedWith(annotationClass));
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     return classes;
 
														 | 
														
														 | 
														
															     return classes;
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															   }
 
														 | 
														
														 | 
														
															   }
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
 
														 | 
														
														 | 
														
															 
 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -417,7 +416,7 @@ public class SPSAssembler { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       // seems to be a macro usage
 
														 | 
														
														 | 
														
															       // seems to be a macro usage
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       name = name.substring(1);
 
														 | 
														
														 | 
														
															       name = name.substring(1);
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       String[] arguments = label.split(" ");
 
														 | 
														
														 | 
														
															       String[] arguments = label.split(" ");
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-      if (arguments.length < 2) {
 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+      if (arguments.length < 1) {
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         throw new IllegalArgument(srcLineNumber, "Need at least one argument for the macro name.");
 
														 | 
														
														 | 
														
															         throw new IllegalArgument(srcLineNumber, "Need at least one argument for the macro name.");
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       }
 
														 | 
														
														 | 
														
															       }
 
														 | 
													
												
											
												
													
														| 
														 | 
														
															       String[] args = null;
 
														 | 
														
														 | 
														
															       String[] args = null;
 
														 |