summaryrefslogtreecommitdiffstats
path: root/parsers
diff options
context:
space:
mode:
authorexpoonserver <devnull@localhost>2014-06-26 02:34:19 +0100
committerexpoonserver <devnull@localhost>2014-06-26 02:34:19 +0100
commitb1d6e1c3d5f4345f1a9cea251414f4cd28f119a3 (patch)
tree5eff4615932d6ab45d9d5427a9978e0279328dec /parsers
parent3869bd536ea4962572c3aeb30a12ad56a2d0f0f2 (diff)
downloadtroggle-b1d6e1c3d5f4345f1a9cea251414f4cd28f119a3.tar.gz
troggle-b1d6e1c3d5f4345f1a9cea251414f4cd28f119a3.tar.bz2
troggle-b1d6e1c3d5f4345f1a9cea251414f4cd28f119a3.zip
Replace assert on unrecognised commands with print, so that a minor
parsing issue doesn't completely kill a parsing update. Add parsing for requires and alias commands.
Diffstat (limited to 'parsers')
-rw-r--r--parsers/survex.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/parsers/survex.py b/parsers/survex.py
index cbc91bd..3f490ea 100644
--- a/parsers/survex.py
+++ b/parsers/survex.py
@@ -183,6 +183,10 @@ def RecursiveLoad(survexblock, survexfile, fin, textlines):
survextitle = models.SurvexTitle(survexblock=survexblock, title=line.strip('"'), cave=survexblock.cave)
survextitle.save()
+ elif cmd == "require":
+ # should we check survex version available for processing?
+ pass
+
elif cmd == "data":
ls = line.lower().split()
stardata = { "type":ls[0] }
@@ -200,8 +204,10 @@ def RecursiveLoad(survexblock, survexfile, fin, textlines):
elif cmd == "fix":
survexblock.MakeSurvexStation(line.split()[0])
+
else:
- assert cmd in [ "sd", "include", "units", "entrance", "data", "flags", "title", "export", "instrument", "calibrate", "set", "infer"], (cmd, line, survexblock)
+ if not cmd in [ "sd", "include", "units", "entrance", "data", "flags", "title", "export", "instrument", "calibrate", "set", "infer", "alias" ]:
+ print ("Unrecognised command in line:", cmd, line, survexblock)