Update
This commit is contained in:
parent
0b0d55bb15
commit
b90dadc3c5
|
@ -9,7 +9,7 @@ int main()
|
|||
nasal_lexer lex;
|
||||
nasal_parser pas;
|
||||
std::string command;
|
||||
std::cout<<">> nasal script interpreter by ValKmjolnir"<<std::endl;
|
||||
std::cout<<">> Nasal interpreter by ValKmjolnir"<<std::endl;
|
||||
std::cout<<">> input \"help\" to find help."<<std::endl;
|
||||
std::cout<<">> Be careful: this interpreter uses strict methods to check if there's an error."<<std::endl;
|
||||
std::cout<<" Always add \";\" after each statement (except loop and if-else)."<<std::endl;
|
||||
|
|
|
@ -43,14 +43,14 @@ enum token_type
|
|||
__call_list,
|
||||
__call_hash,
|
||||
__definition,
|
||||
__assignment,
|
||||
__assignment,__pre_assignment,
|
||||
__calculation,
|
||||
__loop,
|
||||
__choose,__if_choose,__elsif_choose,__else_choose,
|
||||
__program
|
||||
};
|
||||
|
||||
const int max_len=10;
|
||||
const int max_len=15;
|
||||
struct cmp_seq
|
||||
{
|
||||
int tokens[max_len];
|
||||
|
@ -59,369 +59,591 @@ struct cmp_seq
|
|||
// must put in a reverse way
|
||||
cmp_seq par[]=
|
||||
{
|
||||
{{__program,__statement}, __program},
|
||||
{{__program,__statements}, __program},
|
||||
{{__program,__statement}, __program},
|
||||
{{__program,__statements}, __program},
|
||||
|
||||
{{__elsif_choose,__elsif_choose}, __elsif_choose},
|
||||
{{__else_choose,__elsif_choose,__if_choose}, __choose},
|
||||
{{__else_choose,__if_choose}, __choose},
|
||||
{{__elsif_choose,__if_choose}, __choose},
|
||||
{{__if_choose}, __choose},// ?
|
||||
{{__elsif_choose,__elsif_choose}, __elsif_choose},
|
||||
{{__else_choose,__elsif_choose,__if_choose}, __choose},
|
||||
{{__else_choose,__if_choose}, __choose},
|
||||
{{__elsif_choose,__if_choose}, __choose},
|
||||
{{__if_choose}, __choose},// ?
|
||||
|
||||
{{__statement,__right_curve,__id,__semi,__calculation,__statement,__left_curve,__for}, __loop},
|
||||
{{__right_brace,__statement,__left_brace,__right_curve,__id,__semi,__calculation,__statement,__left_curve,__for}, __loop},
|
||||
{{__right_brace,__statements,__left_brace,__right_curve,__id,__semi,__calculation,__statement,__left_curve,__for}, __loop},
|
||||
{{__statement,__right_curve,__id,__semi,__calculation,__statement,__left_curve,__for}, __loop},
|
||||
{{__right_brace,__statement,__left_brace,__right_curve,__id,__semi,__calculation,__statement,__left_curve,__for}, __loop},
|
||||
{{__right_brace,__statements,__left_brace,__right_curve,__id,__semi,__calculation,__statement,__left_curve,__for}, __loop},
|
||||
|
||||
{{__statement,__right_curve,__calculation,__while_head}, __loop},
|
||||
{{__right_brace,__statement,__left_brace,__right_curve,__calculation,__while_head}, __loop},
|
||||
{{__right_brace,__statements,__left_brace,__right_curve,__calculation,__while_head}, __loop},
|
||||
{{__statement,__right_curve,__calculation,__while_head}, __loop},
|
||||
{{__right_brace,__statement,__left_brace,__right_curve,__calculation,__while_head}, __loop},
|
||||
{{__right_brace,__statements,__left_brace,__right_curve,__calculation,__while_head}, __loop},
|
||||
|
||||
{{__statement,__right_curve,__id,__semi,__id,__left_curve,__forindex}, __loop},
|
||||
{{__right_brace,__statement,__left_brace,__right_curve,__id,__semi,__id,__left_curve,__forindex}, __loop},
|
||||
{{__right_brace,__statements,__left_brace,__right_curve,__id,__semi,__id,__left_curve,__forindex},__loop},
|
||||
{{__statement,__right_curve,__id,__semi,__id,__left_curve,__forindex}, __loop},
|
||||
{{__right_brace,__statement,__left_brace,__right_curve,__id,__semi,__id,__left_curve,__forindex}, __loop},
|
||||
{{__right_brace,__statements,__left_brace,__right_curve,__id,__semi,__id,__left_curve,__forindex}, __loop},
|
||||
|
||||
{{__statement,__right_curve,__id,__semi,__id,__left_curve,__foreach}, __loop},
|
||||
{{__right_brace,__statement,__left_brace,__right_curve,__id,__semi,__id,__left_curve,__foreach}, __loop},
|
||||
{{__right_brace,__statements,__left_brace,__right_curve,__id,__semi,__id,__left_curve,__foreach}, __loop},
|
||||
{{__statement,__right_curve,__id,__semi,__id,__left_curve,__foreach}, __loop},
|
||||
{{__right_brace,__statement,__left_brace,__right_curve,__id,__semi,__id,__left_curve,__foreach}, __loop},
|
||||
{{__right_brace,__statements,__left_brace,__right_curve,__id,__semi,__id,__left_curve,__foreach}, __loop},
|
||||
|
||||
{{__statement,__right_curve,__calculation,__if_head}, __if_choose},
|
||||
{{__right_brace,__statement,__left_brace,__right_curve,__calculation,__if_head}, __if_choose},
|
||||
{{__right_brace,__statements,__left_brace,__right_curve,__calculation,__if_head}, __if_choose},
|
||||
{{__right_brace,__left_brace,__right_curve,__calculation,__if_head}, __if_choose},
|
||||
{{__statement,__right_curve,__calculation,__elsif_head}, __elsif_choose},
|
||||
{{__right_brace,__statement,__left_brace,__right_curve,__calculation,__elsif_head}, __elsif_choose},
|
||||
{{__right_brace,__statements,__left_brace,__right_curve,__calculation,__elsif_head}, __elsif_choose},
|
||||
{{__right_brace,__left_brace,__right_curve,__calculation,__elsif_head}, __elsif_choose},
|
||||
{{__statement,__right_curve,__calculation,__if_head,__else}, __elsif_choose},
|
||||
{{__right_brace,__statement,__left_brace,__right_curve,__calculation,__if_head,__else}, __elsif_choose},
|
||||
{{__right_brace,__statements,__left_brace,__right_curve,__calculation,__if_head,__else}, __elsif_choose},
|
||||
{{__right_brace,__left_brace,__right_curve,__calculation,__if_head,__else}, __elsif_choose},
|
||||
{{__statement,__else}, __else_choose},
|
||||
{{__right_brace,__statement,__left_brace,__else}, __else_choose},
|
||||
{{__right_brace,__statements,__left_brace,__else}, __else_choose},
|
||||
{{__right_brace,__left_brace,__else}, __else_choose},
|
||||
{{__statement,__right_curve,__calculation,__if_head}, __if_choose},
|
||||
{{__right_brace,__statement,__left_brace,__right_curve,__calculation,__if_head}, __if_choose},
|
||||
{{__right_brace,__statements,__left_brace,__right_curve,__calculation,__if_head}, __if_choose},
|
||||
{{__right_brace,__left_brace,__right_curve,__calculation,__if_head}, __if_choose},
|
||||
{{__statement,__right_curve,__calculation,__elsif_head}, __elsif_choose},
|
||||
{{__right_brace,__statement,__left_brace,__right_curve,__calculation,__elsif_head}, __elsif_choose},
|
||||
{{__right_brace,__statements,__left_brace,__right_curve,__calculation,__elsif_head}, __elsif_choose},
|
||||
{{__right_brace,__left_brace,__right_curve,__calculation,__elsif_head}, __elsif_choose},
|
||||
{{__statement,__right_curve,__calculation,__if_head,__else}, __elsif_choose},
|
||||
{{__right_brace,__statement,__left_brace,__right_curve,__calculation,__if_head,__else}, __elsif_choose},
|
||||
{{__right_brace,__statements,__left_brace,__right_curve,__calculation,__if_head,__else}, __elsif_choose},
|
||||
{{__right_brace,__left_brace,__right_curve,__calculation,__if_head,__else}, __elsif_choose},
|
||||
{{__statement,__else}, __else_choose},
|
||||
{{__right_brace,__statement,__left_brace,__else}, __else_choose},
|
||||
{{__right_brace,__statements,__left_brace,__else}, __else_choose},
|
||||
{{__right_brace,__left_brace,__else}, __else_choose},
|
||||
|
||||
{{__semi,__semi}, __semi},
|
||||
{{__semi,__semi}, __semi},
|
||||
|
||||
{{__id,__dot,__id}, __call_hash},
|
||||
{{__id,__dot,__call_hash}, __call_hash},
|
||||
{{__id,__dot,__call_list}, __call_hash},
|
||||
{{__id,__dot,__call_function}, __call_hash},
|
||||
{{__id,__dot,__id}, __call_hash},
|
||||
{{__id,__dot,__call_hash}, __call_hash},
|
||||
{{__id,__dot,__call_list}, __call_hash},
|
||||
{{__id,__dot,__call_function}, __call_hash},
|
||||
|
||||
{{__call_hash,__dot,__id}, __call_hash},
|
||||
{{__call_hash,__dot,__call_list}, __call_hash},
|
||||
{{__call_hash,__dot,__call_function}, __call_hash},
|
||||
{{__call_hash,__dot,__id}, __call_hash},
|
||||
{{__call_hash,__dot,__call_list}, __call_hash},
|
||||
{{__call_hash,__dot,__call_function}, __call_hash},
|
||||
|
||||
{{__call_function,__dot,__id}, __call_hash},
|
||||
{{__call_function,__dot,__call_list}, __call_hash},
|
||||
{{__call_function,__dot,__call_function}, __call_hash},
|
||||
{{__call_function,__dot,__id}, __call_hash},
|
||||
{{__call_function,__dot,__call_list}, __call_hash},
|
||||
{{__call_function,__dot,__call_function}, __call_hash},
|
||||
|
||||
{{__call_list,__dot,__id}, __call_hash},
|
||||
{{__call_list,__dot,__call_list}, __call_hash},
|
||||
{{__call_list,__dot,__call_function}, __call_hash},
|
||||
{{__call_list,__dot,__id}, __call_hash},
|
||||
{{__call_list,__dot,__call_list}, __call_hash},
|
||||
{{__call_list,__dot,__call_function}, __call_hash},
|
||||
|
||||
{{__right_brace,__call_function,__semi}, __right_brace},
|
||||
{{__semi,__call_function,__semi}, __semi},
|
||||
{{__right_brace,__call_function,__semi}, __right_brace},
|
||||
{{__semi,__call_function,__semi}, __semi},
|
||||
|
||||
{{__right_curve,__data_list,__call_func_head}, __call_function},
|
||||
{{__right_curve,__scalar_list,__call_func_head}, __call_function},
|
||||
{{__right_curve,__id,__call_func_head}, __call_function},
|
||||
{{__right_curve,__call_func_head}, __call_function},
|
||||
{{__right_curve,__data_list,__call_func_head}, __call_function},
|
||||
{{__right_curve,__scalar_list,__call_func_head}, __call_function},
|
||||
{{__right_curve,__id,__call_func_head}, __call_function},
|
||||
{{__right_curve,__call_hash,__call_func_head}, __call_function},
|
||||
{{__right_curve,__call_list,__call_func_head}, __call_function},
|
||||
{{__right_curve,__number,__call_func_head}, __call_function},
|
||||
{{__right_curve,__function,__call_func_head}, __call_function},
|
||||
{{__right_curve,__string,__call_func_head}, __call_function},
|
||||
{{__right_curve,__char,__call_func_head}, __call_function},
|
||||
{{__right_curve,__calculation,__call_func_head}, __call_function},
|
||||
{{__right_curve,__call_func_head}, __call_function},
|
||||
|
||||
{{__right_brace,__left_brace,__right_curve,__data_list,__func_head}, __function},
|
||||
{{__right_brace,__left_brace,__right_curve,__id,__func_head}, __function},
|
||||
{{__right_brace,__left_brace,__right_curve,__dynamic_id,__func_head}, __function},
|
||||
{{__right_brace,__left_brace,__right_curve,__func_head}, __function},
|
||||
{{__right_brace,__left_brace,__right_curve,__data_list,__func_head}, __function},
|
||||
{{__right_brace,__left_brace,__right_curve,__id,__func_head}, __function},
|
||||
{{__right_brace,__left_brace,__right_curve,__dynamic_id,__func_head}, __function},
|
||||
{{__right_brace,__left_brace,__right_curve,__func_head}, __function},
|
||||
|
||||
{{__right_brace,__statement,__left_brace,__right_curve,__data_list,__func_head}, __function},
|
||||
{{__right_brace,__statement,__left_brace,__right_curve,__id,__func_head}, __function},
|
||||
{{__right_brace,__statement,__left_brace,__right_curve,__dynamic_id,__func_head}, __function},
|
||||
{{__right_brace,__statement,__left_brace,__right_curve,__func_head}, __function},
|
||||
{{__right_brace,__statement,__left_brace,__right_curve,__data_list,__func_head}, __function},
|
||||
{{__right_brace,__statement,__left_brace,__right_curve,__id,__func_head}, __function},
|
||||
{{__right_brace,__statement,__left_brace,__right_curve,__dynamic_id,__func_head}, __function},
|
||||
{{__right_brace,__statement,__left_brace,__right_curve,__func_head}, __function},
|
||||
|
||||
{{__right_brace,__statements,__left_brace,__right_curve,__data_list,__func_head}, __function},
|
||||
{{__right_brace,__statements,__left_brace,__right_curve,__id,__func_head}, __function},
|
||||
{{__right_brace,__statements,__left_brace,__right_curve,__dynamic_id,__func_head}, __function},
|
||||
{{__right_brace,__statements,__left_brace,__right_curve,__func_head}, __function},
|
||||
{{__right_brace,__statements,__left_brace,__right_curve,__data_list,__func_head}, __function},
|
||||
{{__right_brace,__statements,__left_brace,__right_curve,__id,__func_head}, __function},
|
||||
{{__right_brace,__statements,__left_brace,__right_curve,__dynamic_id,__func_head}, __function},
|
||||
{{__right_brace,__statements,__left_brace,__right_curve,__func_head}, __function},
|
||||
|
||||
{{__right_bracket,__number,__call_list_head}, __call_list},
|
||||
{{__right_bracket,__call_function,__call_list_head}, __call_list},
|
||||
{{__right_bracket,__call_list,__call_list_head}, __call_list},
|
||||
{{__right_bracket,__call_hash,__call_list_head}, __call_list},
|
||||
{{__list,__call_function}, __call_list},
|
||||
{{__right_bracket,__number,__call_list_head}, __call_list},
|
||||
{{__right_bracket,__call_function,__call_list_head}, __call_list},
|
||||
{{__right_bracket,__call_list,__call_list_head}, __call_list},
|
||||
{{__right_bracket,__call_hash,__call_list_head}, __call_list},
|
||||
{{__list,__call_function}, __call_list},
|
||||
|
||||
{{__id,__comma,__id}, __data_list},
|
||||
{{__data_list,__comma,__id}, __data_list},
|
||||
{{__id,__comma,__id}, __data_list},
|
||||
{{__data_list,__comma,__id}, __data_list},
|
||||
|
||||
{{__number,__comma,__number}, __scalar_list},
|
||||
{{__number,__comma,__string}, __scalar_list},
|
||||
{{__number,__comma,__char}, __scalar_list},
|
||||
{{__number,__comma,__id}, __scalar_list},
|
||||
{{__string,__comma,__number}, __scalar_list},
|
||||
{{__string,__comma,__string}, __scalar_list},
|
||||
{{__string,__comma,__char}, __scalar_list},
|
||||
{{__string,__comma,__id}, __scalar_list},
|
||||
{{__char,__comma,__number}, __scalar_list},
|
||||
{{__char,__comma,__string}, __scalar_list},
|
||||
{{__char,__comma,__char}, __scalar_list},
|
||||
{{__char,__comma,__id}, __scalar_list},
|
||||
{{__scalar_list,__comma,__number}, __scalar_list},
|
||||
{{__scalar_list,__comma,__string}, __scalar_list},
|
||||
{{__scalar_list,__comma,__char}, __scalar_list},
|
||||
{{__scalar_list,__comma,__id}, __scalar_list},
|
||||
{{__data_list,__comma,__number}, __scalar_list},
|
||||
{{__data_list,__comma,__string}, __scalar_list},
|
||||
{{__data_list,__comma,__char}, __scalar_list},
|
||||
{{__number,__comma,__number}, __scalar_list},
|
||||
{{__number,__comma,__string}, __scalar_list},
|
||||
{{__number,__comma,__char}, __scalar_list},
|
||||
{{__number,__comma,__id}, __scalar_list},
|
||||
{{__number,__comma,__call_list}, __scalar_list},
|
||||
{{__number,__comma,__call_hash}, __scalar_list},
|
||||
{{__number,__comma,__function}, __scalar_list},
|
||||
{{__number,__comma,__calculation}, __scalar_list},
|
||||
{{__string,__comma,__number}, __scalar_list},
|
||||
{{__string,__comma,__string}, __scalar_list},
|
||||
{{__string,__comma,__char}, __scalar_list},
|
||||
{{__string,__comma,__id}, __scalar_list},
|
||||
{{__string,__comma,__call_list}, __scalar_list},
|
||||
{{__string,__comma,__call_hash}, __scalar_list},
|
||||
{{__string,__comma,__function}, __scalar_list},
|
||||
{{__string,__comma,__calculation}, __scalar_list},
|
||||
{{__char,__comma,__number}, __scalar_list},
|
||||
{{__char,__comma,__string}, __scalar_list},
|
||||
{{__char,__comma,__char}, __scalar_list},
|
||||
{{__char,__comma,__id}, __scalar_list},
|
||||
{{__char,__comma,__call_list}, __scalar_list},
|
||||
{{__char,__comma,__call_hash}, __scalar_list},
|
||||
{{__char,__comma,__function}, __scalar_list},
|
||||
{{__char,__comma,__calculation}, __scalar_list},
|
||||
|
||||
{{__right_bracket,__scalar_list,__left_bracket}, __list},
|
||||
{{__right_bracket,__number,__left_bracket}, __list},
|
||||
{{__right_bracket,__string,__left_bracket}, __list},
|
||||
{{__right_bracket,__char,__left_bracket}, __list},
|
||||
{{__call_list,__comma,__number}, __scalar_list},
|
||||
{{__call_list,__comma,__string}, __scalar_list},
|
||||
{{__call_list,__comma,__char}, __scalar_list},
|
||||
{{__call_list,__comma,__id}, __scalar_list},
|
||||
{{__call_list,__comma,__call_list}, __scalar_list},
|
||||
{{__call_list,__comma,__call_hash}, __scalar_list},
|
||||
{{__call_list,__comma,__function}, __scalar_list},
|
||||
{{__call_list,__comma,__calculation}, __scalar_list},
|
||||
|
||||
{{__number,__colon,__id}, __hash_member},
|
||||
{{__string,__colon,__id}, __hash_member},
|
||||
{{__char,__colon,__id}, __hash_member},
|
||||
{{__hash_member,__comma,__hash_member}, __hash_member_list},
|
||||
{{__hash_member_list,__comma,__hash_member}, __hash_member_list},
|
||||
{{__call_hash,__comma,__number}, __scalar_list},
|
||||
{{__call_hash,__comma,__string}, __scalar_list},
|
||||
{{__call_hash,__comma,__char}, __scalar_list},
|
||||
{{__call_hash,__comma,__id}, __scalar_list},
|
||||
{{__call_hash,__comma,__call_list}, __scalar_list},
|
||||
{{__call_hash,__comma,__call_hash}, __scalar_list},
|
||||
{{__call_hash,__comma,__function}, __scalar_list},
|
||||
{{__call_hash,__comma,__calculation}, __scalar_list},
|
||||
|
||||
{{__right_brace,__hash_member,__left_brace}, __hash},
|
||||
{{__right_brace,__hash_member_list,__left_brace}, __hash},
|
||||
{{__function,__comma,__number}, __scalar_list},
|
||||
{{__function,__comma,__string}, __scalar_list},
|
||||
{{__function,__comma,__char}, __scalar_list},
|
||||
{{__function,__comma,__id}, __scalar_list},
|
||||
{{__function,__comma,__call_list}, __scalar_list},
|
||||
{{__function,__comma,__call_hash}, __scalar_list},
|
||||
{{__function,__comma,__function}, __scalar_list},
|
||||
{{__function,__comma,__calculation}, __scalar_list},
|
||||
|
||||
{{__calculation,__add_operator,__calculation}, __calculation},
|
||||
{{__calculation,__add_operator,__id}, __calculation},
|
||||
{{__id,__add_operator,__calculation}, __calculation},
|
||||
{{__id,__add_operator,__id}, __calculation},
|
||||
{{__calculation,__comma,__number}, __scalar_list},
|
||||
{{__calculation,__comma,__string}, __scalar_list},
|
||||
{{__calculation,__comma,__char}, __scalar_list},
|
||||
{{__calculation,__comma,__id}, __scalar_list},
|
||||
{{__calculation,__comma,__call_list}, __scalar_list},
|
||||
{{__calculation,__comma,__call_hash}, __scalar_list},
|
||||
{{__calculation,__comma,__function}, __scalar_list},
|
||||
{{__calculation,__comma,__calculation}, __scalar_list},
|
||||
|
||||
{{__calculation,__sub_operator,__calculation}, __calculation},
|
||||
{{__calculation,__sub_operator,__id}, __calculation},
|
||||
{{__id,__sub_operator,__calculation}, __calculation},
|
||||
{{__id,__sub_operator,__id}, __calculation},
|
||||
{{__scalar_list,__comma,__number}, __scalar_list},
|
||||
{{__scalar_list,__comma,__string}, __scalar_list},
|
||||
{{__scalar_list,__comma,__char}, __scalar_list},
|
||||
{{__scalar_list,__comma,__id}, __scalar_list},
|
||||
{{__scalar_list,__comma,__call_list}, __scalar_list},
|
||||
{{__scalar_list,__comma,__call_hash}, __scalar_list},
|
||||
{{__scalar_list,__comma,__function}, __scalar_list},
|
||||
{{__scalar_list,__comma,__calculation}, __scalar_list},
|
||||
{{__data_list,__comma,__number}, __scalar_list},
|
||||
{{__data_list,__comma,__string}, __scalar_list},
|
||||
{{__data_list,__comma,__char}, __scalar_list},
|
||||
{{__data_list,__comma,__call_list}, __scalar_list},
|
||||
{{__data_list,__comma,__call_hash}, __scalar_list},
|
||||
{{__data_list,__comma,__function}, __scalar_list},
|
||||
{{__data_list,__comma,__calculation}, __scalar_list},
|
||||
|
||||
{{__calculation,__mul_operator,__calculation}, __calculation},
|
||||
{{__calculation,__mul_operator,__id}, __calculation},
|
||||
{{__id,__mul_operator,__calculation}, __calculation},
|
||||
{{__id,__mul_operator,__id}, __calculation},
|
||||
{{__right_bracket,__scalar_list,__left_bracket}, __list},
|
||||
{{__right_bracket,__number,__left_bracket}, __list},
|
||||
{{__right_bracket,__string,__left_bracket}, __list},
|
||||
{{__right_bracket,__char,__left_bracket}, __list},
|
||||
|
||||
{{__calculation,__div_operator,__calculation}, __calculation},
|
||||
{{__calculation,__div_operator,__id}, __calculation},
|
||||
{{__id,__div_operator,__calculation}, __calculation},
|
||||
{{__id,__div_operator,__id}, __calculation},
|
||||
{{__number,__colon,__id}, __hash_member},
|
||||
{{__string,__colon,__id}, __hash_member},
|
||||
{{__char,__colon,__id}, __hash_member},
|
||||
{{__hash_member,__comma,__hash_member}, __hash_member_list},
|
||||
{{__hash_member_list,__comma,__hash_member}, __hash_member_list},
|
||||
|
||||
{{__calculation,__link_operator,__calculation}, __calculation},
|
||||
{{__calculation,__link_operator,__id}, __calculation},
|
||||
{{__id,__link_operator,__calculation}, __calculation},
|
||||
{{__id,__link_operator,__id}, __calculation},
|
||||
{{__right_brace,__hash_member,__left_brace}, __hash},
|
||||
{{__right_brace,__hash_member_list,__left_brace}, __hash},
|
||||
|
||||
{{__calculation,__cmp_equal,__calculation}, __calculation},
|
||||
{{__calculation,__cmp_equal,__id}, __calculation},
|
||||
{{__id,__cmp_equal,__calculation}, __calculation},
|
||||
{{__id,__cmp_equal,__id}, __calculation},
|
||||
{{__calculation,__add_operator,__calculation}, __calculation},
|
||||
{{__calculation,__add_operator,__id}, __calculation},
|
||||
{{__id,__add_operator,__calculation}, __calculation},
|
||||
{{__id,__add_operator,__id}, __calculation},
|
||||
|
||||
{{__calculation,__cmp_not_equal,__calculation}, __calculation},
|
||||
{{__calculation,__cmp_not_equal,__id}, __calculation},
|
||||
{{__id,__cmp_not_equal,__calculation}, __calculation},
|
||||
{{__id,__cmp_not_equal,__id}, __calculation},
|
||||
{{__calculation,__sub_operator,__calculation}, __calculation},
|
||||
{{__calculation,__sub_operator,__id}, __calculation},
|
||||
{{__id,__sub_operator,__calculation}, __calculation},
|
||||
{{__id,__sub_operator,__id}, __calculation},
|
||||
|
||||
{{__calculation,__cmp_less,__calculation}, __calculation},
|
||||
{{__calculation,__cmp_less,__id}, __calculation},
|
||||
{{__id,__cmp_less,__calculation}, __calculation},
|
||||
{{__id,__cmp_less,__id}, __calculation},
|
||||
{{__calculation,__mul_operator,__calculation}, __calculation},
|
||||
{{__calculation,__mul_operator,__id}, __calculation},
|
||||
{{__id,__mul_operator,__calculation}, __calculation},
|
||||
{{__id,__mul_operator,__id}, __calculation},
|
||||
|
||||
{{__calculation,__cmp_less_or_equal,__calculation}, __calculation},
|
||||
{{__calculation,__cmp_less_or_equal,__id}, __calculation},
|
||||
{{__id,__cmp_less_or_equal,__calculation}, __calculation},
|
||||
{{__id,__cmp_less_or_equal,__id}, __calculation},
|
||||
{{__calculation,__div_operator,__calculation}, __calculation},
|
||||
{{__calculation,__div_operator,__id}, __calculation},
|
||||
{{__id,__div_operator,__calculation}, __calculation},
|
||||
{{__id,__div_operator,__id}, __calculation},
|
||||
|
||||
{{__calculation,__cmp_more,__calculation}, __calculation},
|
||||
{{__calculation,__cmp_more,__id}, __calculation},
|
||||
{{__id,__cmp_more,__calculation}, __calculation},
|
||||
{{__id,__cmp_more,__id}, __calculation},
|
||||
{{__calculation,__link_operator,__calculation}, __calculation},
|
||||
{{__calculation,__link_operator,__id}, __calculation},
|
||||
{{__id,__link_operator,__calculation}, __calculation},
|
||||
{{__id,__link_operator,__id}, __calculation},
|
||||
|
||||
{{__calculation,__cmp_more_or_equal,__calculation}, __calculation},
|
||||
{{__calculation,__cmp_more_or_equal,__id}, __calculation},
|
||||
{{__id,__cmp_more_or_equal,__calculation}, __calculation},
|
||||
{{__id,__cmp_more_or_equal,__id}, __calculation},
|
||||
{{__calculation,__cmp_equal,__calculation}, __calculation},
|
||||
{{__calculation,__cmp_equal,__id}, __calculation},
|
||||
{{__id,__cmp_equal,__calculation}, __calculation},
|
||||
{{__id,__cmp_equal,__id}, __calculation},
|
||||
|
||||
{{__calculation,__cmp_not_equal,__calculation}, __calculation},
|
||||
{{__calculation,__cmp_not_equal,__id}, __calculation},
|
||||
{{__id,__cmp_not_equal,__calculation}, __calculation},
|
||||
{{__id,__cmp_not_equal,__id}, __calculation},
|
||||
|
||||
{{__calculation,__cmp_less,__calculation}, __calculation},
|
||||
{{__calculation,__cmp_less,__id}, __calculation},
|
||||
{{__id,__cmp_less,__calculation}, __calculation},
|
||||
{{__id,__cmp_less,__id}, __calculation},
|
||||
|
||||
{{__calculation,__cmp_less_or_equal,__calculation}, __calculation},
|
||||
{{__calculation,__cmp_less_or_equal,__id}, __calculation},
|
||||
{{__id,__cmp_less_or_equal,__calculation}, __calculation},
|
||||
{{__id,__cmp_less_or_equal,__id}, __calculation},
|
||||
|
||||
{{__calculation,__cmp_more,__calculation}, __calculation},
|
||||
{{__calculation,__cmp_more,__id}, __calculation},
|
||||
{{__id,__cmp_more,__calculation}, __calculation},
|
||||
{{__id,__cmp_more,__id}, __calculation},
|
||||
|
||||
{{__calculation,__cmp_more_or_equal,__calculation}, __calculation},
|
||||
{{__calculation,__cmp_more_or_equal,__id}, __calculation},
|
||||
{{__id,__cmp_more_or_equal,__calculation}, __calculation},
|
||||
{{__id,__cmp_more_or_equal,__id}, __calculation},
|
||||
|
||||
{{__calculation,__and_operator,__calculation}, __calculation},
|
||||
{{__calculation,__and_operator,__id}, __calculation},
|
||||
{{__id,__and_operator,__calculation}, __calculation},
|
||||
{{__id,__and_operator,__id}, __calculation},
|
||||
{{__calculation,__and_operator,__calculation}, __calculation},
|
||||
{{__calculation,__and_operator,__id}, __calculation},
|
||||
{{__id,__and_operator,__calculation}, __calculation},
|
||||
{{__id,__and_operator,__id}, __calculation},
|
||||
|
||||
{{__calculation,__or_operator,__calculation}, __calculation},
|
||||
{{__calculation,__or_operator,__id}, __calculation},
|
||||
{{__id,__or_operator,__calculation}, __calculation},
|
||||
{{__id,__or_operator,__id}, __calculation},
|
||||
{{__calculation,__or_operator,__calculation}, __calculation},
|
||||
{{__calculation,__or_operator,__id}, __calculation},
|
||||
{{__id,__or_operator,__calculation}, __calculation},
|
||||
{{__id,__or_operator,__id}, __calculation},
|
||||
|
||||
{{__right_curve,__id,__left_curve}, __calculation},
|
||||
{{__right_curve,__calculation,__left_curve}, __calculation},
|
||||
{{__id,__nor_operator}, __calculation},
|
||||
{{__right_curve,__id,__left_curve}, __calculation},
|
||||
{{__right_curve,__calculation,__left_curve}, __calculation},
|
||||
{{__id,__nor_operator}, __calculation},
|
||||
|
||||
{{__calculation,__add_operator,__number}, __calculation},
|
||||
{{__number,__add_operator,__calculation}, __calculation},
|
||||
{{__number,__add_operator,__number}, __calculation},
|
||||
{{__number,__add_operator,__id}, __calculation},
|
||||
{{__id,__add_operator,__number}, __calculation},
|
||||
{{__calculation,__add_operator,__number}, __calculation},
|
||||
{{__number,__add_operator,__calculation}, __calculation},
|
||||
{{__number,__add_operator,__number}, __calculation},
|
||||
{{__number,__add_operator,__id}, __calculation},
|
||||
{{__id,__add_operator,__number}, __calculation},
|
||||
|
||||
{{__calculation,__sub_operator,__number}, __calculation},
|
||||
{{__number,__sub_operator,__calculation}, __calculation},
|
||||
{{__number,__sub_operator,__number}, __calculation},
|
||||
{{__number,__sub_operator,__id}, __calculation},
|
||||
{{__id,__sub_operator,__number}, __calculation},
|
||||
{{__calculation,__sub_operator,__number}, __calculation},
|
||||
{{__number,__sub_operator,__calculation}, __calculation},
|
||||
{{__number,__sub_operator,__number}, __calculation},
|
||||
{{__number,__sub_operator,__id}, __calculation},
|
||||
{{__id,__sub_operator,__number}, __calculation},
|
||||
|
||||
{{__calculation,__mul_operator,__number}, __calculation},
|
||||
{{__number,__mul_operator,__calculation}, __calculation},
|
||||
{{__number,__mul_operator,__number}, __calculation},
|
||||
{{__number,__mul_operator,__id}, __calculation},
|
||||
{{__id,__mul_operator,__number}, __calculation},
|
||||
{{__calculation,__mul_operator,__number}, __calculation},
|
||||
{{__number,__mul_operator,__calculation}, __calculation},
|
||||
{{__number,__mul_operator,__number}, __calculation},
|
||||
{{__number,__mul_operator,__id}, __calculation},
|
||||
{{__id,__mul_operator,__number}, __calculation},
|
||||
|
||||
{{__calculation,__div_operator,__number}, __calculation},
|
||||
{{__number,__div_operator,__calculation}, __calculation},
|
||||
{{__number,__div_operator,__number}, __calculation},
|
||||
{{__number,__div_operator,__id}, __calculation},
|
||||
{{__id,__div_operator,__number}, __calculation},
|
||||
{{__calculation,__div_operator,__number}, __calculation},
|
||||
{{__number,__div_operator,__calculation}, __calculation},
|
||||
{{__number,__div_operator,__number}, __calculation},
|
||||
{{__number,__div_operator,__id}, __calculation},
|
||||
{{__id,__div_operator,__number}, __calculation},
|
||||
|
||||
{{__calculation,__link_operator,__number}, __calculation},
|
||||
{{__number,__link_operator,__calculation}, __calculation},
|
||||
{{__number,__link_operator,__number}, __calculation},
|
||||
{{__number,__link_operator,__id}, __calculation},
|
||||
{{__id,__link_operator,__number}, __calculation},
|
||||
{{__calculation,__link_operator,__number}, __calculation},
|
||||
{{__number,__link_operator,__calculation}, __calculation},
|
||||
{{__number,__link_operator,__number}, __calculation},
|
||||
{{__number,__link_operator,__id}, __calculation},
|
||||
{{__id,__link_operator,__number}, __calculation},
|
||||
|
||||
{{__calculation,__cmp_equal,__number}, __calculation},
|
||||
{{__number,__cmp_equal,__calculation}, __calculation},
|
||||
{{__number,__cmp_equal,__number}, __calculation},
|
||||
{{__number,__cmp_equal,__id}, __calculation},
|
||||
{{__id,__cmp_equal,__number}, __calculation},
|
||||
{{__calculation,__cmp_equal,__number}, __calculation},
|
||||
{{__number,__cmp_equal,__calculation}, __calculation},
|
||||
{{__number,__cmp_equal,__number}, __calculation},
|
||||
{{__number,__cmp_equal,__id}, __calculation},
|
||||
{{__id,__cmp_equal,__number}, __calculation},
|
||||
|
||||
{{__calculation,__cmp_not_equal,__number}, __calculation},
|
||||
{{__number,__cmp_not_equal,__calculation}, __calculation},
|
||||
{{__number,__cmp_not_equal,__number}, __calculation},
|
||||
{{__number,__cmp_not_equal,__id}, __calculation},
|
||||
{{__id,__cmp_not_equal,__number}, __calculation},
|
||||
{{__calculation,__cmp_not_equal,__number}, __calculation},
|
||||
{{__number,__cmp_not_equal,__calculation}, __calculation},
|
||||
{{__number,__cmp_not_equal,__number}, __calculation},
|
||||
{{__number,__cmp_not_equal,__id}, __calculation},
|
||||
{{__id,__cmp_not_equal,__number}, __calculation},
|
||||
|
||||
{{__calculation,__cmp_less,__number}, __calculation},
|
||||
{{__number,__cmp_less,__calculation}, __calculation},
|
||||
{{__number,__cmp_less,__number}, __calculation},
|
||||
{{__number,__cmp_less,__id}, __calculation},
|
||||
{{__id,__cmp_less,__number}, __calculation},
|
||||
{{__calculation,__cmp_less,__number}, __calculation},
|
||||
{{__number,__cmp_less,__calculation}, __calculation},
|
||||
{{__number,__cmp_less,__number}, __calculation},
|
||||
{{__number,__cmp_less,__id}, __calculation},
|
||||
{{__id,__cmp_less,__number}, __calculation},
|
||||
|
||||
{{__calculation,__cmp_less_or_equal,__number}, __calculation},
|
||||
{{__number,__cmp_less_or_equal,__calculation}, __calculation},
|
||||
{{__number,__cmp_less_or_equal,__number}, __calculation},
|
||||
{{__number,__cmp_less_or_equal,__id}, __calculation},
|
||||
{{__id,__cmp_less_or_equal,__number}, __calculation},
|
||||
{{__calculation,__cmp_less_or_equal,__number}, __calculation},
|
||||
{{__number,__cmp_less_or_equal,__calculation}, __calculation},
|
||||
{{__number,__cmp_less_or_equal,__number}, __calculation},
|
||||
{{__number,__cmp_less_or_equal,__id}, __calculation},
|
||||
{{__id,__cmp_less_or_equal,__number}, __calculation},
|
||||
|
||||
{{__calculation,__cmp_more,__number}, __calculation},
|
||||
{{__number,__cmp_more,__calculation}, __calculation},
|
||||
{{__number,__cmp_more,__number}, __calculation},
|
||||
{{__number,__cmp_more,__id}, __calculation},
|
||||
{{__id,__cmp_more,__number}, __calculation},
|
||||
{{__calculation,__cmp_more,__number}, __calculation},
|
||||
{{__number,__cmp_more,__calculation}, __calculation},
|
||||
{{__number,__cmp_more,__number}, __calculation},
|
||||
{{__number,__cmp_more,__id}, __calculation},
|
||||
{{__id,__cmp_more,__number}, __calculation},
|
||||
|
||||
{{__calculation,__cmp_more_or_equal,__number}, __calculation},
|
||||
{{__number,__cmp_more_or_equal,__calculation}, __calculation},
|
||||
{{__number,__cmp_more_or_equal,__number}, __calculation},
|
||||
{{__number,__cmp_more_or_equal,__id}, __calculation},
|
||||
{{__id,__cmp_more_or_equal,__number}, __calculation},
|
||||
{{__calculation,__cmp_more_or_equal,__number}, __calculation},
|
||||
{{__number,__cmp_more_or_equal,__calculation}, __calculation},
|
||||
{{__number,__cmp_more_or_equal,__number}, __calculation},
|
||||
{{__number,__cmp_more_or_equal,__id}, __calculation},
|
||||
{{__id,__cmp_more_or_equal,__number}, __calculation},
|
||||
|
||||
{{__calculation,__and_operator,__number}, __calculation},
|
||||
{{__number,__and_operator,__calculation}, __calculation},
|
||||
{{__number,__and_operator,__number}, __calculation},
|
||||
{{__number,__and_operator,__id}, __calculation},
|
||||
{{__id,__and_operator,__number}, __calculation},
|
||||
{{__calculation,__and_operator,__number}, __calculation},
|
||||
{{__number,__and_operator,__calculation}, __calculation},
|
||||
{{__number,__and_operator,__number}, __calculation},
|
||||
{{__number,__and_operator,__id}, __calculation},
|
||||
{{__id,__and_operator,__number}, __calculation},
|
||||
|
||||
{{__calculation,__or_operator,__number}, __calculation},
|
||||
{{__number,__or_operator,__calculation}, __calculation},
|
||||
{{__number,__or_operator,__number}, __calculation},
|
||||
{{__number,__or_operator,__id}, __calculation},
|
||||
{{__id,__or_operator,__number}, __calculation},
|
||||
{{__calculation,__or_operator,__number}, __calculation},
|
||||
{{__number,__or_operator,__calculation}, __calculation},
|
||||
{{__number,__or_operator,__number}, __calculation},
|
||||
{{__number,__or_operator,__id}, __calculation},
|
||||
{{__id,__or_operator,__number}, __calculation},
|
||||
|
||||
{{__right_curve,__number,__left_curve}, __calculation},
|
||||
{{__number,__nor_operator}, __calculation},
|
||||
{{__calculation,__add_operator,__call_hash}, __calculation},
|
||||
{{__call_hash,__add_operator,__calculation}, __calculation},
|
||||
{{__call_hash,__add_operator,__call_hash}, __calculation},
|
||||
{{__call_hash,__add_operator,__id}, __calculation},
|
||||
{{__id,__add_operator,__call_hash}, __calculation},
|
||||
|
||||
{{__semi,__calculation,__equal,__id,__var}, __definition},
|
||||
{{__semi,__number,__equal,__id,__var}, __definition},
|
||||
{{__semi,__string,__equal,__id,__var}, __definition},
|
||||
{{__semi,__id,__equal,__id,__var}, __definition},
|
||||
{{__semi,__char,__equal,__id,__var}, __definition},
|
||||
{{__semi,__right_brace,__left_brace,__equal,__id,__var}, __definition},
|
||||
{{__semi,__right_bracket,__left_bracket,__equal,__id,__var}, __definition},
|
||||
{{__semi,__call_function,__equal,__id,__var}, __definition},
|
||||
{{__semi,__call_list,__equal,__id,__var}, __definition},
|
||||
{{__function,__equal,__id,__var}, __definition},
|
||||
{{__semi,__function,__equal,__id,__var}, __definition},
|
||||
{{__semi,__call_hash,__equal,__id,__var}, __definition},
|
||||
{{__semi,__list,__equal,__id,__var}, __definition},
|
||||
{{__semi,__hash,__equal,__id,__var}, __definition},
|
||||
{{__calculation,__sub_operator,__call_hash}, __calculation},
|
||||
{{__call_hash,__sub_operator,__calculation}, __calculation},
|
||||
{{__call_hash,__sub_operator,__call_hash}, __calculation},
|
||||
{{__call_hash,__sub_operator,__id}, __calculation},
|
||||
{{__id,__sub_operator,__call_hash}, __calculation},
|
||||
|
||||
{{__semi,__calculation,__equal,__id}, __assignment},
|
||||
{{__semi,__number,__equal,__id}, __assignment},
|
||||
{{__semi,__string,__equal,__id}, __assignment},
|
||||
{{__semi,__id,__equal,__id}, __assignment},
|
||||
{{__semi,__char,__equal,__id}, __assignment},
|
||||
{{__semi,__right_brace,__left_brace,__equal,__id}, __assignment},
|
||||
{{__semi,__right_bracket,__left_bracket,__equal,__id}, __assignment},
|
||||
{{__semi,__call_function,__equal,__id}, __assignment},
|
||||
{{__semi,__call_list,__equal,__id}, __assignment},
|
||||
{{__function,__equal,__id}, __assignment},
|
||||
{{__semi,__function,__equal,__id}, __assignment},
|
||||
{{__semi,__call_hash,__equal,__id}, __assignment},
|
||||
{{__semi,__list,__equal,__id}, __assignment},
|
||||
{{__semi,__hash,__equal,__id}, __assignment},
|
||||
{{__calculation,__mul_operator,__call_hash}, __calculation},
|
||||
{{__call_hash,__mul_operator,__calculation}, __calculation},
|
||||
{{__call_hash,__mul_operator,__call_hash}, __calculation},
|
||||
{{__call_hash,__mul_operator,__id}, __calculation},
|
||||
{{__id,__mul_operator,__call_hash}, __calculation},
|
||||
|
||||
{{__semi,__calculation,__add_equal,__id}, __assignment},
|
||||
{{__semi,__number,__add_equal,__id}, __assignment},
|
||||
{{__semi,__string,__add_equal,__id}, __assignment},
|
||||
{{__semi,__id,__add_equal,__id}, __assignment},
|
||||
{{__semi,__char,__add_equal,__id}, __assignment},
|
||||
{{__semi,__call_function,__add_equal,__id}, __assignment},
|
||||
{{__semi,__call_list,__add_equal,__id}, __assignment},
|
||||
{{__semi,__call_hash,__add_equal,__id}, __assignment},
|
||||
{{__calculation,__div_operator,__call_hash}, __calculation},
|
||||
{{__call_hash,__div_operator,__calculation}, __calculation},
|
||||
{{__call_hash,__div_operator,__call_hash}, __calculation},
|
||||
{{__call_hash,__div_operator,__id}, __calculation},
|
||||
{{__id,__div_operator,__call_hash}, __calculation},
|
||||
|
||||
{{__semi,__calculation,__sub_equal,__id}, __assignment},
|
||||
{{__semi,__number,__sub_equal,__id}, __assignment},
|
||||
{{__semi,__string,__sub_equal,__id}, __assignment},
|
||||
{{__semi,__id,__sub_equal,__id}, __assignment},
|
||||
{{__semi,__char,__sub_equal,__id}, __assignment},
|
||||
{{__semi,__call_function,__sub_equal,__id}, __assignment},
|
||||
{{__semi,__call_list,__sub_equal,__id}, __assignment},
|
||||
{{__semi,__call_hash,__sub_equal,__id}, __assignment},
|
||||
{{__calculation,__link_operator,__call_hash}, __calculation},
|
||||
{{__call_hash,__link_operator,__calculation}, __calculation},
|
||||
{{__call_hash,__link_operator,__call_hash}, __calculation},
|
||||
{{__call_hash,__link_operator,__id}, __calculation},
|
||||
{{__id,__link_operator,__call_hash}, __calculation},
|
||||
|
||||
{{__semi,__calculation,__mul_equal,__id}, __assignment},
|
||||
{{__semi,__number,__mul_equal,__id}, __assignment},
|
||||
{{__semi,__string,__mul_equal,__id}, __assignment},
|
||||
{{__semi,__id,__mul_equal,__id}, __assignment},
|
||||
{{__semi,__char,__mul_equal,__id}, __assignment},
|
||||
{{__semi,__call_function,__mul_equal,__id}, __assignment},
|
||||
{{__semi,__call_list,__mul_equal,__id}, __assignment},
|
||||
{{__semi,__call_hash,__mul_equal,__id}, __assignment},
|
||||
{{__calculation,__cmp_equal,__call_hash}, __calculation},
|
||||
{{__call_hash,__cmp_equal,__calculation}, __calculation},
|
||||
{{__call_hash,__cmp_equal,__call_hash}, __calculation},
|
||||
{{__call_hash,__cmp_equal,__id}, __calculation},
|
||||
{{__id,__cmp_equal,__call_hash}, __calculation},
|
||||
|
||||
{{__semi,__calculation,__div_equal,__id}, __assignment},
|
||||
{{__semi,__number,__div_equal,__id}, __assignment},
|
||||
{{__semi,__string,__div_equal,__id}, __assignment},
|
||||
{{__semi,__id,__div_equal,__id}, __assignment},
|
||||
{{__semi,__char,__div_equal,__id}, __assignment},
|
||||
{{__semi,__call_function,__div_equal,__id}, __assignment},
|
||||
{{__semi,__call_list,__div_equal,__id}, __assignment},
|
||||
{{__semi,__call_hash,__div_equal,__id}, __assignment},
|
||||
{{__calculation,__cmp_not_equal,__call_hash}, __calculation},
|
||||
{{__call_hash,__cmp_not_equal,__calculation}, __calculation},
|
||||
{{__call_hash,__cmp_not_equal,__call_hash}, __calculation},
|
||||
{{__call_hash,__cmp_not_equal,__id}, __calculation},
|
||||
{{__id,__cmp_not_equal,__call_hash}, __calculation},
|
||||
|
||||
{{__semi,__calculation,__link_equal,__id}, __assignment},
|
||||
{{__semi,__number,__link_equal,__id}, __assignment},
|
||||
{{__semi,__string,__link_equal,__id}, __assignment},
|
||||
{{__semi,__id,__link_equal,__id}, __assignment},
|
||||
{{__semi,__char,__link_equal,__id}, __assignment},
|
||||
{{__semi,__call_function,__link_equal,__id}, __assignment},
|
||||
{{__semi,__call_list,__link_equal,__id}, __assignment},
|
||||
{{__semi,__call_hash,__link_equal,__id}, __assignment},
|
||||
{{__calculation,__cmp_less,__call_hash}, __calculation},
|
||||
{{__call_hash,__cmp_less,__calculation}, __calculation},
|
||||
{{__call_hash,__cmp_less,__call_hash}, __calculation},
|
||||
{{__call_hash,__cmp_less,__id}, __calculation},
|
||||
{{__id,__cmp_less,__call_hash}, __calculation},
|
||||
|
||||
{{__definition}, __statement},
|
||||
{{__assignment}, __statement},
|
||||
{{__choose}, __statement},
|
||||
{{__semi,__continue}, __statement},
|
||||
{{__semi,__break}, __statement},
|
||||
{{__semi,__id,__return}, __statement},
|
||||
{{__semi,__list,__return}, __statement},
|
||||
{{__semi,__hash,__return}, __statement},
|
||||
{{__loop}, __statement},
|
||||
{{__statement,__statement}, __statements},
|
||||
{{__statements,__statement}, __statements}
|
||||
{{__calculation,__cmp_less_or_equal,__call_hash}, __calculation},
|
||||
{{__call_hash,__cmp_less_or_equal,__calculation}, __calculation},
|
||||
{{__call_hash,__cmp_less_or_equal,__call_hash}, __calculation},
|
||||
{{__call_hash,__cmp_less_or_equal,__id}, __calculation},
|
||||
{{__id,__cmp_less_or_equal,__call_hash}, __calculation},
|
||||
|
||||
{{__calculation,__cmp_more,__call_hash}, __calculation},
|
||||
{{__call_hash,__cmp_more,__calculation}, __calculation},
|
||||
{{__call_hash,__cmp_more,__call_hash}, __calculation},
|
||||
{{__call_hash,__cmp_more,__id}, __calculation},
|
||||
{{__id,__cmp_more,__call_hash}, __calculation},
|
||||
|
||||
{{__calculation,__cmp_more_or_equal,__call_hash}, __calculation},
|
||||
{{__call_hash,__cmp_more_or_equal,__calculation}, __calculation},
|
||||
{{__call_hash,__cmp_more_or_equal,__call_hash}, __calculation},
|
||||
{{__call_hash,__cmp_more_or_equal,__id}, __calculation},
|
||||
{{__id,__cmp_more_or_equal,__call_hash}, __calculation},
|
||||
|
||||
{{__calculation,__and_operator,__call_hash}, __calculation},
|
||||
{{__call_hash,__and_operator,__calculation}, __calculation},
|
||||
{{__call_hash,__and_operator,__call_hash}, __calculation},
|
||||
{{__call_hash,__and_operator,__id}, __calculation},
|
||||
{{__id,__and_operator,__call_hash}, __calculation},
|
||||
|
||||
{{__calculation,__or_operator,__call_hash}, __calculation},
|
||||
{{__call_hash,__or_operator,__calculation}, __calculation},
|
||||
{{__call_hash,__or_operator,__call_hash}, __calculation},
|
||||
{{__call_hash,__or_operator,__id}, __calculation},
|
||||
{{__id,__or_operator,__call_hash}, __calculation},
|
||||
|
||||
{{__calculation,__add_operator,__call_list}, __calculation},
|
||||
{{__call_list,__add_operator,__calculation}, __calculation},
|
||||
{{__call_list,__add_operator,__call_list}, __calculation},
|
||||
{{__call_list,__add_operator,__id}, __calculation},
|
||||
{{__id,__add_operator,__call_list}, __calculation},
|
||||
|
||||
{{__calculation,__sub_operator,__call_list}, __calculation},
|
||||
{{__call_list,__sub_operator,__calculation}, __calculation},
|
||||
{{__call_list,__sub_operator,__call_list}, __calculation},
|
||||
{{__call_list,__sub_operator,__id}, __calculation},
|
||||
{{__id,__sub_operator,__call_list}, __calculation},
|
||||
|
||||
{{__calculation,__mul_operator,__call_list}, __calculation},
|
||||
{{__call_list,__mul_operator,__calculation}, __calculation},
|
||||
{{__call_list,__mul_operator,__call_list}, __calculation},
|
||||
{{__call_list,__mul_operator,__id}, __calculation},
|
||||
{{__id,__mul_operator,__call_list}, __calculation},
|
||||
|
||||
{{__calculation,__div_operator,__call_list}, __calculation},
|
||||
{{__call_list,__div_operator,__calculation}, __calculation},
|
||||
{{__call_list,__div_operator,__call_list}, __calculation},
|
||||
{{__call_list,__div_operator,__id}, __calculation},
|
||||
{{__id,__div_operator,__call_list}, __calculation},
|
||||
|
||||
{{__calculation,__link_operator,__call_list}, __calculation},
|
||||
{{__call_list,__link_operator,__calculation}, __calculation},
|
||||
{{__call_list,__link_operator,__call_list}, __calculation},
|
||||
{{__call_list,__link_operator,__id}, __calculation},
|
||||
{{__id,__link_operator,__call_list}, __calculation},
|
||||
|
||||
{{__calculation,__cmp_equal,__call_list}, __calculation},
|
||||
{{__call_list,__cmp_equal,__calculation}, __calculation},
|
||||
{{__call_list,__cmp_equal,__call_list}, __calculation},
|
||||
{{__call_list,__cmp_equal,__id}, __calculation},
|
||||
{{__id,__cmp_equal,__call_list}, __calculation},
|
||||
|
||||
{{__calculation,__cmp_not_equal,__call_list}, __calculation},
|
||||
{{__call_list,__cmp_not_equal,__calculation}, __calculation},
|
||||
{{__call_list,__cmp_not_equal,__call_list}, __calculation},
|
||||
{{__call_list,__cmp_not_equal,__id}, __calculation},
|
||||
{{__id,__cmp_not_equal,__call_list}, __calculation},
|
||||
|
||||
{{__calculation,__cmp_less,__call_list}, __calculation},
|
||||
{{__call_list,__cmp_less,__calculation}, __calculation},
|
||||
{{__call_list,__cmp_less,__call_list}, __calculation},
|
||||
{{__call_list,__cmp_less,__id}, __calculation},
|
||||
{{__id,__cmp_less,__call_list}, __calculation},
|
||||
|
||||
{{__calculation,__cmp_less_or_equal,__call_list}, __calculation},
|
||||
{{__call_list,__cmp_less_or_equal,__calculation}, __calculation},
|
||||
{{__call_list,__cmp_less_or_equal,__call_list}, __calculation},
|
||||
{{__call_list,__cmp_less_or_equal,__id}, __calculation},
|
||||
{{__id,__cmp_less_or_equal,__call_list}, __calculation},
|
||||
|
||||
{{__calculation,__cmp_more,__call_list}, __calculation},
|
||||
{{__call_list,__cmp_more,__calculation}, __calculation},
|
||||
{{__call_list,__cmp_more,__call_list}, __calculation},
|
||||
{{__call_list,__cmp_more,__id}, __calculation},
|
||||
{{__id,__cmp_more,__call_list}, __calculation},
|
||||
|
||||
{{__calculation,__cmp_more_or_equal,__call_list}, __calculation},
|
||||
{{__call_list,__cmp_more_or_equal,__calculation}, __calculation},
|
||||
{{__call_list,__cmp_more_or_equal,__call_list}, __calculation},
|
||||
{{__call_list,__cmp_more_or_equal,__id}, __calculation},
|
||||
{{__id,__cmp_more_or_equal,__call_list}, __calculation},
|
||||
|
||||
{{__calculation,__and_operator,__call_list}, __calculation},
|
||||
{{__call_list,__and_operator,__calculation}, __calculation},
|
||||
{{__call_list,__and_operator,__call_list}, __calculation},
|
||||
{{__call_list,__and_operator,__id}, __calculation},
|
||||
{{__id,__and_operator,__call_list}, __calculation},
|
||||
|
||||
{{__calculation,__or_operator,__call_list}, __calculation},
|
||||
{{__call_list,__or_operator,__calculation}, __calculation},
|
||||
{{__call_list,__or_operator,__call_list}, __calculation},
|
||||
{{__call_list,__or_operator,__id}, __calculation},
|
||||
{{__id,__or_operator,__call_list}, __calculation},
|
||||
|
||||
{{__right_curve,__number,__left_curve}, __calculation},
|
||||
{{__number,__nor_operator}, __calculation},
|
||||
|
||||
{{__semi,__calculation,__equal,__id,__var}, __definition},
|
||||
{{__semi,__number,__equal,__id,__var}, __definition},
|
||||
{{__semi,__string,__equal,__id,__var}, __definition},
|
||||
{{__semi,__id,__equal,__id,__var}, __definition},
|
||||
{{__semi,__char,__equal,__id,__var}, __definition},
|
||||
{{__semi,__right_brace,__left_brace,__equal,__id,__var}, __definition},
|
||||
{{__semi,__right_bracket,__left_bracket,__equal,__id,__var}, __definition},
|
||||
{{__semi,__call_function,__equal,__id,__var}, __definition},
|
||||
{{__semi,__call_list,__equal,__id,__var}, __definition},
|
||||
{{__function,__equal,__id,__var}, __definition},
|
||||
{{__semi,__function,__equal,__id,__var}, __definition},
|
||||
{{__semi,__call_hash,__equal,__id,__var}, __definition},
|
||||
{{__semi,__list,__equal,__id,__var}, __definition},
|
||||
{{__semi,__hash,__equal,__id,__var}, __definition},
|
||||
|
||||
{{__calculation,__equal,__id}, __pre_assignment},
|
||||
{{__number,__equal,__id}, __pre_assignment},
|
||||
{{__string,__equal,__id}, __pre_assignment},
|
||||
{{__id,__equal,__id}, __pre_assignment},
|
||||
{{__char,__equal,__id}, __pre_assignment},
|
||||
{{__right_brace,__left_brace,__equal,__id}, __pre_assignment},
|
||||
{{__right_bracket,__left_bracket,__equal,__id}, __pre_assignment},
|
||||
{{__call_function,__equal,__id}, __pre_assignment},
|
||||
{{__call_list,__equal,__id}, __pre_assignment},
|
||||
{{__function,__equal,__id}, __pre_assignment},
|
||||
{{__function,__equal,__id}, __pre_assignment},
|
||||
{{__call_hash,__equal,__id}, __pre_assignment},
|
||||
{{__list,__equal,__id}, __pre_assignment},
|
||||
{{__hash,__equal,__id}, __pre_assignment},
|
||||
|
||||
{{__calculation,__add_equal,__id}, __pre_assignment},
|
||||
{{__number,__add_equal,__id}, __pre_assignment},
|
||||
{{__string,__add_equal,__id}, __pre_assignment},
|
||||
{{__id,__add_equal,__id}, __pre_assignment},
|
||||
{{__char,__add_equal,__id}, __pre_assignment},
|
||||
{{__call_function,__add_equal,__id}, __pre_assignment},
|
||||
{{__call_list,__add_equal,__id}, __pre_assignment},
|
||||
{{__call_hash,__add_equal,__id}, __pre_assignment},
|
||||
|
||||
{{__calculation,__sub_equal,__id}, __pre_assignment},
|
||||
{{__number,__sub_equal,__id}, __pre_assignment},
|
||||
{{__string,__sub_equal,__id}, __pre_assignment},
|
||||
{{__id,__sub_equal,__id}, __pre_assignment},
|
||||
{{__char,__sub_equal,__id}, __pre_assignment},
|
||||
{{__call_function,__sub_equal,__id}, __pre_assignment},
|
||||
{{__call_list,__sub_equal,__id}, __pre_assignment},
|
||||
{{__call_hash,__sub_equal,__id}, __pre_assignment},
|
||||
|
||||
{{__calculation,__mul_equal,__id}, __pre_assignment},
|
||||
{{__number,__mul_equal,__id}, __pre_assignment},
|
||||
{{__string,__mul_equal,__id}, __pre_assignment},
|
||||
{{__id,__mul_equal,__id}, __pre_assignment},
|
||||
{{__char,__mul_equal,__id}, __pre_assignment},
|
||||
{{__call_function,__mul_equal,__id}, __pre_assignment},
|
||||
{{__call_list,__mul_equal,__id}, __pre_assignment},
|
||||
{{__call_hash,__mul_equal,__id}, __pre_assignment},
|
||||
|
||||
{{__calculation,__div_equal,__id}, __pre_assignment},
|
||||
{{__number,__div_equal,__id}, __pre_assignment},
|
||||
{{__string,__div_equal,__id}, __pre_assignment},
|
||||
{{__id,__div_equal,__id}, __pre_assignment},
|
||||
{{__char,__div_equal,__id}, __pre_assignment},
|
||||
{{__call_function,__div_equal,__id}, __pre_assignment},
|
||||
{{__call_list,__div_equal,__id}, __pre_assignment},
|
||||
{{__call_hash,__div_equal,__id}, __pre_assignment},
|
||||
|
||||
{{__calculation,__link_equal,__id}, __pre_assignment},
|
||||
{{__number,__link_equal,__id}, __pre_assignment},
|
||||
{{__string,__link_equal,__id}, __pre_assignment},
|
||||
{{__id,__link_equal,__id}, __pre_assignment},
|
||||
{{__char,__link_equal,__id}, __pre_assignment},
|
||||
{{__call_function,__link_equal,__id}, __pre_assignment},
|
||||
{{__call_list,__link_equal,__id}, __pre_assignment},
|
||||
{{__call_hash,__link_equal,__id}, __pre_assignment},
|
||||
|
||||
{{__semi,__pre_assignment}, __assignment},
|
||||
|
||||
{{__definition}, __statement},
|
||||
{{__assignment}, __statement},
|
||||
{{__choose}, __statement},
|
||||
{{__semi,__continue}, __statement},
|
||||
{{__semi,__break}, __statement},
|
||||
{{__semi,__id,__return}, __statement},
|
||||
{{__semi,__list,__return}, __statement},
|
||||
{{__semi,__hash,__return}, __statement},
|
||||
{{__loop}, __statement},
|
||||
{{__statement,__statement}, __statements},
|
||||
{{__statements,__statement}, __statements}
|
||||
};
|
||||
int num_of_par=sizeof(par)/sizeof(cmp_seq);
|
||||
|
||||
|
@ -662,6 +884,9 @@ void print_token(int type)
|
|||
case __hash_member_list:
|
||||
context="hash_members";
|
||||
break;
|
||||
case __pre_assignment:
|
||||
context="pre_assignment";
|
||||
break;
|
||||
default:
|
||||
context="unknown_type";
|
||||
break;
|
||||
|
@ -782,7 +1007,17 @@ class PDA
|
|||
{
|
||||
comp_stack.push(main_stack.top());
|
||||
main_stack.pop();
|
||||
if((comp_stack.top()==__id) && (!main_stack.empty()) && (main_stack.top()==__var)) // special LR(1) for definition & assignment
|
||||
if((comp_stack.top()==__id) && (!main_stack.empty()) && ((main_stack.top()==__var) || (main_stack.top()==__dot))) // special LR(1) for definition & assignment
|
||||
{
|
||||
comp_stack.push(main_stack.top());
|
||||
main_stack.pop();
|
||||
}
|
||||
if((comp_stack.top()==__left_curve) && (!main_stack.empty()) && ((main_stack.top()==__id) || (main_stack.top()==__if) || (main_stack.top()==__elsif) || (main_stack.top()==__while) || (main_stack.top()==__func)))
|
||||
{
|
||||
comp_stack.push(main_stack.top());
|
||||
main_stack.pop();
|
||||
}
|
||||
if((comp_stack.top()==__left_bracket) && (!main_stack.empty()) && (main_stack.top()==__id))
|
||||
{
|
||||
comp_stack.push(main_stack.top());
|
||||
main_stack.pop();
|
||||
|
|
Loading…
Reference in New Issue