T-SQL抽象语法树的官方文档在哪里?
Where is the official document of T-SQL abstract syntax tree?
我使用SqlServer提供的SqlParser class来解析一个sql脚本的AST,
就像我在 post 中回答的那样:.
它的输出是一个 xml 文档,如下所示。但是我查了很多,都没有找到相关的文档。谁知道可以给我link.
<?xml version="1.0" encoding="utf-8"?>
<SqlScript Location="((1,1), (92,1))">
<Errors />
<SqlBatch Location="((91,3), (92,1))">
<!--
-->
<Tokens>
<Token location="((91,3), (92,1))" id="651" type="LEX_WHITE">\n</Token>
</Tokens>
</SqlBatch>
</SqlScript>
您可以找到 SQL Abstract Syntax Trees Vocabulary
Abstract syntax trees allow to build structured representations of
code for any language with a grammar: AST nodes carrying labels can
stand for keywords, objects, variables, constants or any language
element while the tree structure allows to abstract away the
language's concepts of scope or dependency. ASTs are a
machine-readable format for concrete syntax code, and can be decorated
with implicit or contextual knowledge from the grammar. We hereby
propose to model ASTs with RDF graphs. AST structures naturally fit
RDF graphs: nodes map resources, node labels map resources' types, and
grammar knowledge map to vocabulary's semantics, e.g. with
subsumption.
我使用SqlServer提供的SqlParser class来解析一个sql脚本的AST,
就像我在 post 中回答的那样:
它的输出是一个 xml 文档,如下所示。但是我查了很多,都没有找到相关的文档。谁知道可以给我link.
<?xml version="1.0" encoding="utf-8"?>
<SqlScript Location="((1,1), (92,1))">
<Errors />
<SqlBatch Location="((91,3), (92,1))">
<!--
-->
<Tokens>
<Token location="((91,3), (92,1))" id="651" type="LEX_WHITE">\n</Token>
</Tokens>
</SqlBatch>
</SqlScript>
您可以找到 SQL Abstract Syntax Trees Vocabulary
Abstract syntax trees allow to build structured representations of code for any language with a grammar: AST nodes carrying labels can stand for keywords, objects, variables, constants or any language element while the tree structure allows to abstract away the language's concepts of scope or dependency. ASTs are a machine-readable format for concrete syntax code, and can be decorated with implicit or contextual knowledge from the grammar. We hereby propose to model ASTs with RDF graphs. AST structures naturally fit RDF graphs: nodes map resources, node labels map resources' types, and grammar knowledge map to vocabulary's semantics, e.g. with subsumption.