Index: contrib/arch/hadlbppp.py
===================================================================
--- contrib/arch/hadlbppp.py	(revision 6d4c5497f87538bcbe4b9753ccd5efe134ee9ec4)
+++ contrib/arch/hadlbppp.py	(revision 100aaf599e0e9ae1fcd854ba1467c0f0d5b09392)
@@ -42,5 +42,5 @@
 	"Print usage syntax"
 	
-	print "%s <--dumpbp|--dumpadl|--noop>+ <OUTPUT>" % prname
+	print "%s <--bp|--epb|--adl|--nop>+ <OUTPUT>" % prname
 
 def tabs(cnt):
@@ -371,4 +371,9 @@
 	return output
 
+def parse_ebp(component, name, tokens, base_indent):
+	"Parse Behavior Protocol and generate Extended Behavior Protocol output"
+	
+	return "component %s {\n\tbehavior {\n\t\t%s\n\t}\n}" % (component, parse_bp(name, tokens, base_indent + 2))
+
 def get_iface(name):
 	"Get interface by name"
@@ -401,6 +406,10 @@
 	
 	global opt_bp
-	
-	fname = "%s.bp" % frame['name']
+	global opt_ebp
+	
+	if (opt_ebp):
+		fname = "%s.ebp" % frame['name']
+	else:
+		fname = "%s.bp" % frame['name']
 	
 	if (archf != None):
@@ -439,4 +448,9 @@
 		outf.write(parse_bp(outname, merge_bp(initialization, finalization, protocols), 0))
 		outf.close()
+	
+	if (opt_ebp):
+		outf = file(outname, "w")
+		outf.write(parse_ebp(frame['name'], outname, merge_bp(initialization, finalization, protocols), 0))
+		outf.close()
 
 def get_system_arch():
@@ -475,4 +489,5 @@
 	
 	global opt_bp
+	global opt_ebp
 	
 	if (archf != None):
@@ -484,4 +499,9 @@
 		outf = file(outname, "w")
 		outf.write("NULL")
+		outf.close()
+	
+	if (opt_ebp):
+		outf = file(outname, "w")
+		outf.write("component null {\n\tbehavior {\n\t\tNULL\n\t}\n}")
 		outf.close()
 
@@ -570,4 +590,5 @@
 	
 	global opt_bp
+	global opt_ebp
 	
 	arch = get_system_arch()
@@ -614,5 +635,5 @@
 	
 	outname = os.path.join(outdir, "%s.archbp" % arch['name'])
-	if (opt_bp):
+	if ((opt_bp) or (opt_ebp)):
 		outf = file(outname, "w")
 	else:
@@ -1564,4 +1585,5 @@
 	global arch_properties
 	global opt_bp
+	global opt_ebp
 	global opt_adl
 	
@@ -1571,12 +1593,15 @@
 	
 	opt_bp = False
+	opt_ebp = False
 	opt_adl = False
 	
 	for arg in sys.argv[1:(len(sys.argv) - 1)]:
-		if (arg == "--dumpbp"):
+		if (arg == "--bp"):
 			opt_bp = True
-		elif (arg == "--dumpadl"):
+		elif (arg == "--ebp"):
+			opt_ebp = True
+		elif (arg == "--adl"):
 			opt_adl = True
-		elif (arg == "--noop"):
+		elif (arg == "--nop"):
 			pass
 		else:
@@ -1584,4 +1609,8 @@
 			return
 	
+	if ((opt_bp) and (opt_ebp)):
+		print "Error: Cannot dump both original Behavior Protocols and Extended Behavior Protocols"
+		return
+	
 	path = os.path.abspath(sys.argv[-1])
 	if (not os.path.isdir(path)):
