Natural Tiny Shell (NT-Shell) library is a tiny shell library for a small embedded system. The interface is really simple. You should only know ntshell_execute in ntshell.h. So you can port it to any embedded system easily. Please enjoy your small embedded system with it. :)
Dependents: NaturalTinyShell_TestProgram
Revision 0:7147d6024de8, committed 2011-05-22
- Comitter:
- shintamainjp
- Date:
- Sun May 22 02:51:35 2011 +0000
- Commit message:
- Initial version.
Changed in this revision
diff -r 000000000000 -r 7147d6024de8 ntlibc.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ntlibc.c Sun May 22 02:51:35 2011 +0000 @@ -0,0 +1,137 @@ +/** + * @file ntlibc.c + * @author Shinichiro Nakamura + * @brief NT-Shellで用いる小規模libcの実装。 + */ + +/* + * =============================================================== + * Natural Tiny Shell (NT-Shell) + * Version 0.0.6 + * =============================================================== + * Copyright (c) 2010-2011 Shinichiro Nakamura + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * =============================================================== + */ + +#include "ntlibc.h" + +size_t ntlibc_strlen(const char *s) +{ + const char *p = s; + int cnt = 0; + while (*p) { + cnt++; + p++; + } + return cnt; +} + +char *ntlibc_strcpy(char *des, const char *src) +{ + char *d = des; + const char *s = src; + while (*s) { + *d = *s; + d++; + s++; + } + *d = '\0'; + return des; +} + +char *ntlibc_strcat(char *des, const char *src) +{ + char *d = des; + const char *s = src; + while (*d) { + d++; + } + while (*s) { + *d = *s; + d++; + s++; + } + *d = '\0'; + return des; +} + +int ntlibc_strcmp(const char *s1, const char *s2) +{ + char *p1 = (char *)s1; + char *p2 = (char *)s2; + while (*p1 || *p2) { + if (*p1 != *p2) { + return (*p1 < *p2) ? -1 : 1; + } + p1++; + p2++; + } + if (*p1 == *p2) { + return 0; + } else { + return (*p1 < *p2) ? -1 : 1; + } +} + +int ntlibc_strncmp(const char *s1, const char *s2, size_t n) +{ + char *p1 = (char *)s1; + char *p2 = (char *)s2; + size_t len = 0; + while (*p1 || *p2) { + if (n <= len) { + break; + } + if (*p1 != *p2) { + return (*p1 < *p2) ? -1 : 1; + } + p1++; + p2++; + len++; + } + return 0; +} + +#if 0 +#include <stdio.h> +int main(void); +int main(void) { + char *str_a = "That"; + char *str_b = "The"; + printf("strcmp(%s,%s) = %d, %d\n", + str_a, str_b, + strcmp(str_a, str_b), + ntlibc_strcmp(str_a, str_b)); + printf("strncmp(%s,%s,2) = %d, %d\n", + str_a, str_b, + strncmp(str_a, str_b, 2), + ntlibc_strncmp(str_a, str_b, 2)); + printf("strncmp(%s,%s,3) = %d, %d\n", + str_a, str_b, + strncmp(str_a, str_b, 3), + ntlibc_strncmp(str_a, str_b, 3)); + return 0; +} +#endif +
diff -r 000000000000 -r 7147d6024de8 ntlibc.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ntlibc.h Sun May 22 02:51:35 2011 +0000 @@ -0,0 +1,51 @@ +/** + * @file ntlibc.h + * @author Shinichiro Nakamura + * @brief NT-Shellで用いる小規模libcの定義。 + */ + +/* + * =============================================================== + * Natural Tiny Shell (NT-Shell) + * Version 0.0.6 + * =============================================================== + * Copyright (c) 2010-2011 Shinichiro Nakamura + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * =============================================================== + */ + +#ifndef NTLIBC_H +#define NTLIBC_H + +#ifndef size_t +typedef unsigned int size_t; +#endif + +size_t ntlibc_strlen(const char *s); +char *ntlibc_strcpy(char *des, const char *src); +char *ntlibc_strcat(char *des, const char *src); +int ntlibc_strcmp(const char *s1, const char *s2); +int ntlibc_strncmp(const char *s1, const char *s2, size_t n); + +#endif +
diff -r 000000000000 -r 7147d6024de8 ntopt.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ntopt.c Sun May 22 02:51:35 2011 +0000 @@ -0,0 +1,155 @@ +/** + * @file ntopt.c + * @author Shinichiro Nakamura + * @brief NT-Shell用オプション解析モジュールの実装。 + */ + +/* + * =============================================================== + * Natural Tiny Shell (NT-Shell) + * Version 0.0.6 + * =============================================================== + * Copyright (c) 2010-2011 Shinichiro Nakamura + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * =============================================================== + */ + +#include "ntopt.h" + +#define IS_DELIM(c) \ + (((c) == '\r') || ((c) == '\n') || ((c) == '\t') || ((c) == '\0') || ((c) == ' ')) + +static int ntopt_get_count(const char *str); +static char *ntopt_get_text(const char *str, const int n, char *buf, int siz); + +int ntopt_get_count(const char *str) +{ + int cnt = 0; + int wc = 0; + char *p = (char *)str; + while (*p) { + if (!IS_DELIM(*p)) { + wc++; + if (wc == 1) { + cnt++; + } + } else { + wc = 0; + } + p++; + } + return cnt; +} + +char *ntopt_get_text(const char *str, const int n, char *buf, int siz) +{ + int cnt = 0; + int wc = 0; + char *p = (char *)str; + while (*p) { + if (!IS_DELIM(*p)) { + wc++; + if ((wc == 1)) { + if (cnt == n) { + char *des = buf; + int cc = 0; + while (!IS_DELIM(*p)) { + cc++; + if (siz <= cc) { + break; + } + *des = *p; + des++; + p++; + } + *des = '\0'; + return buf; + } + cnt++; + } + } else { + wc = 0; + } + p++; + } + return '\0'; +} + +int ntopt_parse(const char *str, void (*func)(int argc, char **argv)) +{ + int argc; + char argv[NTOPT_MAXCNT_ARGC][NTOPT_MAXLEN_ARGV]; + char *argvp[NTOPT_MAXCNT_ARGC]; + int i; + + argc = ntopt_get_count(str); + if (NTOPT_MAXCNT_ARGC <= argc) { + return -1; + } + + for (i = 0; i < argc; i++) { + argvp[i] = ntopt_get_text(str, i, argv[i], sizeof(argv[i])); + } + func(argc, &argvp[0]); + + return argc; +} + +#if 0 +#include <stdio.h> +void callback(int argc, char **argv) +{ + int i; + for (i = 0; i < argc; i++) { + printf("%d: %s\n", i, argv[i]); + } +} + +int main(int argc, char **argv) +{ + char *str1 = " This is a test.\n "; + char *str2 = "This is a test.\t \r \n \t It's good for you. \n \n The important thing is LIFE-IS-SO-MUCH-BEAUTIFUL."; + int i; + int n1, n2; + + n1 = ntopt_get_count(str1); + for (i = 0; i < n1; i++) { + char buf[64]; + printf("%d: %s\n", i, ntopt_get_text(str1, i, buf, sizeof(buf))); + } + printf("\n"); + + n2 = ntopt_get_count(str2); + for (i = 0; i < n2; i++) { + char buf[64]; + printf("%d: %s\n", i, ntopt_get_text(str2, i, buf, sizeof(buf))); + } + printf("\n"); + + ntopt_parse(str1, callback); + ntopt_parse(str2, callback); + + return 0; +} +#endif +
diff -r 000000000000 -r 7147d6024de8 ntopt.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ntopt.h Sun May 22 02:51:35 2011 +0000 @@ -0,0 +1,46 @@ +/** + * @file ntopt.h + * @author Shinichiro Nakamura + * @brief NT-Shell用オプション解析モジュールの定義。 + */ + +/* + * =============================================================== + * Natural Tiny Shell (NT-Shell) + * Version 0.0.6 + * =============================================================== + * Copyright (c) 2010-2011 Shinichiro Nakamura + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * =============================================================== + */ + +#ifndef _NTOPT_H_ +#define _NTOPT_H_ + +#define NTOPT_MAXCNT_ARGC 32 +#define NTOPT_MAXLEN_ARGV 32 + +int ntopt_parse(const char *str, void (*func)(int argc, char **argv)); + +#endif +
diff -r 000000000000 -r 7147d6024de8 ntshell.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ntshell.c Sun May 22 02:51:35 2011 +0000 @@ -0,0 +1,551 @@ +/** + * @file ntshell.c + * @author Shinichiro Nakamura + * @brief 小規模組み込みシステム向けのシェルシステムの実装。 + */ + +/* + * =============================================================== + * Natural Tiny Shell (NT-Shell) + * Version 0.0.6 + * =============================================================== + * Copyright (c) 2010-2011 Shinichiro Nakamura + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * =============================================================== + */ + +#include "ntshell.h" +#include "ntlibc.h" + +#define VERSION_MAJOR 0 /**< メジャー番号。 */ +#define VERSION_MINOR 0 /**< マイナー番号。 */ +#define VERSION_RELEASE 6 /**< リリース番号。 */ + +/** + * @brief 処理で用いるデータ構造体。 + * + * @details + * vtparseはユーザデータのポインタを設定することができる。 + * Natural Tiny Shellはこれを使って自身の処理で必要な情報を保持する。 + */ +typedef struct { + text_editor_t *editor; + text_history_t *history; + int suggest_index; + char suggest_source[TEXTEDITOR_MAXLEN]; + int (*func_read)(char *buf, int cnt); + int (*func_write)(const char *buf, int cnt); + int (*func_cb)(const char *text); +} ntshell_user_data_t; + +#define SUGGEST_INDEX(vtp) \ + ((ntshell_user_data_t *)(vtp)->user_data)->suggest_index +#define SUGGEST_SOURCE(vtp) \ + ((ntshell_user_data_t *)(vtp)->user_data)->suggest_source + +/** + * @brief テキストエディタを取得する。 + * + * @param vtp vtparse構造体。 + */ +#define GET_EDITOR(vtp) \ + ((ntshell_user_data_t *)(vtp)->user_data)->editor + +/** + * @brief テキストヒストリを取得する。 + * + * @param vtp vtparse構造体。 + */ +#define GET_HISTORY(vtp) \ + ((ntshell_user_data_t *)(vtp)->user_data)->history + +/** + * @brief シリアルポートから読み込む。 + * + * @param vtp vtparse構造体。 + * @param buf 読み込みバッファ。 + * @param cnt 読み込み文字数。 + */ +#define SERIAL_READ(vtp,buf,cnt) \ + ((ntshell_user_data_t *)(vtp)->user_data)->func_read(buf, cnt) + +/** + * @brief シリアルポートへ書き込む。 + * + * @param vtp vtparse構造体。 + * @param buf 書き込みバッファ。 + * @param cnt 書き込み文字数。 + */ +#define SERIAL_WRITE(vtp,buf,cnt) \ + ((ntshell_user_data_t *)(vtp)->user_data)->func_write(buf, cnt) + +/** + * @brief コールバックを呼び出す。 + * + * @param vtp vtparse構造体。 + * @param text コールバック関数へ渡す文字列。 + */ +#define CALLBACK(vtp, text) \ + ((ntshell_user_data_t *)(vtp)->user_data)->func_cb(text) + +/** + * @brief テキストヒストリで1つ後ろを辿る。 + * + * @param parser パーサー。 + * @param action アクション。 + * @param ch 入力文字。 + */ +static void actfunc_history_prev( + vtparse_t *parser, + vtparse_action_t action, + unsigned char ch) { + if (text_history_read_point_prev(GET_HISTORY(parser))) { + char txt[TEXTHISTORY_MAXLEN]; + int n = text_history_read(GET_HISTORY(parser), &txt[0], sizeof(txt)); + if (0 < n) { + SERIAL_WRITE(parser, "\x1b[2K", 4); + SERIAL_WRITE(parser, "\x1b[80D", 5); + SERIAL_WRITE(parser, ">", 1); + SERIAL_WRITE(parser, txt, n); + text_editor_set_text(GET_EDITOR(parser), txt); + } + } +} + +/** + * @brief テキストヒストリで1つ前を辿る。 + * + * @param parser パーサー。 + * @param action アクション。 + * @param ch 入力文字。 + */ +static void actfunc_history_next( + vtparse_t *parser, + vtparse_action_t action, + unsigned char ch) { + if (text_history_read_point_next(GET_HISTORY(parser))) { + char txt[TEXTHISTORY_MAXLEN]; + int n = text_history_read(GET_HISTORY(parser), &txt[0], sizeof(txt)); + if (0 < n) { + SERIAL_WRITE(parser, "\x1b[2K", 4); + SERIAL_WRITE(parser, "\x1b[80D", 5); + SERIAL_WRITE(parser, ">", 1); + SERIAL_WRITE(parser, txt, n); + text_editor_set_text(GET_EDITOR(parser), txt); + } + } +} + +/** + * @brief カーソルを左へ移動させる。 + * + * @param parser パーサー。 + * @param action アクション。 + * @param ch 入力文字。 + */ +static void actfunc_cursor_left( + vtparse_t *parser, + vtparse_action_t action, + unsigned char ch) { + if (text_editor_cursor_left(GET_EDITOR(parser))) { + SERIAL_WRITE(parser, "\x1b[1D", 4); + } +} + +/** + * @brief カーソルを右へ移動させる。 + * + * @param parser パーサー。 + * @param action アクション。 + * @param ch 入力文字。 + */ +static void actfunc_cursor_right( + vtparse_t *parser, + vtparse_action_t action, + unsigned char ch) { + if (text_editor_cursor_right(GET_EDITOR(parser))) { + SERIAL_WRITE(parser, "\x1b[1C", 4); + } +} + +/** + * @brief エンターキーの処理を実行する。 + * + * @param parser パーサー。 + * @param action アクション。 + * @param ch 入力文字。 + */ +static void actfunc_enter( + vtparse_t *parser, + vtparse_action_t action, + unsigned char ch) { + char txt[TEXTEDITOR_MAXLEN]; + text_editor_get_text(GET_EDITOR(parser), &txt[0], sizeof(txt)); + text_editor_clear(GET_EDITOR(parser)); + text_history_write(GET_HISTORY(parser), txt); + SERIAL_WRITE(parser, "\r\n", 2); + CALLBACK(parser, txt); + SERIAL_WRITE(parser, ">", 1); +} + +/** + * @brief キャンセルキーの処理を実行する。 + * @details + * 一般的なOSのCTRL+C処理はシグナルを発行し、受信したプロセスが + * 中断処理を実行する。 + * ここでのキャンセルは見た目を再現したもので、 + * 入力中の文字列を破棄してカーソルを新しい入力に備えて復帰させるものだ。 + * + * @param parser パーサー。 + * @param action アクション。 + * @param ch 入力文字。 + */ +static void actfunc_cancel( + vtparse_t *parser, + vtparse_action_t action, + unsigned char ch) { + SERIAL_WRITE(parser, "^C\r\n", 4); + text_editor_clear(GET_EDITOR(parser)); + SERIAL_WRITE(parser, ">", 1); +} + +/** + * @brief 挿入処理を実行する。 + * + * @param parser パーサー。 + * @param action アクション。 + * @param ch 入力文字。 + */ +static void actfunc_insert( + vtparse_t *parser, + vtparse_action_t action, + unsigned char ch) { + + /* + * 入力があった場合、入力補完状態から抜ける。 + */ + SUGGEST_INDEX(parser) = -1; + + /* + * テキストエディタを使って文字を文字列に挿入する。 + */ + if (text_editor_insert(GET_EDITOR(parser), ch)) { + char txt[TEXTEDITOR_MAXLEN]; + int len = text_editor_get_text(GET_EDITOR(parser), &txt[0], sizeof(txt)); + int pos = text_editor_cursor_get_position(GET_EDITOR(parser)); + SERIAL_WRITE(parser, (char *)&ch, sizeof(ch)); + int n = len - pos; + if (n > 0) { + int i; + SERIAL_WRITE(parser, txt + pos, len - pos); + for (i = 0; i < n; i++) { + SERIAL_WRITE(parser, "\x1b[1D", 4); + } + } + } +} + +/** + * @brief バックスペース処理を実行する。 + * + * @param parser パーサー。 + * @param action アクション。 + * @param ch 入力文字。 + */ +static void actfunc_backspace( + vtparse_t *parser, + vtparse_action_t action, + unsigned char ch) { + if (text_editor_backspace(GET_EDITOR(parser))) { + char txt[TEXTEDITOR_MAXLEN]; + SERIAL_WRITE(parser, "\x1b[1D", 4); + int len = text_editor_get_text(GET_EDITOR(parser), &txt[0], sizeof(txt)); + int pos = text_editor_cursor_get_position(GET_EDITOR(parser)); + int n = len - pos; + if (n > 0) { + int i; + SERIAL_WRITE(parser, txt + pos, len - pos); + SERIAL_WRITE(parser, " ", 1); + for (i = 0; i < n + 1; i++) { + SERIAL_WRITE(parser, "\x1b[1D", 4); + } + } else { + SERIAL_WRITE(parser, " ", 1); + SERIAL_WRITE(parser, "\x1b[1D", 4); + } + } +} + +/** + * @brief 入力補完処理を実行する。 + * + * @param parser パーサー。 + * @param action アクション。 + * @param ch 入力文字。 + */ +static void actfunc_suggest( + vtparse_t *parser, + vtparse_action_t action, + unsigned char ch) { + char buf[TEXTEDITOR_MAXLEN]; + if (SUGGEST_INDEX(parser) < 0) { + /* + * 入力補完モードにこれから入る場合。 + * 現在の入力文字列を元に補完候補を取得する。 + */ + if (text_editor_get_text( + GET_EDITOR(parser), + SUGGEST_SOURCE(parser), + sizeof(SUGGEST_SOURCE(parser))) > 0) { + SUGGEST_INDEX(parser) = 0; + if (text_history_find( + GET_HISTORY(parser), + SUGGEST_INDEX(parser), + SUGGEST_SOURCE(parser), + buf, + sizeof(buf)) == 0) { + // 候補が見つかればテキストを設定して、インデックスをメモする。 + int n = ntlibc_strlen((const char *)buf); + SERIAL_WRITE(parser, "\x1b[2K", 4); + SERIAL_WRITE(parser, "\x1b[80D", 5); + SERIAL_WRITE(parser, ">", 1); + SERIAL_WRITE(parser, buf, n); + text_editor_set_text(GET_EDITOR(parser), buf); + } else { + // 候補がなければ入力補完モードから抜ける。 + SUGGEST_INDEX(parser) = -1; + } + } + } else { + /* + * 既に入力補完モードに入っている場合、 + * 次の候補を探して見つかればテキストとして設定する。 + */ + SUGGEST_INDEX(parser) = SUGGEST_INDEX(parser) + 1; + if (text_history_find( + GET_HISTORY(parser), + SUGGEST_INDEX(parser), + SUGGEST_SOURCE(parser), + buf, + sizeof(buf)) == 0) { + // 候補が見つかればテキストを設定する。 + int n = ntlibc_strlen((const char *)buf); + SERIAL_WRITE(parser, "\x1b[2K", 4); + SERIAL_WRITE(parser, "\x1b[80D", 5); + SERIAL_WRITE(parser, ">", 1); + SERIAL_WRITE(parser, buf, n); + text_editor_set_text(GET_EDITOR(parser), buf); + } else { + // 候補が見つからなければ元の入力文字列に戻し、入力補完モードから抜ける。 + int n = ntlibc_strlen(SUGGEST_SOURCE(parser)); + SERIAL_WRITE(parser, "\x1b[2K", 4); + SERIAL_WRITE(parser, "\x1b[80D", 5); + SERIAL_WRITE(parser, ">", 1); + SERIAL_WRITE(parser, SUGGEST_SOURCE(parser), n); + text_editor_set_text(GET_EDITOR(parser), SUGGEST_SOURCE(parser)); + SUGGEST_INDEX(parser) = -1; + } + } +} + +static void actfunc_cursor_head( + vtparse_t *parser, + vtparse_action_t action, + unsigned char ch) { + SERIAL_WRITE(parser, "\x1b[80D", 5); + SERIAL_WRITE(parser, ">", 1); + text_editor_cursor_head(GET_EDITOR(parser)); +} + +static void actfunc_cursor_tail( + vtparse_t *parser, + vtparse_action_t action, + unsigned char ch) { + char buf[TEXTEDITOR_MAXLEN]; + int len; + text_editor_get_text(GET_EDITOR(parser), buf, sizeof(buf)); + len = ntlibc_strlen((const char *)buf); + SERIAL_WRITE(parser, "\x1b[80D", 5); + SERIAL_WRITE(parser, ">", 1); + SERIAL_WRITE(parser, buf, len); + text_editor_cursor_tail(GET_EDITOR(parser)); +} + +/** + * @brief アクションテーブルのデータ構造体。 + * @details + * アクションは状態と入力文字によって与えられる。 + * アクションに対する関数もここで定義する。 + */ +typedef struct { + vtparse_action_t action; + unsigned char ch; + void (*func)( + vtparse_t *parser, + vtparse_action_t action, + unsigned char ch); +} ntshell_action_table_t; + +/** + * @brief アクションに対する処理関数テーブル。 + * @details + * やってくるコードは仮想端末側の処理に依存する。 + * よって様々なプラットフォームの様々な仮想端末で試すと良い。 + * + * <table> + * <th> + * <td>Platform</td> + * <td>Tools</td> + * </th> + * <tr> + * <td>Windows</td> + * <td>Hyper Terminal, Poderossa, TeraTerm</td> + * </tr> + * <tr> + * <td>Linux</td> + * <td>minicom, screen, kermit</td> + * </tr> + * </table> + */ +static const ntshell_action_table_t action_table[] = { + {VTPARSE_ACTION_EXECUTE, 0x01, actfunc_cursor_head}, + {VTPARSE_ACTION_EXECUTE, 0x02, actfunc_cursor_left}, + {VTPARSE_ACTION_EXECUTE, 0x03, actfunc_cancel}, + {VTPARSE_ACTION_EXECUTE, 0x05, actfunc_cursor_tail}, + {VTPARSE_ACTION_EXECUTE, 0x06, actfunc_cursor_right}, + {VTPARSE_ACTION_EXECUTE, 0x08, actfunc_backspace}, + {VTPARSE_ACTION_EXECUTE, 0x09, actfunc_suggest}, + {VTPARSE_ACTION_EXECUTE, 0x0d, actfunc_enter}, + {VTPARSE_ACTION_EXECUTE, 0x0e, actfunc_history_next}, + {VTPARSE_ACTION_EXECUTE, 0x10, actfunc_history_prev}, + {VTPARSE_ACTION_CSI_DISPATCH, 0x41, actfunc_history_prev}, + {VTPARSE_ACTION_CSI_DISPATCH, 0x42, actfunc_history_next}, + {VTPARSE_ACTION_CSI_DISPATCH, 0x43, actfunc_cursor_right}, + {VTPARSE_ACTION_CSI_DISPATCH, 0x44, actfunc_cursor_left}, + {VTPARSE_ACTION_PRINT, 0x7f, actfunc_backspace}, +}; + +/** + * @brief パーサーに対するコールバック関数。 + * @details vtparseモジュールのコールバック関数に従った実装である。 + * + * @param parser パーサー。 + * @param action アクション。 + * @param ch キャラクタ。 + */ +void parser_callback( + vtparse_t *parser, + vtparse_action_t action, + unsigned char ch) { + ntshell_action_table_t *p; + int i; + const int ACTTBLSIZ = sizeof(action_table) / sizeof(action_table[0]); + + /* + * 制御コードに対する処理はテーブルから探す。 + */ + p = (ntshell_action_table_t *)action_table; + for (i = 0; i < ACTTBLSIZ; i++) { + if ((p->action == action) && (p->ch == ch)) { + p->func(parser, action, ch); + return; + } + p++; + } + + /* + * 通常の文字列は入力として扱う。 + */ + if (VTPARSE_ACTION_PRINT == action) { + actfunc_insert(parser, action, ch); + } +} + +/** + * @brief Natural Tiny Shellのバージョンを返す。 + * @details 返すバージョンはリリースバージョンである。 + * + * @param major メージャーバージョン。 + * @param minor マイナーバージョン。 + * @param release リリースバージョン。 + */ +void ntshell_version(int *major, int *minor, int *release) +{ + *major = VERSION_MAJOR; + *minor = VERSION_MINOR; + *release = VERSION_RELEASE; +} + +/** + * @brief Natural Tiny Shellを実行する。 + * @details この関数は実行を返さない。 + * + * @param parser VT100パーサー。 + * @param editor テキストエディタ。 + * @param history テキストヒストリ。 + * @param func_read シリアルリード関数。 + * @param func_write シリアルライト関数。 + * @param func_cb コールバック関数。 + */ +void ntshell_execute( + ntshell_t *p, + int (*func_read)(char *buf, int cnt), + int (*func_write)(const char *buf, int cnt), + int (*func_cb)(const char *text)) +{ + /* + * vtparseはユーザデータへのポインタを設定できるようになっている。 + * Natural Tiny Shellはこれを利用してテキストエディタやヒストリ、 + * リード関数やライト関数、コールバック関数を処理の中で使用できる + * ようにしてある。 + */ + ntshell_user_data_t user_data; + + user_data.editor = &(p->editor); + user_data.history = &(p->history); + user_data.func_read = func_read; + user_data.func_write = func_write; + user_data.func_cb = func_cb; + + p->parser.user_data = &user_data; + + /* + * 各モジュールを初期化する。 + */ + vtparse_init(&(p->parser), parser_callback); + text_editor_init(GET_EDITOR(&(p->parser))); + text_history_init(GET_HISTORY(&(p->parser))); + SUGGEST_INDEX(&(p->parser)) = -1; + + /* + * ユーザ入力ループ。 + */ + SERIAL_WRITE(&(p->parser), ">", 1); + while(1) + { + unsigned char ch; + SERIAL_READ(&(p->parser), (char *)&ch, sizeof(ch)); + vtparse(&(p->parser), &ch, sizeof(ch)); + } +} +
diff -r 000000000000 -r 7147d6024de8 ntshell.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ntshell.h Sun May 22 02:51:35 2011 +0000 @@ -0,0 +1,58 @@ +/** + * @file ntshell.h + * @author Shinichiro Nakamura + * @brief 小規模組み込みシステム向けのシェルシステムの定義。 + */ + +/* + * =============================================================== + * Natural Tiny Shell (NT-Shell) + * Version 0.0.6 + * =============================================================== + * Copyright (c) 2010-2011 Shinichiro Nakamura + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * =============================================================== + */ + +#ifndef _NTSHELL_H_ +#define _NTSHELL_H_ + +#include "vtparse.h" +#include "text_editor.h" +#include "text_history.h" + +typedef struct { + vtparse_t parser; + text_editor_t editor; + text_history_t history; +} ntshell_t; + +void ntshell_version(int *major, int *minor, int *release); +void ntshell_execute( + ntshell_t *p, + int (*func_read)(char *buf, int cnt), + int (*func_write)(const char *buf, int cnt), + int (*func_cb)(const char *text)); + +#endif +
diff -r 000000000000 -r 7147d6024de8 text_editor.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/text_editor.c Sun May 22 02:51:35 2011 +0000 @@ -0,0 +1,233 @@ +/** + * @file text_editor.c + * @author Shinichiro Nakamura + * @brief NT-Shell用テキストエディタモジュールの実装。 + * @details + * 文字列の編集を論理的に扱うためのモジュール。 + * このモジュールはビューに関して一切感知しない。 + */ + +/* + * =============================================================== + * Natural Tiny Shell (NT-Shell) + * Version 0.0.6 + * =============================================================== + * Copyright (c) 2010-2011 Shinichiro Nakamura + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * =============================================================== + */ + +#include "text_editor.h" + +/** + * @brief テキストエディタを初期化する。 + * + * @param p テキストエディタ構造体。 + */ +void text_editor_init(text_editor_t *p) +{ + p->pos = 0; + p->len = 0; + p->buffer[p->len] = '\0'; +} + +/** + * @brief 文字を挿入する。 + * + * @param p テキストエディタ構造体。 + * @param c 文字。 + */ +int text_editor_insert(text_editor_t *p, char c) +{ + if (p->len < sizeof(p->buffer) - 1) { + int n = p->len - p->pos + 1; + int i; + char *src = p->buffer + p->len + 0; + char *des = p->buffer + p->len + 1; + for (i = 0; i < n; i++) { + *des = *src; + des--; + src--; + } + + p->buffer[p->pos] = c; + p->pos++; + p->len++; + p->buffer[p->len] = '\0'; + return 1; + } + return 0; +} + +/** + * @brief 文字を削除する。 + * + * @param p テキストエディタ構造体。 + */ +int text_editor_backspace(text_editor_t *p) +{ + if (0 < p->pos) { + int n = p->len - p->pos; + int i; + char *src = p->buffer + p->pos - 0; + char *des = p->buffer + p->pos - 1; + p->pos--; + p->len--; + for (i = 0; i < n; i++) { + *des = *src; + des++; + src++; + } + *(p->buffer + p->len) = '\0'; + return 1; + } + return 0; +} + +/** + * @brief カーソル位置を取得する。 + * + * @param p テキストエディタ構造体。 + */ +int text_editor_cursor_get_position(text_editor_t *p) +{ + return p->pos; +} + +/** + * @brief カーソルを先頭に移動させる。 + * + * @param p テキストエディタ構造体。 + */ +int text_editor_cursor_head(text_editor_t *p) +{ + if (0 < p->pos) { + p->pos = 0; + return 1; + } + return 0; +} + +/** + * @brief カーソルを最後尾に移動させる。 + * + * @param p テキストエディタ構造体。 + */ +int text_editor_cursor_tail(text_editor_t *p) +{ + if (p->pos < p->len) { + p->pos = p->len; + return 1; + } + return 0; +} + +/** + * @brief カーソルを左へ移動させる。 + * + * @param p テキストエディタ構造体。 + */ +int text_editor_cursor_left(text_editor_t *p) +{ + if (0 < p->pos) { + p->pos--; + return 1; + } + return 0; +} + +/** + * @brief カーソルを右へ移動させる。 + * + * @param p テキストエディタ構造体。 + */ +int text_editor_cursor_right(text_editor_t *p) +{ + if (p->pos < p->len) { + p->pos++; + return 1; + } + return 0; +} + +/** + * @brief 文字列を設定する。 + * + * @param p テキストエディタ構造体。 + * @param buf 文字列が格納されたバッファ。 + */ +int text_editor_set_text(text_editor_t *p, char *buf) +{ + char *src = buf; + char *des = p->buffer; + int n = 0; + while (*src) { + *des = *src; + des++; + src++; + n++; + if (sizeof(p->buffer) <= n - 1) { + break; + } + } + *des = '\0'; + p->len = n; + p->pos = p->len; + return n; +} + +/** + * @brief 文字列を取得する。 + * + * @param p テキストエディタ構造体。 + * @param buf 文字列を格納するバッファ。 + * @param siz バッファサイズ。 + */ +int text_editor_get_text(text_editor_t *p, char *buf, int siz) +{ + char *src = p->buffer; + char *des = buf; + int n = 0; + while (*src) { + *des++ = *src++; + n++; + if (siz <= n) { + break; + } + } + *des = '\0'; + return n; +} + +/** + * @brief 文字列を消去する。 + * + * @param p テキストエディタ構造体。 + */ +void text_editor_clear(text_editor_t *p) +{ + p->pos = 0; + p->len = 0; + p->buffer[p->len] = '\0'; +} +
diff -r 000000000000 -r 7147d6024de8 text_editor.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/text_editor.h Sun May 22 02:51:35 2011 +0000 @@ -0,0 +1,64 @@ +/** + * @file text_editor.h + * @author Shinichiro Nakamura + * @brief NT-Shell用テキストエディタモジュールの定義。 + * @details + * 文字列の編集を論理的に扱うためのモジュール。 + * このモジュールはビューに関して一切感知しない。 + */ + +/* + * =============================================================== + * Natural Tiny Shell (NT-Shell) + * Version 0.0.6 + * =============================================================== + * Copyright (c) 2010-2011 Shinichiro Nakamura + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * =============================================================== + */ + +#ifndef _TEXT_EDITOR_H_ +#define _TEXT_EDITOR_H_ + +#define TEXTEDITOR_MAXLEN 64 + +typedef struct { + char buffer[TEXTEDITOR_MAXLEN]; + int pos; + int len; +} text_editor_t; + +void text_editor_init(text_editor_t *p); +int text_editor_insert(text_editor_t *p, char c); +int text_editor_backspace(text_editor_t *p); +int text_editor_cursor_get_position(text_editor_t *p); +int text_editor_cursor_head(text_editor_t *p); +int text_editor_cursor_tail(text_editor_t *p); +int text_editor_cursor_left(text_editor_t *p); +int text_editor_cursor_right(text_editor_t *p); +int text_editor_set_text(text_editor_t *p, char *buf); +int text_editor_get_text(text_editor_t *p, char *buf, int siz); +void text_editor_clear(text_editor_t *p); + +#endif +
diff -r 000000000000 -r 7147d6024de8 text_history.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/text_history.c Sun May 22 02:51:35 2011 +0000 @@ -0,0 +1,178 @@ +/** + * @file text_history.c + * @author Shinichiro Nakamura + * @brief NT-Shell用テキストヒストリモジュールの実装。 + * @details + * 文字列の入力履歴を論理的に扱うためのモジュール。 + * このモジュールはビューに関して一切感知しない。 + */ + +/* + * =============================================================== + * Natural Tiny Shell (NT-Shell) + * Version 0.0.6 + * =============================================================== + * Copyright (c) 2010-2011 Shinichiro Nakamura + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * =============================================================== + */ + +#include "text_history.h" +#include "ntlibc.h" + +/** + * @brief 初期化する。 + * + * @param p テキストヒストリ構造体。 + */ +void text_history_init(text_history_t *p) +{ + p->rp = 0; + p->wp = 0; + int i; + for (i = 0; i < sizeof(p->history); i++) { + p->history[i] = 0; + } +} + +/** + * @brief テキストヒストリに対して書き込みを実行する。 + * + * @param p テキストヒストリ構造体。 + * @param buf バッファ。 + */ +int text_history_write(text_history_t *p, char *buf) +{ + if (buf[0] == '\0') { + return 0; + } + char *sp = p->history + (TEXTHISTORY_MAXLEN * p->wp); + while (*buf) { + *sp = *buf; + sp++; + buf++; + } + *sp = '\0'; + p->wp = (p->wp + 1) % TEXTHISTORY_DEPTH; + p->rp = p->wp; + return 1; +} + +/** + * @brief テキストヒストリから読み出しを実行する。 + * @details + * 得られる文字列が与えられたバッファサイズよりも大きい場合、 + * バッファに格納される文字列は途中で途切れるものとする。 + * + * @param p テキストヒストリ構造体。 + * @param buf バッファ。 + * @param siz バッファサイズ。 + */ +int text_history_read(text_history_t *p, char *buf, const int siz) +{ + char *sp = p->history + (TEXTHISTORY_MAXLEN * p->rp); + int n = 0; + while (*sp) { + *buf = *sp; + buf++; + sp++; + n++; + if (siz - 1 <= n) { + break; + } + } + *buf = '\0'; + return n; +} + +/** + * @brief 読み出しポインタを次に進める。 + * + * @param p テキストヒストリ構造体。 + */ +int text_history_read_point_next(text_history_t *p) +{ + int n = (p->rp + 1) % TEXTHISTORY_DEPTH; + if (n != p->wp) { + p->rp = n; + return 1; + } + return 0; +} + +/** + * @brief 読み出しポインタを前に戻す。 + * + * @param p テキストヒストリ構造体。 + */ +int text_history_read_point_prev(text_history_t *p) +{ + int n = (p->rp == 0) ? (TEXTHISTORY_DEPTH - 1) : (p->rp - 1); + if (n != p->wp) { + char *sp = p->history + (TEXTHISTORY_MAXLEN * n); + if (*sp != '\0') { + p->rp = n; + return 1; + } + } + return 0; +} + +/** + * @brief 与えられたテキストで始まる文字列を探す。 + * @details このインターフェースはテキスト入力補完のために作られた。 + * + * @param p テキストヒストリオブジェクト。 + * @param index ヒストリ中で見つかる文字列のindex個目。 + * @param text 検索する文字列。 + * @param buf 格納先バッファ。 + * @param siz 格納先バッファサイズ。 + * + * @retval 0 成功。 + * @retval 0以外 失敗。 + */ +int text_history_find(text_history_t *p, + const int index, const char *text, + char *buf, const int siz) +{ + const int text_len = ntlibc_strlen((const char *)text); + int found = 0; + int i; + for (i = 0; i < TEXTHISTORY_DEPTH; i++) { + int target = (p->rp + i) % TEXTHISTORY_DEPTH; + char *txtp = p->history + (TEXTHISTORY_MAXLEN * target); + const int target_len = ntlibc_strlen((const char *)txtp); + int comp_len = (target_len < text_len) ? target_len : text_len; + if ((ntlibc_strncmp( + (const char *)txtp, + (const char *)text, comp_len) == 0) && (comp_len > 0)) { + if (found == index) { + ntlibc_strcpy((char *)buf, (char *)txtp); + return 0; + } + found++; + } + } + return -1; +} +
diff -r 000000000000 -r 7147d6024de8 text_history.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/text_history.h Sun May 22 02:51:35 2011 +0000 @@ -0,0 +1,65 @@ +/** + * @file text_history.h + * @author Shinichiro Nakamura + * @brief NT-Shell用テキストヒストリモジュールの定義。 + * @details + * 文字列の入力履歴を論理的に扱うためのモジュール。 + * このモジュールはビューに関して一切感知しない。 + */ + +/* + * =============================================================== + * Natural Tiny Shell (NT-Shell) + * Version 0.0.6 + * =============================================================== + * Copyright (c) 2010-2011 Shinichiro Nakamura + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * =============================================================== + */ + +#ifndef TEXT_HISTORY_H +#define TEXT_HISTORY_H + +#define TEXTHISTORY_MAXLEN 64 /**< テキストヒストリあたりの最大文字列長。 */ +#define TEXTHISTORY_DEPTH 8 /**< テキストヒストリのヒストリ数。 */ + +/** + * @brief テキストヒストリ構造体。 + */ +typedef struct { + char history[TEXTHISTORY_MAXLEN * TEXTHISTORY_DEPTH]; + int rp; + int wp; +} text_history_t; + +void text_history_init(text_history_t *p); +int text_history_write(text_history_t *p, char *buf); +int text_history_read(text_history_t *p, char *buf, const int siz); +int text_history_read_point_next(text_history_t *p); +int text_history_read_point_prev(text_history_t *p); +int text_history_find(text_history_t *p, + const int index, const char *text, + char *buf, const int siz); + +#endif +
diff -r 000000000000 -r 7147d6024de8 vtparse.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/vtparse.c Sun May 22 02:51:35 2011 +0000 @@ -0,0 +1,156 @@ +/** + * @file vtparse.c + * @brief VTParse + * @details + * An implementation of Paul Williams' DEC compatible state machine parser + * This code is in the public domain. + * @author Joshua Haberman <joshua@reverberate.org> + */ + +#include <string.h> +#include <stdlib.h> +#include <stdio.h> + +#include "vtparse.h" +#include "vtparse_table.h" +#include "ntlibc.h" + +void vtparse_init(vtparse_t *parser, vtparse_callback_t cb) +{ + parser->state = VTPARSE_STATE_GROUND; + parser->intermediate_chars[0] = '\0'; + parser->num_params = 0; + parser->ignore_flagged = 0; + parser->cb = cb; +} + +static void do_action(vtparse_t *parser, vtparse_action_t action, char ch) +{ + /* Some actions we handle internally (like parsing parameters), others + * we hand to our client for processing */ + + switch(action) { + case VTPARSE_ACTION_PRINT: + case VTPARSE_ACTION_EXECUTE: + case VTPARSE_ACTION_HOOK: + case VTPARSE_ACTION_PUT: + case VTPARSE_ACTION_OSC_START: + case VTPARSE_ACTION_OSC_PUT: + case VTPARSE_ACTION_OSC_END: + case VTPARSE_ACTION_UNHOOK: + case VTPARSE_ACTION_CSI_DISPATCH: + case VTPARSE_ACTION_ESC_DISPATCH: + parser->cb(parser, action, ch); + break; + + case VTPARSE_ACTION_IGNORE: + /* do nothing */ + break; + + case VTPARSE_ACTION_COLLECT: + { + /* Append the character to the intermediate params */ + int num_intermediate_chars = ntlibc_strlen((char*)parser->intermediate_chars); + + if(num_intermediate_chars + 1 > MAX_INTERMEDIATE_CHARS) + parser->ignore_flagged = 1; + else + parser->intermediate_chars[num_intermediate_chars++] = ch; + + break; + } + + case VTPARSE_ACTION_PARAM: + { + /* process the param character */ + if(ch == ';') + { + parser->num_params += 1; + parser->params[parser->num_params-1] = 0; + } + else + { + /* the character is a digit */ + int current_param; + + if(parser->num_params == 0) + { + parser->num_params = 1; + parser->params[0] = 0; + } + + current_param = parser->num_params - 1; + parser->params[current_param] *= 10; + parser->params[current_param] += (ch - '0'); + } + + break; + } + + case VTPARSE_ACTION_CLEAR: + parser->intermediate_chars[0] = '\0'; + parser->num_params = 0; + parser->ignore_flagged = 0; + break; + + default: + // Internal error: Unknown action. + break; + } +} + +static void do_state_change(vtparse_t *parser, state_change_t change, char ch) +{ + /* A state change is an action and/or a new state to transition to. */ + + vtparse_state_t new_state = STATE(change); + vtparse_action_t action = ACTION(change); + + + if(new_state) + { + /* Perform up to three actions: + * 1. the exit action of the old state + * 2. the action associated with the transition + * 3. the entry actionk of the new action + */ + + vtparse_action_t exit_action = GET_EXIT_ACTIONS(parser->state); + vtparse_action_t entry_action = GET_ENTRY_ACTIONS(new_state); + + if(exit_action) + do_action(parser, exit_action, 0); + + if(action) + do_action(parser, action, ch); + + if(entry_action) + do_action(parser, entry_action, 0); + + parser->state = new_state; + } + else + { + do_action(parser, action, ch); + } +} + +void vtparse(vtparse_t *parser, unsigned char *data, int len) +{ + int i; + for(i = 0; i < len; i++) + { + unsigned char ch = data[i]; + + /* If a transition is defined from the "anywhere" state, always + * use that. Otherwise use the transition from the current state. */ + + state_change_t change = GET_STATE_TABLE(VTPARSE_STATE_ANYWHERE, ch); + + if(!change) + change = GET_STATE_TABLE(parser->state, ch); + + do_state_change(parser, change, data[i]); + } +} +
diff -r 000000000000 -r 7147d6024de8 vtparse.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/vtparse.h Sun May 22 02:51:35 2011 +0000 @@ -0,0 +1,32 @@ +/** + * @file vtparse.h + * @brief VTParse + * @details + * An implementation of Paul Williams' DEC compatible state machine parser + * This code is in the public domain. + * @author Joshua Haberman <joshua@reverberate.org> + */ + +#include "vtparse_table.h" + +#define MAX_INTERMEDIATE_CHARS 2 +#define ACTION(state_change) (vtparse_action_t)(state_change & 0x0F) +#define STATE(state_change) (vtparse_state_t)(state_change >> 4) + +struct vtparse; + +typedef void (*vtparse_callback_t)(struct vtparse*, vtparse_action_t, unsigned char); + +typedef struct vtparse { + vtparse_state_t state; + vtparse_callback_t cb; + unsigned char intermediate_chars[MAX_INTERMEDIATE_CHARS+1]; + char ignore_flagged; + int params[16]; + int num_params; + void* user_data; +} vtparse_t; + +void vtparse_init(vtparse_t *parser, vtparse_callback_t cb); +void vtparse(vtparse_t *parser, unsigned char *data, int len); +
diff -r 000000000000 -r 7147d6024de8 vtparse_table.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/vtparse_table.c Sun May 22 02:51:35 2011 +0000 @@ -0,0 +1,2238 @@ +/** + * @file vtparse_table.c + * @brief VTParse + * @details + * An implementation of Paul Williams' DEC compatible state machine parser + * This code is in the public domain. + * @author Joshua Haberman <joshua@reverberate.org> + */ + +#include "vtparse_table.h" + +static const char *ACTION_NAMES[] = { + "<no action>", + "CLEAR", + "COLLECT", + "CSI_DISPATCH", + "ESC_DISPATCH", + "EXECUTE", + "HOOK", + "IGNORE", + "OSC_END", + "OSC_PUT", + "OSC_START", + "PARAM", + "PRINT", + "PUT", + "UNHOOK", +}; + +static const char *STATE_NAMES[] = { + "ANYWHERE", + "CSI_ENTRY", + "CSI_IGNORE", + "CSI_INTERMEDIATE", + "CSI_PARAM", + "DCS_ENTRY", + "DCS_IGNORE", + "DCS_INTERMEDIATE", + "DCS_PARAM", + "DCS_PASSTHROUGH", + "ESCAPE", + "ESCAPE_INTERMEDIATE", + "GROUND", + "OSC_STRING", + "SOS_PM_APC_STRING", +}; + +static const state_change_t STATE_TABLE[15][256] = { + { /* VTPARSE_STATE_ANYWHERE */ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, +/*24 */ VTPARSE_ACTION_EXECUTE | (VTPARSE_STATE_GROUND << 4), + 0, +/*26 */ VTPARSE_ACTION_EXECUTE | (VTPARSE_STATE_GROUND << 4), +/*27 */ 0 | (VTPARSE_STATE_ESCAPE << 4), + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, +/*128*/ VTPARSE_ACTION_EXECUTE | (VTPARSE_STATE_GROUND << 4), +/*129*/ VTPARSE_ACTION_EXECUTE | (VTPARSE_STATE_GROUND << 4), +/*130*/ VTPARSE_ACTION_EXECUTE | (VTPARSE_STATE_GROUND << 4), +/*131*/ VTPARSE_ACTION_EXECUTE | (VTPARSE_STATE_GROUND << 4), +/*132*/ VTPARSE_ACTION_EXECUTE | (VTPARSE_STATE_GROUND << 4), +/*133*/ VTPARSE_ACTION_EXECUTE | (VTPARSE_STATE_GROUND << 4), +/*134*/ VTPARSE_ACTION_EXECUTE | (VTPARSE_STATE_GROUND << 4), +/*135*/ VTPARSE_ACTION_EXECUTE | (VTPARSE_STATE_GROUND << 4), +/*136*/ VTPARSE_ACTION_EXECUTE | (VTPARSE_STATE_GROUND << 4), +/*137*/ VTPARSE_ACTION_EXECUTE | (VTPARSE_STATE_GROUND << 4), +/*138*/ VTPARSE_ACTION_EXECUTE | (VTPARSE_STATE_GROUND << 4), +/*139*/ VTPARSE_ACTION_EXECUTE | (VTPARSE_STATE_GROUND << 4), +/*140*/ VTPARSE_ACTION_EXECUTE | (VTPARSE_STATE_GROUND << 4), +/*141*/ VTPARSE_ACTION_EXECUTE | (VTPARSE_STATE_GROUND << 4), +/*142*/ VTPARSE_ACTION_EXECUTE | (VTPARSE_STATE_GROUND << 4), +/*143*/ VTPARSE_ACTION_EXECUTE | (VTPARSE_STATE_GROUND << 4), +/*144*/ 0 | (VTPARSE_STATE_DCS_ENTRY << 4), +/*145*/ VTPARSE_ACTION_EXECUTE | (VTPARSE_STATE_GROUND << 4), +/*146*/ VTPARSE_ACTION_EXECUTE | (VTPARSE_STATE_GROUND << 4), +/*147*/ VTPARSE_ACTION_EXECUTE | (VTPARSE_STATE_GROUND << 4), +/*148*/ VTPARSE_ACTION_EXECUTE | (VTPARSE_STATE_GROUND << 4), +/*149*/ VTPARSE_ACTION_EXECUTE | (VTPARSE_STATE_GROUND << 4), +/*150*/ VTPARSE_ACTION_EXECUTE | (VTPARSE_STATE_GROUND << 4), +/*151*/ VTPARSE_ACTION_EXECUTE | (VTPARSE_STATE_GROUND << 4), +/*152*/ 0 | (VTPARSE_STATE_SOS_PM_APC_STRING << 4), +/*153*/ VTPARSE_ACTION_EXECUTE | (VTPARSE_STATE_GROUND << 4), +/*154*/ VTPARSE_ACTION_EXECUTE | (VTPARSE_STATE_GROUND << 4), +/*155*/ 0 | (VTPARSE_STATE_CSI_ENTRY << 4), +/*156*/ VTPARSE_ACTION_EXECUTE | (VTPARSE_STATE_GROUND << 4), +/*157*/ 0 | (VTPARSE_STATE_OSC_STRING << 4), +/*158*/ 0 | (VTPARSE_STATE_SOS_PM_APC_STRING << 4), +/*159*/ 0 | (VTPARSE_STATE_SOS_PM_APC_STRING << 4), + }, + { /* VTPARSE_STATE_CSI_ENTRY */ +/*0 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*1 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*2 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*3 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*4 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*5 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*6 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*7 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*8 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*9 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*10 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*11 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*12 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*13 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*14 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*15 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*16 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*17 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*18 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*19 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*20 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*21 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*22 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*23 */ VTPARSE_ACTION_EXECUTE | (0 << 4), + 0, +/*25 */ VTPARSE_ACTION_EXECUTE | (0 << 4), + 0, + 0, +/*28 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*29 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*30 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*31 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*32 */ VTPARSE_ACTION_COLLECT | (VTPARSE_STATE_CSI_INTERMEDIATE << 4), +/*33 */ VTPARSE_ACTION_COLLECT | (VTPARSE_STATE_CSI_INTERMEDIATE << 4), +/*34 */ VTPARSE_ACTION_COLLECT | (VTPARSE_STATE_CSI_INTERMEDIATE << 4), +/*35 */ VTPARSE_ACTION_COLLECT | (VTPARSE_STATE_CSI_INTERMEDIATE << 4), +/*36 */ VTPARSE_ACTION_COLLECT | (VTPARSE_STATE_CSI_INTERMEDIATE << 4), +/*37 */ VTPARSE_ACTION_COLLECT | (VTPARSE_STATE_CSI_INTERMEDIATE << 4), +/*38 */ VTPARSE_ACTION_COLLECT | (VTPARSE_STATE_CSI_INTERMEDIATE << 4), +/*39 */ VTPARSE_ACTION_COLLECT | (VTPARSE_STATE_CSI_INTERMEDIATE << 4), +/*40 */ VTPARSE_ACTION_COLLECT | (VTPARSE_STATE_CSI_INTERMEDIATE << 4), +/*41 */ VTPARSE_ACTION_COLLECT | (VTPARSE_STATE_CSI_INTERMEDIATE << 4), +/*42 */ VTPARSE_ACTION_COLLECT | (VTPARSE_STATE_CSI_INTERMEDIATE << 4), +/*43 */ VTPARSE_ACTION_COLLECT | (VTPARSE_STATE_CSI_INTERMEDIATE << 4), +/*44 */ VTPARSE_ACTION_COLLECT | (VTPARSE_STATE_CSI_INTERMEDIATE << 4), +/*45 */ VTPARSE_ACTION_COLLECT | (VTPARSE_STATE_CSI_INTERMEDIATE << 4), +/*46 */ VTPARSE_ACTION_COLLECT | (VTPARSE_STATE_CSI_INTERMEDIATE << 4), +/*47 */ VTPARSE_ACTION_COLLECT | (VTPARSE_STATE_CSI_INTERMEDIATE << 4), +/*48 */ VTPARSE_ACTION_PARAM | (VTPARSE_STATE_CSI_PARAM << 4), +/*49 */ VTPARSE_ACTION_PARAM | (VTPARSE_STATE_CSI_PARAM << 4), +/*50 */ VTPARSE_ACTION_PARAM | (VTPARSE_STATE_CSI_PARAM << 4), +/*51 */ VTPARSE_ACTION_PARAM | (VTPARSE_STATE_CSI_PARAM << 4), +/*52 */ VTPARSE_ACTION_PARAM | (VTPARSE_STATE_CSI_PARAM << 4), +/*53 */ VTPARSE_ACTION_PARAM | (VTPARSE_STATE_CSI_PARAM << 4), +/*54 */ VTPARSE_ACTION_PARAM | (VTPARSE_STATE_CSI_PARAM << 4), +/*55 */ VTPARSE_ACTION_PARAM | (VTPARSE_STATE_CSI_PARAM << 4), +/*56 */ VTPARSE_ACTION_PARAM | (VTPARSE_STATE_CSI_PARAM << 4), +/*57 */ VTPARSE_ACTION_PARAM | (VTPARSE_STATE_CSI_PARAM << 4), +/*58 */ 0 | (VTPARSE_STATE_CSI_IGNORE << 4), +/*59 */ VTPARSE_ACTION_PARAM | (VTPARSE_STATE_CSI_PARAM << 4), +/*60 */ VTPARSE_ACTION_COLLECT | (VTPARSE_STATE_CSI_PARAM << 4), +/*61 */ VTPARSE_ACTION_COLLECT | (VTPARSE_STATE_CSI_PARAM << 4), +/*62 */ VTPARSE_ACTION_COLLECT | (VTPARSE_STATE_CSI_PARAM << 4), +/*63 */ VTPARSE_ACTION_COLLECT | (VTPARSE_STATE_CSI_PARAM << 4), +/*64 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*65 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*66 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*67 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*68 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*69 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*70 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*71 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*72 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*73 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*74 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*75 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*76 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*77 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*78 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*79 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*80 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*81 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*82 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*83 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*84 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*85 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*86 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*87 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*88 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*89 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*90 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*91 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*92 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*93 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*94 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*95 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*96 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*97 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*98 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*99 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*100*/ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*101*/ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*102*/ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*103*/ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*104*/ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*105*/ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*106*/ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*107*/ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*108*/ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*109*/ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*110*/ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*111*/ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*112*/ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*113*/ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*114*/ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*115*/ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*116*/ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*117*/ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*118*/ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*119*/ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*120*/ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*121*/ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*122*/ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*123*/ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*124*/ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*125*/ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*126*/ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*127*/ VTPARSE_ACTION_IGNORE | (0 << 4), + }, + { /* VTPARSE_STATE_CSI_IGNORE */ +/*0 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*1 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*2 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*3 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*4 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*5 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*6 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*7 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*8 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*9 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*10 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*11 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*12 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*13 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*14 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*15 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*16 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*17 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*18 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*19 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*20 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*21 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*22 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*23 */ VTPARSE_ACTION_EXECUTE | (0 << 4), + 0, +/*25 */ VTPARSE_ACTION_EXECUTE | (0 << 4), + 0, + 0, +/*28 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*29 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*30 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*31 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*32 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*33 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*34 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*35 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*36 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*37 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*38 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*39 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*40 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*41 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*42 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*43 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*44 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*45 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*46 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*47 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*48 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*49 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*50 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*51 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*52 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*53 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*54 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*55 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*56 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*57 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*58 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*59 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*60 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*61 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*62 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*63 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*64 */ 0 | (VTPARSE_STATE_GROUND << 4), +/*65 */ 0 | (VTPARSE_STATE_GROUND << 4), +/*66 */ 0 | (VTPARSE_STATE_GROUND << 4), +/*67 */ 0 | (VTPARSE_STATE_GROUND << 4), +/*68 */ 0 | (VTPARSE_STATE_GROUND << 4), +/*69 */ 0 | (VTPARSE_STATE_GROUND << 4), +/*70 */ 0 | (VTPARSE_STATE_GROUND << 4), +/*71 */ 0 | (VTPARSE_STATE_GROUND << 4), +/*72 */ 0 | (VTPARSE_STATE_GROUND << 4), +/*73 */ 0 | (VTPARSE_STATE_GROUND << 4), +/*74 */ 0 | (VTPARSE_STATE_GROUND << 4), +/*75 */ 0 | (VTPARSE_STATE_GROUND << 4), +/*76 */ 0 | (VTPARSE_STATE_GROUND << 4), +/*77 */ 0 | (VTPARSE_STATE_GROUND << 4), +/*78 */ 0 | (VTPARSE_STATE_GROUND << 4), +/*79 */ 0 | (VTPARSE_STATE_GROUND << 4), +/*80 */ 0 | (VTPARSE_STATE_GROUND << 4), +/*81 */ 0 | (VTPARSE_STATE_GROUND << 4), +/*82 */ 0 | (VTPARSE_STATE_GROUND << 4), +/*83 */ 0 | (VTPARSE_STATE_GROUND << 4), +/*84 */ 0 | (VTPARSE_STATE_GROUND << 4), +/*85 */ 0 | (VTPARSE_STATE_GROUND << 4), +/*86 */ 0 | (VTPARSE_STATE_GROUND << 4), +/*87 */ 0 | (VTPARSE_STATE_GROUND << 4), +/*88 */ 0 | (VTPARSE_STATE_GROUND << 4), +/*89 */ 0 | (VTPARSE_STATE_GROUND << 4), +/*90 */ 0 | (VTPARSE_STATE_GROUND << 4), +/*91 */ 0 | (VTPARSE_STATE_GROUND << 4), +/*92 */ 0 | (VTPARSE_STATE_GROUND << 4), +/*93 */ 0 | (VTPARSE_STATE_GROUND << 4), +/*94 */ 0 | (VTPARSE_STATE_GROUND << 4), +/*95 */ 0 | (VTPARSE_STATE_GROUND << 4), +/*96 */ 0 | (VTPARSE_STATE_GROUND << 4), +/*97 */ 0 | (VTPARSE_STATE_GROUND << 4), +/*98 */ 0 | (VTPARSE_STATE_GROUND << 4), +/*99 */ 0 | (VTPARSE_STATE_GROUND << 4), +/*100*/ 0 | (VTPARSE_STATE_GROUND << 4), +/*101*/ 0 | (VTPARSE_STATE_GROUND << 4), +/*102*/ 0 | (VTPARSE_STATE_GROUND << 4), +/*103*/ 0 | (VTPARSE_STATE_GROUND << 4), +/*104*/ 0 | (VTPARSE_STATE_GROUND << 4), +/*105*/ 0 | (VTPARSE_STATE_GROUND << 4), +/*106*/ 0 | (VTPARSE_STATE_GROUND << 4), +/*107*/ 0 | (VTPARSE_STATE_GROUND << 4), +/*108*/ 0 | (VTPARSE_STATE_GROUND << 4), +/*109*/ 0 | (VTPARSE_STATE_GROUND << 4), +/*110*/ 0 | (VTPARSE_STATE_GROUND << 4), +/*111*/ 0 | (VTPARSE_STATE_GROUND << 4), +/*112*/ 0 | (VTPARSE_STATE_GROUND << 4), +/*113*/ 0 | (VTPARSE_STATE_GROUND << 4), +/*114*/ 0 | (VTPARSE_STATE_GROUND << 4), +/*115*/ 0 | (VTPARSE_STATE_GROUND << 4), +/*116*/ 0 | (VTPARSE_STATE_GROUND << 4), +/*117*/ 0 | (VTPARSE_STATE_GROUND << 4), +/*118*/ 0 | (VTPARSE_STATE_GROUND << 4), +/*119*/ 0 | (VTPARSE_STATE_GROUND << 4), +/*120*/ 0 | (VTPARSE_STATE_GROUND << 4), +/*121*/ 0 | (VTPARSE_STATE_GROUND << 4), +/*122*/ 0 | (VTPARSE_STATE_GROUND << 4), +/*123*/ 0 | (VTPARSE_STATE_GROUND << 4), +/*124*/ 0 | (VTPARSE_STATE_GROUND << 4), +/*125*/ 0 | (VTPARSE_STATE_GROUND << 4), +/*126*/ 0 | (VTPARSE_STATE_GROUND << 4), +/*127*/ VTPARSE_ACTION_IGNORE | (0 << 4), + }, + { /* VTPARSE_STATE_CSI_INTERMEDIATE */ +/*0 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*1 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*2 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*3 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*4 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*5 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*6 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*7 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*8 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*9 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*10 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*11 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*12 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*13 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*14 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*15 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*16 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*17 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*18 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*19 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*20 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*21 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*22 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*23 */ VTPARSE_ACTION_EXECUTE | (0 << 4), + 0, +/*25 */ VTPARSE_ACTION_EXECUTE | (0 << 4), + 0, + 0, +/*28 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*29 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*30 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*31 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*32 */ VTPARSE_ACTION_COLLECT | (0 << 4), +/*33 */ VTPARSE_ACTION_COLLECT | (0 << 4), +/*34 */ VTPARSE_ACTION_COLLECT | (0 << 4), +/*35 */ VTPARSE_ACTION_COLLECT | (0 << 4), +/*36 */ VTPARSE_ACTION_COLLECT | (0 << 4), +/*37 */ VTPARSE_ACTION_COLLECT | (0 << 4), +/*38 */ VTPARSE_ACTION_COLLECT | (0 << 4), +/*39 */ VTPARSE_ACTION_COLLECT | (0 << 4), +/*40 */ VTPARSE_ACTION_COLLECT | (0 << 4), +/*41 */ VTPARSE_ACTION_COLLECT | (0 << 4), +/*42 */ VTPARSE_ACTION_COLLECT | (0 << 4), +/*43 */ VTPARSE_ACTION_COLLECT | (0 << 4), +/*44 */ VTPARSE_ACTION_COLLECT | (0 << 4), +/*45 */ VTPARSE_ACTION_COLLECT | (0 << 4), +/*46 */ VTPARSE_ACTION_COLLECT | (0 << 4), +/*47 */ VTPARSE_ACTION_COLLECT | (0 << 4), +/*48 */ 0 | (VTPARSE_STATE_CSI_IGNORE << 4), +/*49 */ 0 | (VTPARSE_STATE_CSI_IGNORE << 4), +/*50 */ 0 | (VTPARSE_STATE_CSI_IGNORE << 4), +/*51 */ 0 | (VTPARSE_STATE_CSI_IGNORE << 4), +/*52 */ 0 | (VTPARSE_STATE_CSI_IGNORE << 4), +/*53 */ 0 | (VTPARSE_STATE_CSI_IGNORE << 4), +/*54 */ 0 | (VTPARSE_STATE_CSI_IGNORE << 4), +/*55 */ 0 | (VTPARSE_STATE_CSI_IGNORE << 4), +/*56 */ 0 | (VTPARSE_STATE_CSI_IGNORE << 4), +/*57 */ 0 | (VTPARSE_STATE_CSI_IGNORE << 4), +/*58 */ 0 | (VTPARSE_STATE_CSI_IGNORE << 4), +/*59 */ 0 | (VTPARSE_STATE_CSI_IGNORE << 4), +/*60 */ 0 | (VTPARSE_STATE_CSI_IGNORE << 4), +/*61 */ 0 | (VTPARSE_STATE_CSI_IGNORE << 4), +/*62 */ 0 | (VTPARSE_STATE_CSI_IGNORE << 4), +/*63 */ 0 | (VTPARSE_STATE_CSI_IGNORE << 4), +/*64 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*65 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*66 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*67 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*68 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*69 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*70 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*71 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*72 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*73 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*74 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*75 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*76 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*77 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*78 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*79 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*80 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*81 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*82 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*83 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*84 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*85 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*86 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*87 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*88 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*89 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*90 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*91 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*92 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*93 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*94 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*95 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*96 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*97 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*98 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*99 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*100*/ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*101*/ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*102*/ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*103*/ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*104*/ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*105*/ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*106*/ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*107*/ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*108*/ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*109*/ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*110*/ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*111*/ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*112*/ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*113*/ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*114*/ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*115*/ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*116*/ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*117*/ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*118*/ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*119*/ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*120*/ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*121*/ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*122*/ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*123*/ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*124*/ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*125*/ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*126*/ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*127*/ VTPARSE_ACTION_IGNORE | (0 << 4), + }, + { /* VTPARSE_STATE_CSI_PARAM */ +/*0 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*1 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*2 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*3 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*4 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*5 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*6 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*7 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*8 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*9 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*10 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*11 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*12 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*13 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*14 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*15 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*16 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*17 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*18 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*19 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*20 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*21 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*22 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*23 */ VTPARSE_ACTION_EXECUTE | (0 << 4), + 0, +/*25 */ VTPARSE_ACTION_EXECUTE | (0 << 4), + 0, + 0, +/*28 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*29 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*30 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*31 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*32 */ VTPARSE_ACTION_COLLECT | (VTPARSE_STATE_CSI_INTERMEDIATE << 4), +/*33 */ VTPARSE_ACTION_COLLECT | (VTPARSE_STATE_CSI_INTERMEDIATE << 4), +/*34 */ VTPARSE_ACTION_COLLECT | (VTPARSE_STATE_CSI_INTERMEDIATE << 4), +/*35 */ VTPARSE_ACTION_COLLECT | (VTPARSE_STATE_CSI_INTERMEDIATE << 4), +/*36 */ VTPARSE_ACTION_COLLECT | (VTPARSE_STATE_CSI_INTERMEDIATE << 4), +/*37 */ VTPARSE_ACTION_COLLECT | (VTPARSE_STATE_CSI_INTERMEDIATE << 4), +/*38 */ VTPARSE_ACTION_COLLECT | (VTPARSE_STATE_CSI_INTERMEDIATE << 4), +/*39 */ VTPARSE_ACTION_COLLECT | (VTPARSE_STATE_CSI_INTERMEDIATE << 4), +/*40 */ VTPARSE_ACTION_COLLECT | (VTPARSE_STATE_CSI_INTERMEDIATE << 4), +/*41 */ VTPARSE_ACTION_COLLECT | (VTPARSE_STATE_CSI_INTERMEDIATE << 4), +/*42 */ VTPARSE_ACTION_COLLECT | (VTPARSE_STATE_CSI_INTERMEDIATE << 4), +/*43 */ VTPARSE_ACTION_COLLECT | (VTPARSE_STATE_CSI_INTERMEDIATE << 4), +/*44 */ VTPARSE_ACTION_COLLECT | (VTPARSE_STATE_CSI_INTERMEDIATE << 4), +/*45 */ VTPARSE_ACTION_COLLECT | (VTPARSE_STATE_CSI_INTERMEDIATE << 4), +/*46 */ VTPARSE_ACTION_COLLECT | (VTPARSE_STATE_CSI_INTERMEDIATE << 4), +/*47 */ VTPARSE_ACTION_COLLECT | (VTPARSE_STATE_CSI_INTERMEDIATE << 4), +/*48 */ VTPARSE_ACTION_PARAM | (0 << 4), +/*49 */ VTPARSE_ACTION_PARAM | (0 << 4), +/*50 */ VTPARSE_ACTION_PARAM | (0 << 4), +/*51 */ VTPARSE_ACTION_PARAM | (0 << 4), +/*52 */ VTPARSE_ACTION_PARAM | (0 << 4), +/*53 */ VTPARSE_ACTION_PARAM | (0 << 4), +/*54 */ VTPARSE_ACTION_PARAM | (0 << 4), +/*55 */ VTPARSE_ACTION_PARAM | (0 << 4), +/*56 */ VTPARSE_ACTION_PARAM | (0 << 4), +/*57 */ VTPARSE_ACTION_PARAM | (0 << 4), +/*58 */ 0 | (VTPARSE_STATE_CSI_IGNORE << 4), +/*59 */ VTPARSE_ACTION_PARAM | (0 << 4), +/*60 */ 0 | (VTPARSE_STATE_CSI_IGNORE << 4), +/*61 */ 0 | (VTPARSE_STATE_CSI_IGNORE << 4), +/*62 */ 0 | (VTPARSE_STATE_CSI_IGNORE << 4), +/*63 */ 0 | (VTPARSE_STATE_CSI_IGNORE << 4), +/*64 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*65 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*66 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*67 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*68 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*69 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*70 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*71 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*72 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*73 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*74 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*75 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*76 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*77 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*78 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*79 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*80 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*81 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*82 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*83 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*84 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*85 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*86 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*87 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*88 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*89 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*90 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*91 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*92 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*93 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*94 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*95 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*96 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*97 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*98 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*99 */ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*100*/ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*101*/ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*102*/ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*103*/ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*104*/ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*105*/ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*106*/ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*107*/ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*108*/ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*109*/ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*110*/ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*111*/ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*112*/ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*113*/ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*114*/ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*115*/ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*116*/ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*117*/ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*118*/ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*119*/ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*120*/ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*121*/ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*122*/ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*123*/ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*124*/ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*125*/ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*126*/ VTPARSE_ACTION_CSI_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*127*/ VTPARSE_ACTION_IGNORE | (0 << 4), + }, + { /* VTPARSE_STATE_DCS_ENTRY */ +/*0 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*1 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*2 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*3 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*4 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*5 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*6 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*7 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*8 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*9 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*10 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*11 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*12 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*13 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*14 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*15 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*16 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*17 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*18 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*19 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*20 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*21 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*22 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*23 */ VTPARSE_ACTION_IGNORE | (0 << 4), + 0, +/*25 */ VTPARSE_ACTION_IGNORE | (0 << 4), + 0, + 0, +/*28 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*29 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*30 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*31 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*32 */ VTPARSE_ACTION_COLLECT | (VTPARSE_STATE_DCS_INTERMEDIATE << 4), +/*33 */ VTPARSE_ACTION_COLLECT | (VTPARSE_STATE_DCS_INTERMEDIATE << 4), +/*34 */ VTPARSE_ACTION_COLLECT | (VTPARSE_STATE_DCS_INTERMEDIATE << 4), +/*35 */ VTPARSE_ACTION_COLLECT | (VTPARSE_STATE_DCS_INTERMEDIATE << 4), +/*36 */ VTPARSE_ACTION_COLLECT | (VTPARSE_STATE_DCS_INTERMEDIATE << 4), +/*37 */ VTPARSE_ACTION_COLLECT | (VTPARSE_STATE_DCS_INTERMEDIATE << 4), +/*38 */ VTPARSE_ACTION_COLLECT | (VTPARSE_STATE_DCS_INTERMEDIATE << 4), +/*39 */ VTPARSE_ACTION_COLLECT | (VTPARSE_STATE_DCS_INTERMEDIATE << 4), +/*40 */ VTPARSE_ACTION_COLLECT | (VTPARSE_STATE_DCS_INTERMEDIATE << 4), +/*41 */ VTPARSE_ACTION_COLLECT | (VTPARSE_STATE_DCS_INTERMEDIATE << 4), +/*42 */ VTPARSE_ACTION_COLLECT | (VTPARSE_STATE_DCS_INTERMEDIATE << 4), +/*43 */ VTPARSE_ACTION_COLLECT | (VTPARSE_STATE_DCS_INTERMEDIATE << 4), +/*44 */ VTPARSE_ACTION_COLLECT | (VTPARSE_STATE_DCS_INTERMEDIATE << 4), +/*45 */ VTPARSE_ACTION_COLLECT | (VTPARSE_STATE_DCS_INTERMEDIATE << 4), +/*46 */ VTPARSE_ACTION_COLLECT | (VTPARSE_STATE_DCS_INTERMEDIATE << 4), +/*47 */ VTPARSE_ACTION_COLLECT | (VTPARSE_STATE_DCS_INTERMEDIATE << 4), +/*48 */ VTPARSE_ACTION_PARAM | (VTPARSE_STATE_DCS_PARAM << 4), +/*49 */ VTPARSE_ACTION_PARAM | (VTPARSE_STATE_DCS_PARAM << 4), +/*50 */ VTPARSE_ACTION_PARAM | (VTPARSE_STATE_DCS_PARAM << 4), +/*51 */ VTPARSE_ACTION_PARAM | (VTPARSE_STATE_DCS_PARAM << 4), +/*52 */ VTPARSE_ACTION_PARAM | (VTPARSE_STATE_DCS_PARAM << 4), +/*53 */ VTPARSE_ACTION_PARAM | (VTPARSE_STATE_DCS_PARAM << 4), +/*54 */ VTPARSE_ACTION_PARAM | (VTPARSE_STATE_DCS_PARAM << 4), +/*55 */ VTPARSE_ACTION_PARAM | (VTPARSE_STATE_DCS_PARAM << 4), +/*56 */ VTPARSE_ACTION_PARAM | (VTPARSE_STATE_DCS_PARAM << 4), +/*57 */ VTPARSE_ACTION_PARAM | (VTPARSE_STATE_DCS_PARAM << 4), +/*58 */ 0 | (VTPARSE_STATE_DCS_IGNORE << 4), +/*59 */ VTPARSE_ACTION_PARAM | (VTPARSE_STATE_DCS_PARAM << 4), +/*60 */ VTPARSE_ACTION_COLLECT | (VTPARSE_STATE_DCS_PARAM << 4), +/*61 */ VTPARSE_ACTION_COLLECT | (VTPARSE_STATE_DCS_PARAM << 4), +/*62 */ VTPARSE_ACTION_COLLECT | (VTPARSE_STATE_DCS_PARAM << 4), +/*63 */ VTPARSE_ACTION_COLLECT | (VTPARSE_STATE_DCS_PARAM << 4), +/*64 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*65 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*66 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*67 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*68 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*69 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*70 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*71 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*72 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*73 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*74 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*75 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*76 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*77 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*78 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*79 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*80 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*81 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*82 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*83 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*84 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*85 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*86 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*87 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*88 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*89 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*90 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*91 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*92 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*93 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*94 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*95 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*96 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*97 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*98 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*99 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*100*/ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*101*/ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*102*/ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*103*/ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*104*/ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*105*/ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*106*/ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*107*/ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*108*/ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*109*/ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*110*/ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*111*/ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*112*/ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*113*/ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*114*/ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*115*/ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*116*/ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*117*/ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*118*/ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*119*/ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*120*/ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*121*/ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*122*/ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*123*/ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*124*/ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*125*/ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*126*/ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*127*/ VTPARSE_ACTION_IGNORE | (0 << 4), + }, + { /* VTPARSE_STATE_DCS_IGNORE */ +/*0 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*1 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*2 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*3 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*4 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*5 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*6 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*7 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*8 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*9 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*10 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*11 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*12 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*13 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*14 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*15 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*16 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*17 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*18 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*19 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*20 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*21 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*22 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*23 */ VTPARSE_ACTION_IGNORE | (0 << 4), + 0, +/*25 */ VTPARSE_ACTION_IGNORE | (0 << 4), + 0, + 0, +/*28 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*29 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*30 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*31 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*32 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*33 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*34 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*35 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*36 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*37 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*38 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*39 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*40 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*41 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*42 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*43 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*44 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*45 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*46 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*47 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*48 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*49 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*50 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*51 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*52 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*53 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*54 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*55 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*56 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*57 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*58 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*59 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*60 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*61 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*62 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*63 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*64 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*65 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*66 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*67 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*68 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*69 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*70 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*71 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*72 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*73 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*74 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*75 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*76 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*77 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*78 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*79 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*80 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*81 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*82 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*83 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*84 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*85 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*86 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*87 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*88 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*89 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*90 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*91 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*92 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*93 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*94 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*95 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*96 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*97 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*98 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*99 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*100*/ VTPARSE_ACTION_IGNORE | (0 << 4), +/*101*/ VTPARSE_ACTION_IGNORE | (0 << 4), +/*102*/ VTPARSE_ACTION_IGNORE | (0 << 4), +/*103*/ VTPARSE_ACTION_IGNORE | (0 << 4), +/*104*/ VTPARSE_ACTION_IGNORE | (0 << 4), +/*105*/ VTPARSE_ACTION_IGNORE | (0 << 4), +/*106*/ VTPARSE_ACTION_IGNORE | (0 << 4), +/*107*/ VTPARSE_ACTION_IGNORE | (0 << 4), +/*108*/ VTPARSE_ACTION_IGNORE | (0 << 4), +/*109*/ VTPARSE_ACTION_IGNORE | (0 << 4), +/*110*/ VTPARSE_ACTION_IGNORE | (0 << 4), +/*111*/ VTPARSE_ACTION_IGNORE | (0 << 4), +/*112*/ VTPARSE_ACTION_IGNORE | (0 << 4), +/*113*/ VTPARSE_ACTION_IGNORE | (0 << 4), +/*114*/ VTPARSE_ACTION_IGNORE | (0 << 4), +/*115*/ VTPARSE_ACTION_IGNORE | (0 << 4), +/*116*/ VTPARSE_ACTION_IGNORE | (0 << 4), +/*117*/ VTPARSE_ACTION_IGNORE | (0 << 4), +/*118*/ VTPARSE_ACTION_IGNORE | (0 << 4), +/*119*/ VTPARSE_ACTION_IGNORE | (0 << 4), +/*120*/ VTPARSE_ACTION_IGNORE | (0 << 4), +/*121*/ VTPARSE_ACTION_IGNORE | (0 << 4), +/*122*/ VTPARSE_ACTION_IGNORE | (0 << 4), +/*123*/ VTPARSE_ACTION_IGNORE | (0 << 4), +/*124*/ VTPARSE_ACTION_IGNORE | (0 << 4), +/*125*/ VTPARSE_ACTION_IGNORE | (0 << 4), +/*126*/ VTPARSE_ACTION_IGNORE | (0 << 4), +/*127*/ VTPARSE_ACTION_IGNORE | (0 << 4), + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, +/*156*/ 0 | (VTPARSE_STATE_GROUND << 4), + }, + { /* VTPARSE_STATE_DCS_INTERMEDIATE */ +/*0 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*1 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*2 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*3 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*4 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*5 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*6 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*7 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*8 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*9 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*10 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*11 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*12 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*13 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*14 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*15 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*16 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*17 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*18 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*19 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*20 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*21 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*22 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*23 */ VTPARSE_ACTION_IGNORE | (0 << 4), + 0, +/*25 */ VTPARSE_ACTION_IGNORE | (0 << 4), + 0, + 0, +/*28 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*29 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*30 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*31 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*32 */ VTPARSE_ACTION_COLLECT | (0 << 4), +/*33 */ VTPARSE_ACTION_COLLECT | (0 << 4), +/*34 */ VTPARSE_ACTION_COLLECT | (0 << 4), +/*35 */ VTPARSE_ACTION_COLLECT | (0 << 4), +/*36 */ VTPARSE_ACTION_COLLECT | (0 << 4), +/*37 */ VTPARSE_ACTION_COLLECT | (0 << 4), +/*38 */ VTPARSE_ACTION_COLLECT | (0 << 4), +/*39 */ VTPARSE_ACTION_COLLECT | (0 << 4), +/*40 */ VTPARSE_ACTION_COLLECT | (0 << 4), +/*41 */ VTPARSE_ACTION_COLLECT | (0 << 4), +/*42 */ VTPARSE_ACTION_COLLECT | (0 << 4), +/*43 */ VTPARSE_ACTION_COLLECT | (0 << 4), +/*44 */ VTPARSE_ACTION_COLLECT | (0 << 4), +/*45 */ VTPARSE_ACTION_COLLECT | (0 << 4), +/*46 */ VTPARSE_ACTION_COLLECT | (0 << 4), +/*47 */ VTPARSE_ACTION_COLLECT | (0 << 4), +/*48 */ 0 | (VTPARSE_STATE_DCS_IGNORE << 4), +/*49 */ 0 | (VTPARSE_STATE_DCS_IGNORE << 4), +/*50 */ 0 | (VTPARSE_STATE_DCS_IGNORE << 4), +/*51 */ 0 | (VTPARSE_STATE_DCS_IGNORE << 4), +/*52 */ 0 | (VTPARSE_STATE_DCS_IGNORE << 4), +/*53 */ 0 | (VTPARSE_STATE_DCS_IGNORE << 4), +/*54 */ 0 | (VTPARSE_STATE_DCS_IGNORE << 4), +/*55 */ 0 | (VTPARSE_STATE_DCS_IGNORE << 4), +/*56 */ 0 | (VTPARSE_STATE_DCS_IGNORE << 4), +/*57 */ 0 | (VTPARSE_STATE_DCS_IGNORE << 4), +/*58 */ 0 | (VTPARSE_STATE_DCS_IGNORE << 4), +/*59 */ 0 | (VTPARSE_STATE_DCS_IGNORE << 4), +/*60 */ 0 | (VTPARSE_STATE_DCS_IGNORE << 4), +/*61 */ 0 | (VTPARSE_STATE_DCS_IGNORE << 4), +/*62 */ 0 | (VTPARSE_STATE_DCS_IGNORE << 4), +/*63 */ 0 | (VTPARSE_STATE_DCS_IGNORE << 4), +/*64 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*65 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*66 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*67 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*68 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*69 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*70 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*71 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*72 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*73 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*74 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*75 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*76 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*77 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*78 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*79 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*80 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*81 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*82 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*83 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*84 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*85 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*86 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*87 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*88 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*89 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*90 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*91 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*92 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*93 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*94 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*95 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*96 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*97 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*98 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*99 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*100*/ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*101*/ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*102*/ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*103*/ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*104*/ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*105*/ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*106*/ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*107*/ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*108*/ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*109*/ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*110*/ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*111*/ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*112*/ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*113*/ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*114*/ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*115*/ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*116*/ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*117*/ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*118*/ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*119*/ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*120*/ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*121*/ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*122*/ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*123*/ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*124*/ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*125*/ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*126*/ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*127*/ VTPARSE_ACTION_IGNORE | (0 << 4), + }, + { /* VTPARSE_STATE_DCS_PARAM */ +/*0 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*1 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*2 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*3 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*4 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*5 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*6 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*7 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*8 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*9 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*10 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*11 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*12 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*13 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*14 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*15 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*16 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*17 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*18 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*19 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*20 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*21 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*22 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*23 */ VTPARSE_ACTION_IGNORE | (0 << 4), + 0, +/*25 */ VTPARSE_ACTION_IGNORE | (0 << 4), + 0, + 0, +/*28 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*29 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*30 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*31 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*32 */ VTPARSE_ACTION_COLLECT | (VTPARSE_STATE_DCS_INTERMEDIATE << 4), +/*33 */ VTPARSE_ACTION_COLLECT | (VTPARSE_STATE_DCS_INTERMEDIATE << 4), +/*34 */ VTPARSE_ACTION_COLLECT | (VTPARSE_STATE_DCS_INTERMEDIATE << 4), +/*35 */ VTPARSE_ACTION_COLLECT | (VTPARSE_STATE_DCS_INTERMEDIATE << 4), +/*36 */ VTPARSE_ACTION_COLLECT | (VTPARSE_STATE_DCS_INTERMEDIATE << 4), +/*37 */ VTPARSE_ACTION_COLLECT | (VTPARSE_STATE_DCS_INTERMEDIATE << 4), +/*38 */ VTPARSE_ACTION_COLLECT | (VTPARSE_STATE_DCS_INTERMEDIATE << 4), +/*39 */ VTPARSE_ACTION_COLLECT | (VTPARSE_STATE_DCS_INTERMEDIATE << 4), +/*40 */ VTPARSE_ACTION_COLLECT | (VTPARSE_STATE_DCS_INTERMEDIATE << 4), +/*41 */ VTPARSE_ACTION_COLLECT | (VTPARSE_STATE_DCS_INTERMEDIATE << 4), +/*42 */ VTPARSE_ACTION_COLLECT | (VTPARSE_STATE_DCS_INTERMEDIATE << 4), +/*43 */ VTPARSE_ACTION_COLLECT | (VTPARSE_STATE_DCS_INTERMEDIATE << 4), +/*44 */ VTPARSE_ACTION_COLLECT | (VTPARSE_STATE_DCS_INTERMEDIATE << 4), +/*45 */ VTPARSE_ACTION_COLLECT | (VTPARSE_STATE_DCS_INTERMEDIATE << 4), +/*46 */ VTPARSE_ACTION_COLLECT | (VTPARSE_STATE_DCS_INTERMEDIATE << 4), +/*47 */ VTPARSE_ACTION_COLLECT | (VTPARSE_STATE_DCS_INTERMEDIATE << 4), +/*48 */ VTPARSE_ACTION_PARAM | (0 << 4), +/*49 */ VTPARSE_ACTION_PARAM | (0 << 4), +/*50 */ VTPARSE_ACTION_PARAM | (0 << 4), +/*51 */ VTPARSE_ACTION_PARAM | (0 << 4), +/*52 */ VTPARSE_ACTION_PARAM | (0 << 4), +/*53 */ VTPARSE_ACTION_PARAM | (0 << 4), +/*54 */ VTPARSE_ACTION_PARAM | (0 << 4), +/*55 */ VTPARSE_ACTION_PARAM | (0 << 4), +/*56 */ VTPARSE_ACTION_PARAM | (0 << 4), +/*57 */ VTPARSE_ACTION_PARAM | (0 << 4), +/*58 */ 0 | (VTPARSE_STATE_DCS_IGNORE << 4), +/*59 */ VTPARSE_ACTION_PARAM | (0 << 4), +/*60 */ 0 | (VTPARSE_STATE_DCS_IGNORE << 4), +/*61 */ 0 | (VTPARSE_STATE_DCS_IGNORE << 4), +/*62 */ 0 | (VTPARSE_STATE_DCS_IGNORE << 4), +/*63 */ 0 | (VTPARSE_STATE_DCS_IGNORE << 4), +/*64 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*65 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*66 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*67 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*68 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*69 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*70 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*71 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*72 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*73 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*74 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*75 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*76 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*77 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*78 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*79 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*80 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*81 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*82 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*83 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*84 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*85 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*86 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*87 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*88 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*89 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*90 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*91 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*92 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*93 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*94 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*95 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*96 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*97 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*98 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*99 */ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*100*/ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*101*/ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*102*/ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*103*/ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*104*/ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*105*/ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*106*/ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*107*/ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*108*/ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*109*/ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*110*/ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*111*/ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*112*/ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*113*/ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*114*/ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*115*/ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*116*/ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*117*/ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*118*/ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*119*/ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*120*/ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*121*/ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*122*/ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*123*/ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*124*/ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*125*/ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*126*/ 0 | (VTPARSE_STATE_DCS_PASSTHROUGH << 4), +/*127*/ VTPARSE_ACTION_IGNORE | (0 << 4), + }, + { /* VTPARSE_STATE_DCS_PASSTHROUGH */ +/*0 */ VTPARSE_ACTION_PUT | (0 << 4), +/*1 */ VTPARSE_ACTION_PUT | (0 << 4), +/*2 */ VTPARSE_ACTION_PUT | (0 << 4), +/*3 */ VTPARSE_ACTION_PUT | (0 << 4), +/*4 */ VTPARSE_ACTION_PUT | (0 << 4), +/*5 */ VTPARSE_ACTION_PUT | (0 << 4), +/*6 */ VTPARSE_ACTION_PUT | (0 << 4), +/*7 */ VTPARSE_ACTION_PUT | (0 << 4), +/*8 */ VTPARSE_ACTION_PUT | (0 << 4), +/*9 */ VTPARSE_ACTION_PUT | (0 << 4), +/*10 */ VTPARSE_ACTION_PUT | (0 << 4), +/*11 */ VTPARSE_ACTION_PUT | (0 << 4), +/*12 */ VTPARSE_ACTION_PUT | (0 << 4), +/*13 */ VTPARSE_ACTION_PUT | (0 << 4), +/*14 */ VTPARSE_ACTION_PUT | (0 << 4), +/*15 */ VTPARSE_ACTION_PUT | (0 << 4), +/*16 */ VTPARSE_ACTION_PUT | (0 << 4), +/*17 */ VTPARSE_ACTION_PUT | (0 << 4), +/*18 */ VTPARSE_ACTION_PUT | (0 << 4), +/*19 */ VTPARSE_ACTION_PUT | (0 << 4), +/*20 */ VTPARSE_ACTION_PUT | (0 << 4), +/*21 */ VTPARSE_ACTION_PUT | (0 << 4), +/*22 */ VTPARSE_ACTION_PUT | (0 << 4), +/*23 */ VTPARSE_ACTION_PUT | (0 << 4), + 0, +/*25 */ VTPARSE_ACTION_PUT | (0 << 4), + 0, + 0, +/*28 */ VTPARSE_ACTION_PUT | (0 << 4), +/*29 */ VTPARSE_ACTION_PUT | (0 << 4), +/*30 */ VTPARSE_ACTION_PUT | (0 << 4), +/*31 */ VTPARSE_ACTION_PUT | (0 << 4), +/*32 */ VTPARSE_ACTION_PUT | (0 << 4), +/*33 */ VTPARSE_ACTION_PUT | (0 << 4), +/*34 */ VTPARSE_ACTION_PUT | (0 << 4), +/*35 */ VTPARSE_ACTION_PUT | (0 << 4), +/*36 */ VTPARSE_ACTION_PUT | (0 << 4), +/*37 */ VTPARSE_ACTION_PUT | (0 << 4), +/*38 */ VTPARSE_ACTION_PUT | (0 << 4), +/*39 */ VTPARSE_ACTION_PUT | (0 << 4), +/*40 */ VTPARSE_ACTION_PUT | (0 << 4), +/*41 */ VTPARSE_ACTION_PUT | (0 << 4), +/*42 */ VTPARSE_ACTION_PUT | (0 << 4), +/*43 */ VTPARSE_ACTION_PUT | (0 << 4), +/*44 */ VTPARSE_ACTION_PUT | (0 << 4), +/*45 */ VTPARSE_ACTION_PUT | (0 << 4), +/*46 */ VTPARSE_ACTION_PUT | (0 << 4), +/*47 */ VTPARSE_ACTION_PUT | (0 << 4), +/*48 */ VTPARSE_ACTION_PUT | (0 << 4), +/*49 */ VTPARSE_ACTION_PUT | (0 << 4), +/*50 */ VTPARSE_ACTION_PUT | (0 << 4), +/*51 */ VTPARSE_ACTION_PUT | (0 << 4), +/*52 */ VTPARSE_ACTION_PUT | (0 << 4), +/*53 */ VTPARSE_ACTION_PUT | (0 << 4), +/*54 */ VTPARSE_ACTION_PUT | (0 << 4), +/*55 */ VTPARSE_ACTION_PUT | (0 << 4), +/*56 */ VTPARSE_ACTION_PUT | (0 << 4), +/*57 */ VTPARSE_ACTION_PUT | (0 << 4), +/*58 */ VTPARSE_ACTION_PUT | (0 << 4), +/*59 */ VTPARSE_ACTION_PUT | (0 << 4), +/*60 */ VTPARSE_ACTION_PUT | (0 << 4), +/*61 */ VTPARSE_ACTION_PUT | (0 << 4), +/*62 */ VTPARSE_ACTION_PUT | (0 << 4), +/*63 */ VTPARSE_ACTION_PUT | (0 << 4), +/*64 */ VTPARSE_ACTION_PUT | (0 << 4), +/*65 */ VTPARSE_ACTION_PUT | (0 << 4), +/*66 */ VTPARSE_ACTION_PUT | (0 << 4), +/*67 */ VTPARSE_ACTION_PUT | (0 << 4), +/*68 */ VTPARSE_ACTION_PUT | (0 << 4), +/*69 */ VTPARSE_ACTION_PUT | (0 << 4), +/*70 */ VTPARSE_ACTION_PUT | (0 << 4), +/*71 */ VTPARSE_ACTION_PUT | (0 << 4), +/*72 */ VTPARSE_ACTION_PUT | (0 << 4), +/*73 */ VTPARSE_ACTION_PUT | (0 << 4), +/*74 */ VTPARSE_ACTION_PUT | (0 << 4), +/*75 */ VTPARSE_ACTION_PUT | (0 << 4), +/*76 */ VTPARSE_ACTION_PUT | (0 << 4), +/*77 */ VTPARSE_ACTION_PUT | (0 << 4), +/*78 */ VTPARSE_ACTION_PUT | (0 << 4), +/*79 */ VTPARSE_ACTION_PUT | (0 << 4), +/*80 */ VTPARSE_ACTION_PUT | (0 << 4), +/*81 */ VTPARSE_ACTION_PUT | (0 << 4), +/*82 */ VTPARSE_ACTION_PUT | (0 << 4), +/*83 */ VTPARSE_ACTION_PUT | (0 << 4), +/*84 */ VTPARSE_ACTION_PUT | (0 << 4), +/*85 */ VTPARSE_ACTION_PUT | (0 << 4), +/*86 */ VTPARSE_ACTION_PUT | (0 << 4), +/*87 */ VTPARSE_ACTION_PUT | (0 << 4), +/*88 */ VTPARSE_ACTION_PUT | (0 << 4), +/*89 */ VTPARSE_ACTION_PUT | (0 << 4), +/*90 */ VTPARSE_ACTION_PUT | (0 << 4), +/*91 */ VTPARSE_ACTION_PUT | (0 << 4), +/*92 */ VTPARSE_ACTION_PUT | (0 << 4), +/*93 */ VTPARSE_ACTION_PUT | (0 << 4), +/*94 */ VTPARSE_ACTION_PUT | (0 << 4), +/*95 */ VTPARSE_ACTION_PUT | (0 << 4), +/*96 */ VTPARSE_ACTION_PUT | (0 << 4), +/*97 */ VTPARSE_ACTION_PUT | (0 << 4), +/*98 */ VTPARSE_ACTION_PUT | (0 << 4), +/*99 */ VTPARSE_ACTION_PUT | (0 << 4), +/*100*/ VTPARSE_ACTION_PUT | (0 << 4), +/*101*/ VTPARSE_ACTION_PUT | (0 << 4), +/*102*/ VTPARSE_ACTION_PUT | (0 << 4), +/*103*/ VTPARSE_ACTION_PUT | (0 << 4), +/*104*/ VTPARSE_ACTION_PUT | (0 << 4), +/*105*/ VTPARSE_ACTION_PUT | (0 << 4), +/*106*/ VTPARSE_ACTION_PUT | (0 << 4), +/*107*/ VTPARSE_ACTION_PUT | (0 << 4), +/*108*/ VTPARSE_ACTION_PUT | (0 << 4), +/*109*/ VTPARSE_ACTION_PUT | (0 << 4), +/*110*/ VTPARSE_ACTION_PUT | (0 << 4), +/*111*/ VTPARSE_ACTION_PUT | (0 << 4), +/*112*/ VTPARSE_ACTION_PUT | (0 << 4), +/*113*/ VTPARSE_ACTION_PUT | (0 << 4), +/*114*/ VTPARSE_ACTION_PUT | (0 << 4), +/*115*/ VTPARSE_ACTION_PUT | (0 << 4), +/*116*/ VTPARSE_ACTION_PUT | (0 << 4), +/*117*/ VTPARSE_ACTION_PUT | (0 << 4), +/*118*/ VTPARSE_ACTION_PUT | (0 << 4), +/*119*/ VTPARSE_ACTION_PUT | (0 << 4), +/*120*/ VTPARSE_ACTION_PUT | (0 << 4), +/*121*/ VTPARSE_ACTION_PUT | (0 << 4), +/*122*/ VTPARSE_ACTION_PUT | (0 << 4), +/*123*/ VTPARSE_ACTION_PUT | (0 << 4), +/*124*/ VTPARSE_ACTION_PUT | (0 << 4), +/*125*/ VTPARSE_ACTION_PUT | (0 << 4), +/*126*/ VTPARSE_ACTION_PUT | (0 << 4), +/*127*/ VTPARSE_ACTION_IGNORE | (0 << 4), + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, +/*156*/ 0 | (VTPARSE_STATE_GROUND << 4), + }, + { /* VTPARSE_STATE_ESCAPE */ +/*0 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*1 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*2 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*3 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*4 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*5 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*6 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*7 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*8 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*9 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*10 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*11 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*12 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*13 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*14 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*15 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*16 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*17 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*18 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*19 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*20 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*21 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*22 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*23 */ VTPARSE_ACTION_EXECUTE | (0 << 4), + 0, +/*25 */ VTPARSE_ACTION_EXECUTE | (0 << 4), + 0, + 0, +/*28 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*29 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*30 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*31 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*32 */ VTPARSE_ACTION_COLLECT | (VTPARSE_STATE_ESCAPE_INTERMEDIATE << 4), +/*33 */ VTPARSE_ACTION_COLLECT | (VTPARSE_STATE_ESCAPE_INTERMEDIATE << 4), +/*34 */ VTPARSE_ACTION_COLLECT | (VTPARSE_STATE_ESCAPE_INTERMEDIATE << 4), +/*35 */ VTPARSE_ACTION_COLLECT | (VTPARSE_STATE_ESCAPE_INTERMEDIATE << 4), +/*36 */ VTPARSE_ACTION_COLLECT | (VTPARSE_STATE_ESCAPE_INTERMEDIATE << 4), +/*37 */ VTPARSE_ACTION_COLLECT | (VTPARSE_STATE_ESCAPE_INTERMEDIATE << 4), +/*38 */ VTPARSE_ACTION_COLLECT | (VTPARSE_STATE_ESCAPE_INTERMEDIATE << 4), +/*39 */ VTPARSE_ACTION_COLLECT | (VTPARSE_STATE_ESCAPE_INTERMEDIATE << 4), +/*40 */ VTPARSE_ACTION_COLLECT | (VTPARSE_STATE_ESCAPE_INTERMEDIATE << 4), +/*41 */ VTPARSE_ACTION_COLLECT | (VTPARSE_STATE_ESCAPE_INTERMEDIATE << 4), +/*42 */ VTPARSE_ACTION_COLLECT | (VTPARSE_STATE_ESCAPE_INTERMEDIATE << 4), +/*43 */ VTPARSE_ACTION_COLLECT | (VTPARSE_STATE_ESCAPE_INTERMEDIATE << 4), +/*44 */ VTPARSE_ACTION_COLLECT | (VTPARSE_STATE_ESCAPE_INTERMEDIATE << 4), +/*45 */ VTPARSE_ACTION_COLLECT | (VTPARSE_STATE_ESCAPE_INTERMEDIATE << 4), +/*46 */ VTPARSE_ACTION_COLLECT | (VTPARSE_STATE_ESCAPE_INTERMEDIATE << 4), +/*47 */ VTPARSE_ACTION_COLLECT | (VTPARSE_STATE_ESCAPE_INTERMEDIATE << 4), +/*48 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*49 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*50 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*51 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*52 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*53 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*54 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*55 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*56 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*57 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*58 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*59 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*60 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*61 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*62 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*63 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*64 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*65 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*66 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*67 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*68 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*69 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*70 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*71 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*72 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*73 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*74 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*75 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*76 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*77 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*78 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*79 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*80 */ 0 | (VTPARSE_STATE_DCS_ENTRY << 4), +/*81 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*82 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*83 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*84 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*85 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*86 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*87 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*88 */ 0 | (VTPARSE_STATE_SOS_PM_APC_STRING << 4), +/*89 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*90 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*91 */ 0 | (VTPARSE_STATE_CSI_ENTRY << 4), +/*92 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*93 */ 0 | (VTPARSE_STATE_OSC_STRING << 4), +/*94 */ 0 | (VTPARSE_STATE_SOS_PM_APC_STRING << 4), +/*95 */ 0 | (VTPARSE_STATE_SOS_PM_APC_STRING << 4), +/*96 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*97 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*98 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*99 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*100*/ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*101*/ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*102*/ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*103*/ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*104*/ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*105*/ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*106*/ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*107*/ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*108*/ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*109*/ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*110*/ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*111*/ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*112*/ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*113*/ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*114*/ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*115*/ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*116*/ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*117*/ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*118*/ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*119*/ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*120*/ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*121*/ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*122*/ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*123*/ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*124*/ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*125*/ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*126*/ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*127*/ VTPARSE_ACTION_IGNORE | (0 << 4), + }, + { /* VTPARSE_STATE_ESCAPE_INTERMEDIATE */ +/*0 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*1 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*2 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*3 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*4 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*5 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*6 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*7 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*8 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*9 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*10 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*11 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*12 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*13 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*14 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*15 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*16 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*17 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*18 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*19 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*20 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*21 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*22 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*23 */ VTPARSE_ACTION_EXECUTE | (0 << 4), + 0, +/*25 */ VTPARSE_ACTION_EXECUTE | (0 << 4), + 0, + 0, +/*28 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*29 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*30 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*31 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*32 */ VTPARSE_ACTION_COLLECT | (0 << 4), +/*33 */ VTPARSE_ACTION_COLLECT | (0 << 4), +/*34 */ VTPARSE_ACTION_COLLECT | (0 << 4), +/*35 */ VTPARSE_ACTION_COLLECT | (0 << 4), +/*36 */ VTPARSE_ACTION_COLLECT | (0 << 4), +/*37 */ VTPARSE_ACTION_COLLECT | (0 << 4), +/*38 */ VTPARSE_ACTION_COLLECT | (0 << 4), +/*39 */ VTPARSE_ACTION_COLLECT | (0 << 4), +/*40 */ VTPARSE_ACTION_COLLECT | (0 << 4), +/*41 */ VTPARSE_ACTION_COLLECT | (0 << 4), +/*42 */ VTPARSE_ACTION_COLLECT | (0 << 4), +/*43 */ VTPARSE_ACTION_COLLECT | (0 << 4), +/*44 */ VTPARSE_ACTION_COLLECT | (0 << 4), +/*45 */ VTPARSE_ACTION_COLLECT | (0 << 4), +/*46 */ VTPARSE_ACTION_COLLECT | (0 << 4), +/*47 */ VTPARSE_ACTION_COLLECT | (0 << 4), +/*48 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*49 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*50 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*51 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*52 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*53 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*54 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*55 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*56 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*57 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*58 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*59 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*60 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*61 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*62 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*63 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*64 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*65 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*66 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*67 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*68 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*69 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*70 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*71 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*72 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*73 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*74 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*75 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*76 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*77 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*78 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*79 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*80 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*81 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*82 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*83 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*84 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*85 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*86 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*87 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*88 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*89 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*90 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*91 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*92 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*93 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*94 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*95 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*96 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*97 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*98 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*99 */ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*100*/ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*101*/ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*102*/ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*103*/ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*104*/ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*105*/ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*106*/ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*107*/ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*108*/ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*109*/ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*110*/ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*111*/ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*112*/ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*113*/ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*114*/ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*115*/ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*116*/ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*117*/ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*118*/ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*119*/ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*120*/ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*121*/ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*122*/ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*123*/ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*124*/ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*125*/ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*126*/ VTPARSE_ACTION_ESC_DISPATCH | (VTPARSE_STATE_GROUND << 4), +/*127*/ VTPARSE_ACTION_IGNORE | (0 << 4), + }, + { /* VTPARSE_STATE_GROUND */ +/*0 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*1 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*2 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*3 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*4 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*5 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*6 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*7 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*8 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*9 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*10 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*11 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*12 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*13 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*14 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*15 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*16 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*17 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*18 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*19 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*20 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*21 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*22 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*23 */ VTPARSE_ACTION_EXECUTE | (0 << 4), + 0, +/*25 */ VTPARSE_ACTION_EXECUTE | (0 << 4), + 0, + 0, +/*28 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*29 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*30 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*31 */ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*32 */ VTPARSE_ACTION_PRINT | (0 << 4), +/*33 */ VTPARSE_ACTION_PRINT | (0 << 4), +/*34 */ VTPARSE_ACTION_PRINT | (0 << 4), +/*35 */ VTPARSE_ACTION_PRINT | (0 << 4), +/*36 */ VTPARSE_ACTION_PRINT | (0 << 4), +/*37 */ VTPARSE_ACTION_PRINT | (0 << 4), +/*38 */ VTPARSE_ACTION_PRINT | (0 << 4), +/*39 */ VTPARSE_ACTION_PRINT | (0 << 4), +/*40 */ VTPARSE_ACTION_PRINT | (0 << 4), +/*41 */ VTPARSE_ACTION_PRINT | (0 << 4), +/*42 */ VTPARSE_ACTION_PRINT | (0 << 4), +/*43 */ VTPARSE_ACTION_PRINT | (0 << 4), +/*44 */ VTPARSE_ACTION_PRINT | (0 << 4), +/*45 */ VTPARSE_ACTION_PRINT | (0 << 4), +/*46 */ VTPARSE_ACTION_PRINT | (0 << 4), +/*47 */ VTPARSE_ACTION_PRINT | (0 << 4), +/*48 */ VTPARSE_ACTION_PRINT | (0 << 4), +/*49 */ VTPARSE_ACTION_PRINT | (0 << 4), +/*50 */ VTPARSE_ACTION_PRINT | (0 << 4), +/*51 */ VTPARSE_ACTION_PRINT | (0 << 4), +/*52 */ VTPARSE_ACTION_PRINT | (0 << 4), +/*53 */ VTPARSE_ACTION_PRINT | (0 << 4), +/*54 */ VTPARSE_ACTION_PRINT | (0 << 4), +/*55 */ VTPARSE_ACTION_PRINT | (0 << 4), +/*56 */ VTPARSE_ACTION_PRINT | (0 << 4), +/*57 */ VTPARSE_ACTION_PRINT | (0 << 4), +/*58 */ VTPARSE_ACTION_PRINT | (0 << 4), +/*59 */ VTPARSE_ACTION_PRINT | (0 << 4), +/*60 */ VTPARSE_ACTION_PRINT | (0 << 4), +/*61 */ VTPARSE_ACTION_PRINT | (0 << 4), +/*62 */ VTPARSE_ACTION_PRINT | (0 << 4), +/*63 */ VTPARSE_ACTION_PRINT | (0 << 4), +/*64 */ VTPARSE_ACTION_PRINT | (0 << 4), +/*65 */ VTPARSE_ACTION_PRINT | (0 << 4), +/*66 */ VTPARSE_ACTION_PRINT | (0 << 4), +/*67 */ VTPARSE_ACTION_PRINT | (0 << 4), +/*68 */ VTPARSE_ACTION_PRINT | (0 << 4), +/*69 */ VTPARSE_ACTION_PRINT | (0 << 4), +/*70 */ VTPARSE_ACTION_PRINT | (0 << 4), +/*71 */ VTPARSE_ACTION_PRINT | (0 << 4), +/*72 */ VTPARSE_ACTION_PRINT | (0 << 4), +/*73 */ VTPARSE_ACTION_PRINT | (0 << 4), +/*74 */ VTPARSE_ACTION_PRINT | (0 << 4), +/*75 */ VTPARSE_ACTION_PRINT | (0 << 4), +/*76 */ VTPARSE_ACTION_PRINT | (0 << 4), +/*77 */ VTPARSE_ACTION_PRINT | (0 << 4), +/*78 */ VTPARSE_ACTION_PRINT | (0 << 4), +/*79 */ VTPARSE_ACTION_PRINT | (0 << 4), +/*80 */ VTPARSE_ACTION_PRINT | (0 << 4), +/*81 */ VTPARSE_ACTION_PRINT | (0 << 4), +/*82 */ VTPARSE_ACTION_PRINT | (0 << 4), +/*83 */ VTPARSE_ACTION_PRINT | (0 << 4), +/*84 */ VTPARSE_ACTION_PRINT | (0 << 4), +/*85 */ VTPARSE_ACTION_PRINT | (0 << 4), +/*86 */ VTPARSE_ACTION_PRINT | (0 << 4), +/*87 */ VTPARSE_ACTION_PRINT | (0 << 4), +/*88 */ VTPARSE_ACTION_PRINT | (0 << 4), +/*89 */ VTPARSE_ACTION_PRINT | (0 << 4), +/*90 */ VTPARSE_ACTION_PRINT | (0 << 4), +/*91 */ VTPARSE_ACTION_PRINT | (0 << 4), +/*92 */ VTPARSE_ACTION_PRINT | (0 << 4), +/*93 */ VTPARSE_ACTION_PRINT | (0 << 4), +/*94 */ VTPARSE_ACTION_PRINT | (0 << 4), +/*95 */ VTPARSE_ACTION_PRINT | (0 << 4), +/*96 */ VTPARSE_ACTION_PRINT | (0 << 4), +/*97 */ VTPARSE_ACTION_PRINT | (0 << 4), +/*98 */ VTPARSE_ACTION_PRINT | (0 << 4), +/*99 */ VTPARSE_ACTION_PRINT | (0 << 4), +/*100*/ VTPARSE_ACTION_PRINT | (0 << 4), +/*101*/ VTPARSE_ACTION_PRINT | (0 << 4), +/*102*/ VTPARSE_ACTION_PRINT | (0 << 4), +/*103*/ VTPARSE_ACTION_PRINT | (0 << 4), +/*104*/ VTPARSE_ACTION_PRINT | (0 << 4), +/*105*/ VTPARSE_ACTION_PRINT | (0 << 4), +/*106*/ VTPARSE_ACTION_PRINT | (0 << 4), +/*107*/ VTPARSE_ACTION_PRINT | (0 << 4), +/*108*/ VTPARSE_ACTION_PRINT | (0 << 4), +/*109*/ VTPARSE_ACTION_PRINT | (0 << 4), +/*110*/ VTPARSE_ACTION_PRINT | (0 << 4), +/*111*/ VTPARSE_ACTION_PRINT | (0 << 4), +/*112*/ VTPARSE_ACTION_PRINT | (0 << 4), +/*113*/ VTPARSE_ACTION_PRINT | (0 << 4), +/*114*/ VTPARSE_ACTION_PRINT | (0 << 4), +/*115*/ VTPARSE_ACTION_PRINT | (0 << 4), +/*116*/ VTPARSE_ACTION_PRINT | (0 << 4), +/*117*/ VTPARSE_ACTION_PRINT | (0 << 4), +/*118*/ VTPARSE_ACTION_PRINT | (0 << 4), +/*119*/ VTPARSE_ACTION_PRINT | (0 << 4), +/*120*/ VTPARSE_ACTION_PRINT | (0 << 4), +/*121*/ VTPARSE_ACTION_PRINT | (0 << 4), +/*122*/ VTPARSE_ACTION_PRINT | (0 << 4), +/*123*/ VTPARSE_ACTION_PRINT | (0 << 4), +/*124*/ VTPARSE_ACTION_PRINT | (0 << 4), +/*125*/ VTPARSE_ACTION_PRINT | (0 << 4), +/*126*/ VTPARSE_ACTION_PRINT | (0 << 4), +/*127*/ VTPARSE_ACTION_PRINT | (0 << 4), +/*128*/ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*129*/ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*130*/ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*131*/ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*132*/ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*133*/ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*134*/ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*135*/ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*136*/ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*137*/ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*138*/ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*139*/ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*140*/ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*141*/ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*142*/ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*143*/ VTPARSE_ACTION_EXECUTE | (0 << 4), + 0, +/*145*/ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*146*/ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*147*/ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*148*/ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*149*/ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*150*/ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*151*/ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*152*/ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*153*/ VTPARSE_ACTION_EXECUTE | (0 << 4), +/*154*/ VTPARSE_ACTION_EXECUTE | (0 << 4), + 0, +/*156*/ VTPARSE_ACTION_EXECUTE | (0 << 4), + }, + { /* VTPARSE_STATE_OSC_STRING */ +/*0 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*1 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*2 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*3 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*4 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*5 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*6 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*7 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*8 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*9 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*10 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*11 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*12 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*13 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*14 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*15 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*16 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*17 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*18 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*19 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*20 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*21 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*22 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*23 */ VTPARSE_ACTION_IGNORE | (0 << 4), + 0, +/*25 */ VTPARSE_ACTION_IGNORE | (0 << 4), + 0, + 0, +/*28 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*29 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*30 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*31 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*32 */ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*33 */ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*34 */ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*35 */ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*36 */ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*37 */ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*38 */ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*39 */ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*40 */ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*41 */ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*42 */ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*43 */ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*44 */ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*45 */ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*46 */ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*47 */ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*48 */ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*49 */ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*50 */ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*51 */ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*52 */ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*53 */ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*54 */ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*55 */ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*56 */ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*57 */ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*58 */ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*59 */ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*60 */ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*61 */ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*62 */ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*63 */ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*64 */ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*65 */ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*66 */ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*67 */ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*68 */ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*69 */ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*70 */ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*71 */ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*72 */ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*73 */ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*74 */ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*75 */ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*76 */ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*77 */ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*78 */ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*79 */ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*80 */ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*81 */ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*82 */ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*83 */ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*84 */ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*85 */ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*86 */ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*87 */ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*88 */ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*89 */ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*90 */ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*91 */ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*92 */ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*93 */ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*94 */ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*95 */ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*96 */ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*97 */ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*98 */ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*99 */ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*100*/ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*101*/ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*102*/ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*103*/ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*104*/ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*105*/ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*106*/ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*107*/ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*108*/ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*109*/ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*110*/ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*111*/ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*112*/ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*113*/ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*114*/ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*115*/ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*116*/ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*117*/ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*118*/ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*119*/ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*120*/ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*121*/ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*122*/ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*123*/ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*124*/ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*125*/ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*126*/ VTPARSE_ACTION_OSC_PUT | (0 << 4), +/*127*/ VTPARSE_ACTION_OSC_PUT | (0 << 4), + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, +/*156*/ 0 | (VTPARSE_STATE_GROUND << 4), + }, + { /* VTPARSE_STATE_SOS_PM_APC_STRING */ +/*0 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*1 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*2 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*3 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*4 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*5 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*6 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*7 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*8 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*9 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*10 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*11 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*12 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*13 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*14 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*15 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*16 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*17 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*18 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*19 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*20 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*21 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*22 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*23 */ VTPARSE_ACTION_IGNORE | (0 << 4), + 0, +/*25 */ VTPARSE_ACTION_IGNORE | (0 << 4), + 0, + 0, +/*28 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*29 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*30 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*31 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*32 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*33 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*34 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*35 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*36 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*37 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*38 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*39 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*40 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*41 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*42 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*43 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*44 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*45 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*46 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*47 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*48 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*49 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*50 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*51 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*52 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*53 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*54 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*55 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*56 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*57 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*58 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*59 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*60 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*61 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*62 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*63 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*64 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*65 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*66 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*67 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*68 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*69 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*70 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*71 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*72 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*73 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*74 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*75 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*76 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*77 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*78 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*79 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*80 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*81 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*82 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*83 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*84 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*85 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*86 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*87 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*88 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*89 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*90 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*91 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*92 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*93 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*94 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*95 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*96 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*97 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*98 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*99 */ VTPARSE_ACTION_IGNORE | (0 << 4), +/*100*/ VTPARSE_ACTION_IGNORE | (0 << 4), +/*101*/ VTPARSE_ACTION_IGNORE | (0 << 4), +/*102*/ VTPARSE_ACTION_IGNORE | (0 << 4), +/*103*/ VTPARSE_ACTION_IGNORE | (0 << 4), +/*104*/ VTPARSE_ACTION_IGNORE | (0 << 4), +/*105*/ VTPARSE_ACTION_IGNORE | (0 << 4), +/*106*/ VTPARSE_ACTION_IGNORE | (0 << 4), +/*107*/ VTPARSE_ACTION_IGNORE | (0 << 4), +/*108*/ VTPARSE_ACTION_IGNORE | (0 << 4), +/*109*/ VTPARSE_ACTION_IGNORE | (0 << 4), +/*110*/ VTPARSE_ACTION_IGNORE | (0 << 4), +/*111*/ VTPARSE_ACTION_IGNORE | (0 << 4), +/*112*/ VTPARSE_ACTION_IGNORE | (0 << 4), +/*113*/ VTPARSE_ACTION_IGNORE | (0 << 4), +/*114*/ VTPARSE_ACTION_IGNORE | (0 << 4), +/*115*/ VTPARSE_ACTION_IGNORE | (0 << 4), +/*116*/ VTPARSE_ACTION_IGNORE | (0 << 4), +/*117*/ VTPARSE_ACTION_IGNORE | (0 << 4), +/*118*/ VTPARSE_ACTION_IGNORE | (0 << 4), +/*119*/ VTPARSE_ACTION_IGNORE | (0 << 4), +/*120*/ VTPARSE_ACTION_IGNORE | (0 << 4), +/*121*/ VTPARSE_ACTION_IGNORE | (0 << 4), +/*122*/ VTPARSE_ACTION_IGNORE | (0 << 4), +/*123*/ VTPARSE_ACTION_IGNORE | (0 << 4), +/*124*/ VTPARSE_ACTION_IGNORE | (0 << 4), +/*125*/ VTPARSE_ACTION_IGNORE | (0 << 4), +/*126*/ VTPARSE_ACTION_IGNORE | (0 << 4), +/*127*/ VTPARSE_ACTION_IGNORE | (0 << 4), + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, +/*156*/ 0 | (VTPARSE_STATE_GROUND << 4), + }, +}; + +static const vtparse_action_t ENTRY_ACTIONS[] = { + (vtparse_action_t)0 /* none for ANYWHERE */, + VTPARSE_ACTION_CLEAR, /* CSI_ENTRY */ + (vtparse_action_t)0 /* none for CSI_IGNORE */, + (vtparse_action_t)0 /* none for CSI_INTERMEDIATE */, + (vtparse_action_t)0 /* none for CSI_PARAM */, + VTPARSE_ACTION_CLEAR, /* DCS_ENTRY */ + (vtparse_action_t)0 /* none for DCS_IGNORE */, + (vtparse_action_t)0 /* none for DCS_INTERMEDIATE */, + (vtparse_action_t)0 /* none for DCS_PARAM */, + VTPARSE_ACTION_HOOK, /* DCS_PASSTHROUGH */ + VTPARSE_ACTION_CLEAR, /* ESCAPE */ + (vtparse_action_t)0 /* none for ESCAPE_INTERMEDIATE */, + (vtparse_action_t)0 /* none for GROUND */, + VTPARSE_ACTION_OSC_START, /* OSC_STRING */ + (vtparse_action_t)0 /* none for SOS_PM_APC_STRING */, +}; + +static const vtparse_action_t EXIT_ACTIONS[] = { + (vtparse_action_t)0 /* none for ANYWHERE */, + (vtparse_action_t)0 /* none for CSI_ENTRY */, + (vtparse_action_t)0 /* none for CSI_IGNORE */, + (vtparse_action_t)0 /* none for CSI_INTERMEDIATE */, + (vtparse_action_t)0 /* none for CSI_PARAM */, + (vtparse_action_t)0 /* none for DCS_ENTRY */, + (vtparse_action_t)0 /* none for DCS_IGNORE */, + (vtparse_action_t)0 /* none for DCS_INTERMEDIATE */, + (vtparse_action_t)0 /* none for DCS_PARAM */, + VTPARSE_ACTION_UNHOOK, /* DCS_PASSTHROUGH */ + (vtparse_action_t)0 /* none for ESCAPE */, + (vtparse_action_t)0 /* none for ESCAPE_INTERMEDIATE */, + (vtparse_action_t)0 /* none for GROUND */, + VTPARSE_ACTION_OSC_END, /* OSC_STRING */ + (vtparse_action_t)0 /* none for SOS_PM_APC_STRING */, +}; + +state_change_t GET_STATE_TABLE(const int state, const int ch) +{ + return STATE_TABLE[state][ch]; +} + +vtparse_action_t GET_ENTRY_ACTIONS(const int state) +{ + return ENTRY_ACTIONS[state]; +} + +vtparse_action_t GET_EXIT_ACTIONS(const int state) +{ + return EXIT_ACTIONS[state]; +} + +const char *GET_ACTION_NAMES(const int n) +{ + return ACTION_NAMES[n]; +} + +const char *GET_STATE_NAMES(const int n) +{ + return STATE_NAMES[n]; +} +
diff -r 000000000000 -r 7147d6024de8 vtparse_table.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/vtparse_table.h Sun May 22 02:51:35 2011 +0000 @@ -0,0 +1,57 @@ +/** + * @file vtparse_table.h + * @brief VTParse + * @details + * An implementation of Paul Williams' DEC compatible state machine parser + * This code is in the public domain. + * @author Joshua Haberman <joshua@reverberate.org> + */ + +#ifndef VTPARSE_TABLE_H +#define VTPARSE_TABLE_H + +typedef enum { + VTPARSE_STATE_ANYWHERE = 0, + VTPARSE_STATE_CSI_ENTRY = 1, + VTPARSE_STATE_CSI_IGNORE = 2, + VTPARSE_STATE_CSI_INTERMEDIATE = 3, + VTPARSE_STATE_CSI_PARAM = 4, + VTPARSE_STATE_DCS_ENTRY = 5, + VTPARSE_STATE_DCS_IGNORE = 6, + VTPARSE_STATE_DCS_INTERMEDIATE = 7, + VTPARSE_STATE_DCS_PARAM = 8, + VTPARSE_STATE_DCS_PASSTHROUGH = 9, + VTPARSE_STATE_ESCAPE = 10, + VTPARSE_STATE_ESCAPE_INTERMEDIATE = 11, + VTPARSE_STATE_GROUND = 12, + VTPARSE_STATE_OSC_STRING = 13, + VTPARSE_STATE_SOS_PM_APC_STRING = 14, +} vtparse_state_t; + +typedef enum { + VTPARSE_ACTION_CLEAR = 1, + VTPARSE_ACTION_COLLECT = 2, + VTPARSE_ACTION_CSI_DISPATCH = 3, + VTPARSE_ACTION_ESC_DISPATCH = 4, + VTPARSE_ACTION_EXECUTE = 5, + VTPARSE_ACTION_HOOK = 6, + VTPARSE_ACTION_IGNORE = 7, + VTPARSE_ACTION_OSC_END = 8, + VTPARSE_ACTION_OSC_PUT = 9, + VTPARSE_ACTION_OSC_START = 10, + VTPARSE_ACTION_PARAM = 11, + VTPARSE_ACTION_PRINT = 12, + VTPARSE_ACTION_PUT = 13, + VTPARSE_ACTION_UNHOOK = 14, +} vtparse_action_t; + +typedef unsigned char state_change_t; + +state_change_t GET_STATE_TABLE(const int state, const int ch); +vtparse_action_t GET_ENTRY_ACTIONS(const int state); +vtparse_action_t GET_EXIT_ACTIONS(const int state); +const char *GET_ACTION_NAMES(const int n); +const char *GET_STATE_NAMES(const int n); + +#endif +