AI
推荐
模板社区
专题
登录
免费注册
首页
思维导图
详情
jass parser
2025-08-25 13:07:15
0
举报
分享方式
免费使用
JASS Parser是一个用于解析JASS (Just Another Scripting Syntax) 代码的工具。JASS是一种专用于暴雪娱乐公司开发的游戏——尤其是《魔兽争霸III》和其自定义地图的脚本语言。JASS Parser的核心功能包括语法分析、错误检测、代码优化。
jass
jass parser
模板推荐
作者其他创作
大纲/内容
词法分析
number
0-9<br>
0
0[0-7]+
octal
0[xX][0-9a-fA-F]{1,8}<br>
hex
0\.[0-9]*
float
[1-9]+
number:normal<br>
int:[0-9]{1,10}<br>
float:([0-9]+\. )|([0-9]+\.[0-9]+)<br>
.
(\.[0-9]+)|([0-9]+\. )|([0-9]+\.[0-9]+)<br>
number:float<br>
$
$[0-9a-fA-F]{1,8}
hex
keyword
[a-zA-Z]<br>
[a-zA-Z]+([a-z_A-Z0-9]*[a-zA-Z0-9])?<br>
operator<br>
operator precedence<br>
[] ()<br>
+{expr} -{expr}<br>
* / <br>
+ -<br>
< <= > >=<br>
== !=<br>
=
,
,
separator
comma operator<br>
+
+ {expr}<br>
unary plus operator
{expr} + {epxr}<br>
binary plus operator<br>
-
- {expr}<br>
unary minus operator
{expr} - {epxr}<br>
binary minus operator<br>
*
{expr} * {epxr}<br>
binary multiplication operator<br>
*/
multiple lines comment end
/
//
single line comment start
/*<br>
multiple lines comment start
{expr} / {epxr}<br>
binary division operator<br>
=
==
equality operator
=
assignment operator
<
<
less-than operator
<=
less-than-or-equal-to operator
>
>
greater-than operator
>=
greater-than-or-equal-to operator
!
!=
inequality operator
[]<br>
postfix-expression [ expression ]
subscript operator<br>
()<br>
postfix-expression ( expression-list? )
function call operator<br>
\\
\{\n}<br>
concatline
\{other}<br>
error!<br>
\n
new line
\r
(\r\n|\r+)<br>
new line
\t
space
\x20<br>
space
'
('[.]|[.]{4}')<br>
charator
length:1,4<br>
"
“([^"]|\\")+”<br>
string
escape sequence<br>
\',\",\\,\f,\n,\r,\t,\v
simple escape sequence
\000
octal escape sequence<br>
\xhh
hexadecimal escape sequence<br>
\uXXXX
universal character name<br>
[%?@^_`~:;&|{}#]<br>
Unused visible characters,show error!<br>
([\x1-\x8]|[\xB\xC]|[\xE-\x1F]|[\x7F])<br>
Unused Invisible characters,show error!<br>
[\x80-\xFF]
read utf-8/ascii next charator,show error!<br>
\x0
input eof,exit
语法分析
描述语定义
$value<br>
boolean
true/false/???<br>
integer<br>
hex:0x???<br>
hex:$???<br>
charator
'?'<br>
'????'<br>
real<br>
string
code
function {symbol}<br>
handle
{symbol}<br>
$symbol<br>
variable<br>
native
function
args<br>
{value}<br>
param
type_name<br>
variable_name<br>
code
function
funcion_name<br>
expression
()<br>
{expression}<br>
unary operator<br>
{expression}
constant_value<br>
optional:binary operator
{expression}
symbol_name<br>
optional:binary operator
{expression}
$symbol<br>
variable_name<br>
function_name<br>
$variable<br>
?:constant<br>
type<br>
?:array
name
?:=<br>
{expression}<br>
declaration
type
name
extends
type_name<br>
$native<br>
?:constant
native<br>
name
takes
{param_list}<br>
returns<br>
type_name<br>
$globals<br>
globals<br>
{variable list}<br>
endglobals
$function<br>
?:constant
function
name
takes<br>
{param...}<br>
returns<br>
type_name
{statement}<br>
endfunction<br>
$comment
//
{...}<br>
line end
/*<br>
{...}<br>
*/
statement
local
type<br>
?:array<br>
name
?:=<br>
{expression}<br>
set
variable_name<br>
?:[{expression}]<br>
=
{expression}
call
function_name<br>
(
{args...}<br>
)
if<br>
{expression}
then
elseif*<br>
{expression}
then
else
endif
loop<br>
{new line}<br>
exitwhen*<br>
{expression}
endloop
return
?:{expression}<br>
logic
*:type<br>
*:native<br>
*:globals<br>
*:{variable list}<br>
*:function<br>
*:local<br>
*:set<br>
*:call<br>
*:loop<br>
*:exitwhen<br>
*:loop/if/set/call/return<br>
endloop
*:if<br>
*:loop/if/set/call/return<br>
*:elseif<br>
*:loop/if/set/call/return<br>
?:else<br>
*:loop/if/set/call/return<br>
endif
*:return<br>
*://{line}<br>
*:/*{...}*/<br>
AST<br>
NodeType
Decl
TypeDecl
GlobalVarDecl
NativeDecl
FunctionDecl
ParamList
ReturnType
Block
CommentDecl
Statement
LocalDecl
SetStatement
CallStatement
IfStatement
LoopStatement
ReturnStatement
Expression
Literal(value)
Variable(name)
BinaryOp(op, left, right)
UnaryOp(op, expr)
ArrayAccess(var, index)
FunctionCall(name, args)
语义分析
作用域解析
类型检查
可变性检查
初始化与可达性
控制流完整性
数组/切片边界与维度检查
函数/运算符重载决议
语义限制与方言差异
收藏
立即使用
jass parser
PO_odnFjY
职业:暂无
去主页
Collect
Get Started
Parser
Collect
Get Started
cms功能图
Collect
Get Started
新首页设计
Collect
Get Started
prueba
评论
0
条评论
下一页
图形选择
思维导图
主题
补充说明
AI生成
修改AI描述
去编辑
重新生成
提示
关闭后当前内容将不会保存,是否继续?
取消
确定
Document