aer-inject: use aliases for various keywords

Introduce aliases for some of the longer-length keywords:

	PCI_ID = ID
	COR_STATUS = COR = CORRECTABLE
	UNCOR_STATUS = UNCOR = UNCORRECTABLE
	HEADER_LOG = HL

Signed-off-by: Andrew Patterson <andrew.patterson@hp.com>
Signed-off-by: Huang Ying <ying.huang@intel.com>
diff --git a/SPEC b/SPEC
index d2c66db..bcce21b 100644
--- a/SPEC
+++ b/SPEC
@@ -67,3 +67,12 @@
 (hopefully).
 
 Comments start with # until the end of the line.
+
+Keywords are case-insensitive.
+
+There are aliases for some of the longer keywords:
+
+      PCI_ID = ID
+      COR_STATUS = COR = CORRECTABLE
+      UNCOR_STATUS = UNCOR = UNCORRECTABLE
+      HEADER_LOG = HL
diff --git a/aer.lex b/aer.lex
index a2dea48..6121e4e 100644
--- a/aer.lex
+++ b/aer.lex
@@ -54,6 +54,7 @@
 	int32_t val;
 } keys[] = {
 #define KEY(x) { #x, x }
+#define ALIAS(x, y) { #x, y }
 #define KEYVAL(x,v) { #x, x, v }
 	KEY(AER),
 	KEY(DOMAIN),
@@ -61,9 +62,15 @@
 	KEY(DEV),
 	KEY(FN),
 	KEY(PCI_ID),
+	ALIAS(ID, PCI_ID),
 	KEY(UNCOR_STATUS),
+	ALIAS(UNCOR, UNCOR_STATUS),
+	ALIAS(UNCORRECTABLE, UNCOR_STATUS),
 	KEY(COR_STATUS),
+	ALIAS(COR, COR_STATUS),
+	ALIAS(CORRECTABLE, COR_STATUS),
 	KEY(HEADER_LOG),
+	ALIAS(HL, HEADER_LOG),
 	KEYVAL(TRAIN,PCI_ERR_UNC_TRAIN),
 	KEYVAL(DLP, PCI_ERR_UNC_DLP),
 	KEYVAL(POISON_TLP, PCI_ERR_UNC_POISON_TLP),