diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2018-06-11 18:17:00 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2018-06-11 18:17:00 (GMT) |
commit | e69460ddd490adbfa8a46b479aa11d0da659c45a (patch) | |
tree | b4285fadb9b366d0eaa9d22c82a5de09590a79d3 /ds9/parsers | |
parent | 250fde57e595603745b08f988a6f495b476066a2 (diff) | |
download | blt-e69460ddd490adbfa8a46b479aa11d0da659c45a.zip blt-e69460ddd490adbfa8a46b479aa11d0da659c45a.tar.gz blt-e69460ddd490adbfa8a46b479aa11d0da659c45a.tar.bz2 |
add ds9 print send parser
Diffstat (limited to 'ds9/parsers')
-rw-r--r-- | ds9/parsers/pssendlex.fcl | 20 | ||||
-rw-r--r-- | ds9/parsers/pssendparser.tac | 34 |
2 files changed, 54 insertions, 0 deletions
diff --git a/ds9/parsers/pssendlex.fcl b/ds9/parsers/pssendlex.fcl new file mode 100644 index 0000000..4b68654 --- /dev/null +++ b/ds9/parsers/pssendlex.fcl @@ -0,0 +1,20 @@ +#tab pssendparser.tab.tcl + +%{ +%} + +#include defs.fin + +%% + +color {return $COLOR_} +command {return $COMMAND_} +destination {return $DESTINATION_} +filename {return $FILENAME_} +interpolate {return $INTERPOLATE_} +level {return $LEVEL_} +resolution {return $RESOLUTION_} + +#include ws.fin + +%% diff --git a/ds9/parsers/pssendparser.tac b/ds9/parsers/pssendparser.tac new file mode 100644 index 0000000..7a84beb --- /dev/null +++ b/ds9/parsers/pssendparser.tac @@ -0,0 +1,34 @@ +%{ +%} + +%start pssend + +%token COLOR_ +%token COMMAND_ +%token DESTINATION_ +%token FILENAME_ +%token INTERPOLATE_ +%token LEVEL_ +%token RESOLUTION_ + +%% + +pssend : DESTINATION_ {ProcessSendCmdGet ps dest} + | COMMAND_ {ProcessSendCmdGet ps cmd} + | FILENAME_ {ProcessSendCmdGet ps filename} + | COLOR_ {ProcessSendCmdGet ps color} + | LEVEL_ {ProcessSendCmdGet ps level} + | RESOLUTION_ {ProcessSendCmdGet ps resolution} +#backward compatibility + | INTERPOLATE_ {global ps; $parse(proc) $parse(id) "0\n"} + ; + +%% + +proc pssend::yyerror {msg} { + variable yycnt + variable yy_current_buffer + variable index_ + + ParserError $msg $yycnt $yy_current_buffer $index_ +} |