diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2018-05-10 17:08:04 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2018-05-10 17:08:04 (GMT) |
commit | af4920d1c5c55b2be51b8f76f6f1ef168003f8d2 (patch) | |
tree | 2fc651d34dec94939265c5e25f2725d1d87ebfaf | |
parent | 583f23d32829ac3d0c605747f3c08b686ed49c66 (diff) | |
download | blt-af4920d1c5c55b2be51b8f76f6f1ef168003f8d2.zip blt-af4920d1c5c55b2be51b8f76f6f1ef168003f8d2.tar.gz blt-af4920d1c5c55b2be51b8f76f6f1ef168003f8d2.tar.bz2 |
add ds9 rgbarray / rgbimage parsers
-rw-r--r-- | ds9/parsers/rgbarraylex.fcl | 14 | ||||
-rw-r--r-- | ds9/parsers/rgbarrayparser.tac | 32 | ||||
-rw-r--r-- | ds9/parsers/rgbimagelex.fcl | 14 | ||||
-rw-r--r-- | ds9/parsers/rgbimageparser.tac | 32 |
4 files changed, 92 insertions, 0 deletions
diff --git a/ds9/parsers/rgbarraylex.fcl b/ds9/parsers/rgbarraylex.fcl new file mode 100644 index 0000000..bf43fb5 --- /dev/null +++ b/ds9/parsers/rgbarraylex.fcl @@ -0,0 +1,14 @@ +#tab rgbcubeparser.tab.tcl + +%{ +%} + +#include defs.fin + +%% + +new {return $NEW_} + +#include string.fin + +%% diff --git a/ds9/parsers/rgbarrayparser.tac b/ds9/parsers/rgbarrayparser.tac new file mode 100644 index 0000000..61142c5 --- /dev/null +++ b/ds9/parsers/rgbarrayparser.tac @@ -0,0 +1,32 @@ +%{ +%} + +#include string.tin + +%start command + +%token NEW_ + +%% + +command : rgbcube + | rgbcube {yyclearin; YYACCEPT} STRING_ + ; + +rgbcube : opts {RGBCubeCmdLoad {}} + | opts STRING_ {RGBCubeCmdLoad $2} + ; + +opts : + | NEW_ {CreateRGBFrame} + ; + +%% + +proc rgbcube::yyerror {msg} { + variable yycnt + variable yy_current_buffer + variable index_ + + ParserError $msg $yycnt $yy_current_buffer $index_ +} diff --git a/ds9/parsers/rgbimagelex.fcl b/ds9/parsers/rgbimagelex.fcl new file mode 100644 index 0000000..bf43fb5 --- /dev/null +++ b/ds9/parsers/rgbimagelex.fcl @@ -0,0 +1,14 @@ +#tab rgbcubeparser.tab.tcl + +%{ +%} + +#include defs.fin + +%% + +new {return $NEW_} + +#include string.fin + +%% diff --git a/ds9/parsers/rgbimageparser.tac b/ds9/parsers/rgbimageparser.tac new file mode 100644 index 0000000..61142c5 --- /dev/null +++ b/ds9/parsers/rgbimageparser.tac @@ -0,0 +1,32 @@ +%{ +%} + +#include string.tin + +%start command + +%token NEW_ + +%% + +command : rgbcube + | rgbcube {yyclearin; YYACCEPT} STRING_ + ; + +rgbcube : opts {RGBCubeCmdLoad {}} + | opts STRING_ {RGBCubeCmdLoad $2} + ; + +opts : + | NEW_ {CreateRGBFrame} + ; + +%% + +proc rgbcube::yyerror {msg} { + variable yycnt + variable yy_current_buffer + variable index_ + + ParserError $msg $yycnt $yy_current_buffer $index_ +} |