4 个仓库
Recording line and column offsets for tokens to map parse tree elements back to original source code.
Distinguishing note: Shortlist candidates focus on user input playback or ML encodings; none cover source-code coordinate tracking for parsers.
Explore 4 awesome GitHub repositories matching programming languages & runtimes · Source Coordinate Tracking. Refine with filters or upvote what's useful.
Lark 是一个 Python 解析工具包,用于定义语法并将原始文本转换为带注释的解析树。它作为一个抽象语法树生成器和语法定义语言,用于通过终结符和正则表达式指定语言规则。 该库提供两种主要的解析实现:一种是能够处理所有上下文无关语言(包括具有歧义和左递归的语言)的 Earley 解析库;另一种是专为具有低内存开销的确定性语言设计的高性能 LALR 解析库。 除了核心解析外,该工具包还包括模块化语法组合、基于规则的树转换以及源位置坐标跟踪功能。它还支持将 LALR 语法序列化为独立的解析器模块。
Provides line and column offset tracking for tokens to map parse tree nodes back to the original source code.
TSDoc 是一个用于在 TypeScript 代码中编写结构化注释的文档标准和规范。它提供了一个可移植的系统,用于在源代码中定义元数据、标签和交叉引用,以确保在不同工具链之间实现一致的解析和渲染。 该项目包含一个文档注释解析器,可将注释转换为结构化语法树,以及一个强制执行语法一致性的验证器。它允许通过外部配置文件定义自定义文档标签,并支持多种语法验证模式以协助规范合规性。 该规范涵盖了广泛的 API 文档需求,包括标记发布阶段、稳定性和弃用状态。它支持详细说明函数参数、返回值和异常类型,以及管理内部可见性、继承和声明之间的交叉引用。
Records line and column offsets for tokens to map parse tree elements back to original source code for precise error reporting.
本项目是一个 CSS 样式表编译器,可将 Sass 源代码转换为标准 CSS。它提供了转换样式的核心机制,同时实现了 Web 浏览器和应用的语法规则。 该编译器支持一个基于模块的依赖系统,使用专用命名空间来提供封装并防止全局作用域冲突。它包含用于多模型颜色转换和高级数学计算(包括三角函数和对数)的专用引擎。 其功能涵盖了广泛的构建和分析工具,包括生成 source map、用于自动重新编译的文件系统监控,以及直接在 Web 浏览器中执行编译的能力。它还允许通过结构化消息协议在宿主语言中定义的自定义函数和导入器进行扩展。 用户还可以通过检查抽象语法树(AST)进行静态分析,以分析代码结构并解析依赖关系,而无需执行完整编译。
Records line and column offsets for tokens to accurately map compiled output back to original source code.
Parser is a Ruby source code parser that converts raw source text into structured abstract syntax trees for static analysis and code manipulation. It features dynamic dispatch mechanisms that select specific grammar and tokeniser implementations at runtime, supporting both the executing interpreter version and explicitly targeted language specification versions. The library constructs abstract syntax tree nodes as frozen, immutable objects while tracking exact source file coordinates and character ranges for each node. Developers can supply custom builder objects to control how tree nodes ar
Tracks exact source file coordinates and character ranges for nodes within the generated syntax tree.