| Новости | FAQ | Авторы | Документация | В действии | Библиотека |
| Инструменты | Полезные ссылки | Хостинги | Скачать | Примеры | Форум |
Александр Петросян (PAF) 21.12.2005 17:20
как работает компилятор кода на языке Parser в внутренний байт-код?static const short yytable[] = { 15,
10, 18, 143, 51, 104, 42, -102, 84, 109, 1,
15, 89, 18, 80, 63, 72, 52, 53, 252, 73,
55, 1, 74, 55, 253, 81, 21, 84, 70, 2,
141, 110, 111, 112, 113, 244, 114, 115, 87, 80,
82, 240, 116, 117, 80, 22, 61, 67, 42, 118,
119, 81, 2, 22, 71, -171, 120, 3, -101, 15,
121, 18, 4, 4, 122, 123, 22, 56, 79, 3,
56, 106, 15, 108, 18, 4, 83, 57, 3, 94,
98, 101, 86, 3, 4, 250, 201, 190, 251, 4это часть компилятора нашего с вами языка.rule 8 control_method -> '@' STRING '\n' maybe_control_strings
rule 17 code_method -> '@' STRING bracketed_maybe_strings maybe_bracketed_strings maybe_comment '\n' @1 maybe_codes
...
state 2
control_method -> '@' . STRING '\n' maybe_control_strings (rule 8)
code_method -> '@' . STRING bracketed_maybe_strings maybe_bracketed_strings maybe_comment '\n' @1 maybe_codes (rule 17)
STRING shift, and go to state 21
...
state 21
control_method -> '@' STRING . '\n' maybe_control_strings (rule 8)
code_method -> '@' STRING . bracketed_maybe_strings maybe_bracketed_strings maybe_comment '\n' @1 maybe_codes (rule 17)
'\n' shift, and go to state 52
'[' shift, and go to state 53
bracketed_maybe_strings go to state 54
state 52
control_method -> '@' STRING '\n' . maybe_control_strings (rule 8)
STRING shift, and go to state 89
$default reduce using rule 171 (empty)
maybe_control_strings go to state 90
control_strings go to state 91
control_string go to state 92
maybe_string go to state 93
empty go to state 94
state 53
bracketed_maybe_strings -> '[' . maybe_strings ']' (rule 20)
STRING shift, and go to state 95
$default reduce using rule 171 (empty)
maybe_strings go to state 96
strings go to state 97
empty go to state 98