已经知道 MU-lang 不是中文编程,但是依旧存在不明确的地方:
针对物联网的操作系统、语言、云服务已经数不胜数,中科院计算所发布的这个东西,哪些厂商愿意接受?
1
caowentao 2020-01-17 12:18:21 +08:00 via iPhone
刚也看到新闻了,具体实现还不了解。针对物联网的设计,希望有好的特性,然后学习下来被 C 语言吸收。
|
2
fledna 2020-01-18 11:03:19 +08:00
1: 语法
start : stmt_list block : ; block : LBRACE stmt_list RBRACE stmt_list : stmt_list : stmt_list_ stmt_list : stmt_list_ NEWLINE stmt_list : stmt_list_ ; stmt_list_ : stmt stmt_list_ : stmt_list_ NEWLINE stmt stmt_list_ : stmt_list_ ; stmt stmt : type_define stmt : function stmt : if_stmt stmt : while_stmt stmt : for_stmt stmt : declaration type_define : TYPE name bases type_body bases : bases : : prefix_expr bases : : prefix_exprs type_body : LBRACE type_stmts RBRACE type_stmts : type_stmts : type_stmts type_stmt type_stmt : block type_stmt : type_define type_stmt : operator type_stmt : function type_stmt : property property : ATTR IDENTIFIER block property : ATTR IDENTIFIER ( ) block property : ATTR IDENTIFIER = ( param ) block operator : OPERATOR binop ( param , param ) block operator : OPERATOR binop op_arg block operator : OPERATOR uop op_none block operator : OPERATOR - op_none block op_arg : ( param ) op_arg : param op_none : ( ) op_none : binop : [ ] binop : << binop : <<= binop : >> binop : >>= binop : + binop : += binop : - binop : -= binop : * binop : *= binop : / binop : /= binop : % binop : %= binop : ^ binop : ^= binop : > binop : >= binop : < binop : <= binop : == binop : != uop : ! uop : ~ uop : # stmt : using_stmt stmt : expr_stmt stmt : assignment stmt : aug_assign stmt : anno_assign stmt : break_stmt stmt : continue_stmt stmt : try_stmt stmt : throw_stmt stmt : ret_stmt throw_stmt : THROW expr withitem : prefix_exprs = expr withitem : prefix_expr = expr withitem : expr try_stmt : TRY withitem block try_stmt : TRY withitem block catch_stmts try_stmt : TRY withitem block catch_stmts final_stmt try_stmt : TRY withitem block final_stmt try_stmt : TRY block catch_stmts try_stmt : TRY block catch_stmts final_stmt try_stmt : TRY block final_stmt catch_stmts : catch_stmt catch_stmts : catch_stmts catch_stmt catch_stmt : CATCH name : expr block catch_stmt : CATCH name block catch_stmt : CATCH block final_stmt : FINALLY block module_name_ : module_name module_name_ : DOTDOT module_name_ : DOT using_stmt : USING module_names IN module_name_ using_stmt : USING * IN module_name_ using_stmt : USING module_names module_names : module_name module_names : module_names , module_name module_name : module_name DOT name module_name : name expr_stmt : prefix_expr expr_stmt : yield_expr ret_stmt : RETURN ret_stmt : RETURN exprs aug_assign : prefix_expr += expr aug_assign : prefix_expr -= expr aug_assign : prefix_expr *= expr aug_assign : prefix_expr ^= expr aug_assign : prefix_expr |= expr aug_assign : prefix_expr &= expr aug_assign : prefix_expr <<= expr aug_assign : prefix_expr >>= expr aug_assign : prefix_expr /= expr aug_assign : prefix_expr %= expr assignment : prefix_expr = expr anno_assign : name : type_name = expr declaration : EXTERN names prefix_exprs : prefix_exprs , prefix_expr prefix_exprs : prefix_expr , prefix_expr assignment : prefix_exprs = exprs break_stmt : BREAK continue_stmt : CONTINUE bin_expr : expr + expr bin_expr : expr - expr bin_expr : expr * expr bin_expr : expr >> expr bin_expr : expr << expr bin_expr : expr ^ expr bin_expr : expr & expr bin_expr : expr | expr bin_expr : expr / expr bin_expr : expr % expr bin_expr : expr > expr bin_expr : expr >= expr bin_expr : expr < expr bin_expr : expr <= expr bin_expr : expr == expr bin_expr : expr != expr bin_expr : expr === expr bin_expr : expr !== expr bin_expr : expr AND expr bin_expr : expr OR expr range_expr : expr DOTDOT expr range_expr : expr DOTDOTLT expr range_expr : range_expr BY expr unary_expr : - expr unary_expr : ! expr unary_expr : # expr unary_expr : ~ expr ternary_expr : expr ? expr : expr primary_expr : ( expr ) primary_expr : ( name : type_name ) primary_expr : ( name : type_name , param_list_not_empty ) primary_expr : ( name , param_list_not_empty ) prefix_expr : call prefix_expr : var prefix_expr : lambda_func prefix_expr : strlit prefix_expr : list_expr prefix_expr : dict_expr slice : expr slice : expr : expr slice : expr : slice : : expr slice : : slice : exprs , expr var : prefix_expr [ slice ] var : prefix_expr DOT name var : name arguments : ( args ) arguments : ( ) call : prefix_expr arguments call : super call : prefix_expr DOT super super : SUPER arguments super : SUPER lambda_param : name lambda_param : varargs_expr lambda_param : primary_expr lambda_param : ( ) lambda_body : -> expr lambda_body : -> block lambda_expr : lambda_param lambda_body lambda_func : FUNC ( param_list ) block lambda_func : FUNC block lambda_func : FUNC ( param_list ) : type_name block type_name : name type_name : type_name [ type_list ] type_list : type_name type_list : type_list , type_name number : HEX_LITERAL number : INTEGER_LITERAL number : FLOAT_LITERAL strlit : STRING_LITERAL strlit : STRING_LITERAL_II name_const : TRUE name_const : FALSE name_const : NIL name_const : DOLLAR expr : factor_expr expr : yield_expr expr : bin_expr expr : unary_expr expr : prefix_expr expr : primary_expr expr : lambda_expr expr : ternary_expr expr : number expr : name_const expr : range_expr expr : varargs_expr varargs_expr : DOTDOTDOT factor_expr : number prefix_expr factor_expr : number primary_expr yield_expr : YIELD expr yield_expr : YIELD dict_expr : LBRACE : RBRACE dict_expr : LBRACE kv_pairs RBRACE kv_pairs : kv_pair kv_pairs : kv_pairs , kv_pair kv_pair : expr : expr list_expr : [ ] list_expr : [ exprs ] names : name names : names , name args : arg args : args , arg exprs : expr exprs : exprs , expr arg : expr arg : IDENTIFIER = expr param_list : param_list : param_list_not_empty param_list_not_empty : param param_list_not_empty : param_list_not_empty , param param_list_not_empty : DOTDOTDOT param_list_not_empty : param_list_not_empty , DOTDOTDOT param : name : type_name param : name param : name = expr function : FUNC IDENTIFIER ( param_list ) block function : FUNC IDENTIFIER block function : FUNC IDENTIFIER ( param_list ) : type_name block function : FUNC IDENTIFIER : type_name block if_stmt : IF expr block elif_stmt if_stmt : IF expr block ELSE block elif_stmt : elif_stmt : ELIF expr block elif_stmt elif_stmt : ELIF expr block ELSE block if_stmt : stmt IF expr stmt : block while_stmt : WHILE expr block while_stmt : LOOP block iterator : prefix_expr iterator : prefix_exprs loop_range : expr for_stmt : FOR iterator IN loop_range block for_stmt : FOR iterator : loop_range block for_stmt : stmt FOR iterator IN loop_range for_stmt : stmt FOR iterator : loop_range name : IDENTIFIER |
3
fledna 2020-01-18 11:03:58 +08:00
2: 运行环境
Python 能跑的基本都能跑, 因为就是个 python 脚本儿 3. 开发环境 。。。。记事本儿吧 |