diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2018-06-18 20:56:28 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2018-06-18 20:56:28 (GMT) |
commit | ea1b537c632e38d9daa857f33ba85f184f66a61a (patch) | |
tree | 83854d31b9a686f5f3675b3cc1620413786eb314 /ds9/parsers | |
parent | ee0c9f405c9ccbf762b2a9ebce4879683e00b801 (diff) | |
download | blt-ea1b537c632e38d9daa857f33ba85f184f66a61a.zip blt-ea1b537c632e38d9daa857f33ba85f184f66a61a.tar.gz blt-ea1b537c632e38d9daa857f33ba85f184f66a61a.tar.bz2 |
add ds9 magnifier send parser
Diffstat (limited to 'ds9/parsers')
-rw-r--r-- | ds9/parsers/magnifiersendlex.fcl | 17 | ||||
-rw-r--r-- | ds9/parsers/magnifiersendparser.tac | 29 |
2 files changed, 46 insertions, 0 deletions
diff --git a/ds9/parsers/magnifiersendlex.fcl b/ds9/parsers/magnifiersendlex.fcl new file mode 100644 index 0000000..18b9379 --- /dev/null +++ b/ds9/parsers/magnifiersendlex.fcl @@ -0,0 +1,17 @@ +#tab magnifiersendparser.tab.tcl + +%{ +%} + +#include defs.fin + +%% + +color {return $COLOR_} +cursor {return $CURSOR_} +region {return $REGION_} +zoom {return $ZOOM_} + +#include ws.fin + +%% diff --git a/ds9/parsers/magnifiersendparser.tac b/ds9/parsers/magnifiersendparser.tac new file mode 100644 index 0000000..31124a5 --- /dev/null +++ b/ds9/parsers/magnifiersendparser.tac @@ -0,0 +1,29 @@ +%{ +%} + +%start magnifiersend + +%token COLOR_ +%token CURSOR_ +%token REGION_ +%token ZOOM_ + +%% + +magnifiersend : COLOR_ {ProcessSendCmdGet pmagnifier color} + | ZOOM_ {ProcessSendCmdGet pmagnifier zoom} + | CURSOR_ {ProcessSendCmdGet pmagnifier cursor} + | REGION_ {ProcessSendCmdGet pmagnifier region} +# backward compatibility + | {ProcessSendCmdYesNo view magnifier} + ; + +%% + +proc magnifiersend::yyerror {msg} { + variable yycnt + variable yy_current_buffer + variable index_ + + ParserError $msg $yycnt $yy_current_buffer $index_ +} |