Commit fa1db621 authored by Phil Jones's avatar Phil Jones

Add more missing/obsolete command warnings.

parent 85110c40
......@@ -986,7 +986,6 @@ class _KatLEX(Lexer):
"MIRROR",
"MODULATOR",
"MOTION_DETECTOR",
"NOPLOT",
"NOXAXIS",
"PDTYPE",
"PHASE",
......@@ -1009,8 +1008,10 @@ class _KatLEX(Lexer):
@_(
"color",
"conf",
"debug",
"gnuterm",
"noplot",
"pause",
"printmatrix",
"pyterm",
......@@ -1026,7 +1027,28 @@ class _KatLEX(Lexer):
line = self.text.split("\n")[self.lineno - 1]
self.index += len(line) - len(t.value)
@_("multi")
@_(
"multi",
"pdS",
"pdN",
"hd",
"qd",
"sd",
"qhd",
"qhdS",
"qhdN",
"pgaind",
"fadd",
"map",
"knm",
"smotion",
"vacuum",
"tf",
"tf2",
"func",
"diff",
"deriv_h",
)
def not_implemented(self, t):
self.warnings.append(
(f"Command '{t.value}' not yet implemented.", self.lineno, 1)
......@@ -1064,7 +1086,6 @@ class _KatLEX(Lexer):
MAXTEM = r"maxtem\s"
MODULATOR = r"mod\s"
MIRROR = r"(mirror|m[1-2]?)\s"
NOPLOT = r"noplot\s"
NOXAXIS = r"noxaxis"
PDTYPE = r"pdtype\s"
PHASE = r"phase\s"
......@@ -1246,11 +1267,6 @@ class _KatLEX(Lexer):
t.value = t.value.strip()
return t
def NOPLOT(self, t):
self.push_state(_KatComponentLEX)
t.value = t.value.strip()
return t
def NOXAXIS(self, t):
self.push_state(_KatComponentLEX)
t.value = t.value.strip()
......@@ -1508,7 +1524,6 @@ class _KatYACC(Parser):
"scales": [],
"tems": [],
"masks": [],
"noplots": [],
"xaxis": None,
"x2axis": None,
"x3axis": None,
......@@ -2003,14 +2018,6 @@ class _KatYACC(Parser):
# ignoring factor as masks in Finesse 3 just zero the given field
self.blocks[block]["masks"].append(dict(zip(params[:-1], values[:-1])))
@_("NOPLOT STRING")
def instruction(self, p):
params = ["output"]
values = [p[i] for i in range(1, len(p))]
block = self.block
self.blocks[block]["noplots"].append(dict(zip(params, values)))
@_("LAMBDA NUMBER")
def instruction(self, p):
block = self.block
......@@ -2159,7 +2166,6 @@ class KatParserError(ValueError): # __NODOC__
r"m2\s": "m2 name R L phi node1 node2",
r"m1\s": "m1 name T L phi node1 node2",
r"m\s": "m name R T phi node1 node2",
r"noplot\s": "noplot output",
r"noxaxis": None,
r"pd\s": "pd[n] name [f1 [phase1 [f2 [phase2 [...] ] ] ] ] node[*]",
r"phase\s": "phase 0-7",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment