fledna 最近的时间轴更新
fledna

fledna

V2EX 第 40140 号会员,加入于 2013-06-04 19:27:57 +08:00
fledna 最近回复了
2020-01-18 11:03:58 +08:00
回复了 yidinghe 创建的主题 编程 关于“木兰”编程语言的疑问
2: 运行环境

Python 能跑的基本都能跑, 因为就是个 python 脚本儿

3. 开发环境

。。。。记事本儿吧
2020-01-18 11:03:19 +08:00
回复了 yidinghe 创建的主题 编程 关于“木兰”编程语言的疑问
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
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   1000 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 15ms · UTC 20:09 · PVG 04:09 · LAX 12:09 · JFK 15:09
Developed with CodeLauncher
♥ Do have faith in what you're doing.