diff options
Diffstat (limited to 'ds9/parsers/voparser.tac')
-rw-r--r-- | ds9/parsers/voparser.tac | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/ds9/parsers/voparser.tac b/ds9/parsers/voparser.tac new file mode 100644 index 0000000..85ce25d --- /dev/null +++ b/ds9/parsers/voparser.tac @@ -0,0 +1,53 @@ +%{ +%} + +#include yesno.tin +#include numeric.tin +#include string.tin + +%start command + +%token CLOSE_ +%token CONNECT_ +%token DELAY_ +%token DISCONNECT_ +%token INTERNAL_ +%token METHOD_ +%token MIME_ +%token OPEN_ +%token SERVER_ +%token XPA_ + +%% + +#include yesno.trl +#include numeric.trl + +command : vo + | vo {yyclearin; YYACCEPT} STRING_ + ; + +vo : OPEN_ {VODialog} + | CLOSE_ {VODestroy voi} + | METHOD_ method {VOCmdSet method $2} + | SERVER_ STRING_ {VOCmdSet server $2} + | INTERNAL_ yesno {VOCmdSet hv $2} + | DELAY_ INT_ {VOCmdSet delay $2} + | CONNECT_ STRING_ {VOCmdConnect $2} + | DISCONNECT_ STRING_ {VOCmdDisconnect $2} + | STRING_ {VOCmdConnect $1} + ; + +method : XPA_ {set _ xpa} + | MIME_ {set _ mime} + ; + +%% + +proc vo::yyerror {msg} { + variable yycnt + variable yy_current_buffer + variable index_ + + ParserError $msg $yycnt $yy_current_buffer $index_ +} |