|
@@ -97,11 +97,23 @@
|
|
|
table)
|
|
|
"The SysRPL syntax table.")
|
|
|
|
|
|
+(defvar sysrpl-rplcomp-keywords '("LAM" "ID" "TAG" "CHR" "CODE" "CODEM" "ENDCODE" "PTR"
|
|
|
+ "ROMPTR" "FLASHPTR" "ZINT" "ARRY" "LNKARRY" "HXS" "GROB"
|
|
|
+ "::" ";" "BEGIN" "AGAIN" "UNTIL" "WHILE" "REPEAT" "DO"
|
|
|
+ "LOOP" "+LOOP" "IF" "ELSE" "THEN" "FCN" "ENDFCN" "{" "}"
|
|
|
+ "ASSEMBLE" "RPL" "ASSEMBLEM" "!RPL" "ROMID" "xROMID"
|
|
|
+ "NAME" "NULLNAME" "xNAME" "sNAME" "tNAME"
|
|
|
+ "NAMELESS" "LABEL" "LOCALNAME" "LOCALLABEL"
|
|
|
+ "EXTERNAL" "LOCAL" "FEXTERNAL" "DEFINE" "INCLUDE"
|
|
|
+ "TITLE" "STITLE" "EJECT")
|
|
|
+ "Keywords used by the RPLCOMP SysRPL compiler.")
|
|
|
+
|
|
|
(defun sysrpl-font-lock-compile-keywords (names)
|
|
|
"Construct a list of keyword matcher clauses suitable for `font-lock-keywords'."
|
|
|
(append (list (list "^\\*.*$" (list 0 'sysrpl-font-lock-comment-face))
|
|
|
(list "(.*)" (list 0 'sysrpl-font-lock-comment-face))
|
|
|
- (list (concat "\\<" (regexp-opt '("::" ";")) "\\>") (list 0 'sysrpl-font-lock-keyword-face)))
|
|
|
+ (list (concat "\\<" (regexp-opt sysrpl-rplcomp-keywords) "\\>")
|
|
|
+ (list 0 'sysrpl-font-lock-keyword-face)))
|
|
|
(mapcar (lambda (str) (list (concat "\\<" (regexp-quote str) "\\>")
|
|
|
(list 0 'sysrpl-font-lock-name-face)))
|
|
|
names)))
|