summaryrefslogtreecommitdiffstats
path: root/ds9/parsers/sourceparser.tac
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2018-05-08 20:49:47 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2018-05-08 20:49:47 (GMT)
commit3df839da664ea2addc7ccc6d7868dc55b0ee279b (patch)
tree74ca46807bbf44eb0214c3c71c5f10d7e49e6666 /ds9/parsers/sourceparser.tac
parent00025e4e4f0b0469fc6c3bd5ffb4ef3e457fd30f (diff)
downloadblt-3df839da664ea2addc7ccc6d7868dc55b0ee279b.zip
blt-3df839da664ea2addc7ccc6d7868dc55b0ee279b.tar.gz
blt-3df839da664ea2addc7ccc6d7868dc55b0ee279b.tar.bz2
add ds9 source parser
Diffstat (limited to 'ds9/parsers/sourceparser.tac')
-rw-r--r--ds9/parsers/sourceparser.tac25
1 files changed, 25 insertions, 0 deletions
diff --git a/ds9/parsers/sourceparser.tac b/ds9/parsers/sourceparser.tac
new file mode 100644
index 0000000..4ae5b8a
--- /dev/null
+++ b/ds9/parsers/sourceparser.tac
@@ -0,0 +1,25 @@
+%{
+%}
+
+#include string.tin
+
+%start command
+
+%%
+
+command : source
+ | source {yyclearin; YYACCEPT} STRING_
+ ;
+
+source : STRING_ {SourceCmd $1}
+ ;
+
+%%
+
+proc source::yyerror {msg} {
+ variable yycnt
+ variable yy_current_buffer
+ variable index_
+
+ ParserError $msg $yycnt $yy_current_buffer $index_
+}