- tokenSequence = tokenize( data )
- print ( pformat( tokenSequence ) ) # Display tokenization
- tree = parse( tokenSequence )
- #print ( tree )
- print ( variable_dict )
- print ( capabilities_dict )
+ # Iterate through additional layers
+ for partial in partialFileSets:
+ # Increment layer for each -p option
+ macros_map.addLayer()
+ variables_dict.incrementLayer() # DefaultLayer is layer 0
+
+ # Iterate and process each of the file in the layer
+ for filename in partial:
+ variables_dict.setCurrentFile( filename )
+ processKLLFile( filename )
+
+ # Apply assignment cache, see 5.1.2 USB Codes for why this is necessary
+ macros_map.replayCachedAssignments()
+ # Remove un-marked keys to complete the partial layer
+ macros_map.removeUnmarked()
+
+ # Do macro correlation and transformation
+ macros_map.generate()
+
+ # Process needed templating variables using backend
+ backend.process( capabilities_dict, macros_map, variables_dict )