From 37225409608e64dc19f49f1ebe3dc96048bc2ca9 Mon Sep 17 00:00:00 2001 From: Ilya Lakhin Date: Wed, 19 Jun 2024 14:59:11 +0600 Subject: [PATCH] URLs fix --- work/book/src/code-formatters/code-formatters.md | 2 +- work/book/src/introduction.md | 4 ++-- work/book/src/lexis/lexical-grammar.md | 2 +- work/book/src/overview.md | 8 ++++---- work/book/src/semantics/configuration-issues.md | 2 +- work/book/src/semantics/grammar-setup.md | 2 +- work/book/src/semantics/granularity.md | 14 +++++++------- .../book/src/semantics/incremental-computations.md | 8 ++++---- work/book/src/semantics/scope-access.md | 4 ++-- work/book/src/semantics/semantic-graph.md | 6 +++--- work/book/src/semantics/semantics.md | 2 +- work/book/src/semantics/tasks-management.md | 2 +- work/book/src/semantics/tree-index.md | 2 +- work/book/src/snippets.md | 2 +- work/book/src/syntax/error-recovering.md | 2 +- work/book/src/syntax/hand-written-parsers.md | 2 +- work/book/src/syntax/overriding-a-parser.md | 2 +- work/book/src/syntax/pratts-algorithm.md | 2 +- work/book/src/syntax/syntax-grammar.md | 8 ++++---- work/book/src/syntax/syntax-session.md | 8 ++++---- work/crates/derive/readme.md | 2 +- 21 files changed, 43 insertions(+), 43 deletions(-) diff --git a/work/book/src/code-formatters/code-formatters.md b/work/book/src/code-formatters/code-formatters.md index 663e564..33ce436 100644 --- a/work/book/src/code-formatters/code-formatters.md +++ b/work/book/src/code-formatters/code-formatters.md @@ -77,5 +77,5 @@ considering the concrete tree configuration. It then feeds the source code tokens into the syntax-unaware Pretty Printer. The printer generates the final output string. -The [Json Formatter](https://github.com/Eliah-Lakhin/lady-deirdre/tree/master/work/crates/examples/src/json_formatter) +The [Json Formatter](https://github.com/Eliah-Lakhin/lady-deirdre/tree/1f4ecdac2a1d8c73e6d94909fb0c7fcd04d31fc0/work/crates/examples/src/json_formatter) example demonstrates the basic usage of both tools. diff --git a/work/book/src/introduction.md b/work/book/src/introduction.md index df3e7cb..431645f 100644 --- a/work/book/src/introduction.md +++ b/work/book/src/introduction.md @@ -34,7 +34,7 @@ # Introduction -Lady Deirdre Logo +Lady Deirdre Logo Lady Deirdre is a framework that helps you develop front-end code analysis tools, such as code editor language extensions, programming language compilers @@ -60,7 +60,7 @@ the core concepts behind these tools. - [Main Crate](https://crates.io/crates/lady-deirdre) - [API Documentation](https://docs.rs/lady-deirdre) - [User Guide](https://lady-deirdre.lakhin.com/) -- [Examples](https://github.com/Eliah-Lakhin/lady-deirdre/tree/master/work/crates/examples) +- [Examples](https://github.com/Eliah-Lakhin/lady-deirdre/tree/1f4ecdac2a1d8c73e6d94909fb0c7fcd04d31fc0/work/crates/examples) - [License Agreement](https://github.com/Eliah-Lakhin/lady-deirdre/blob/master/EULA.md) ## Copyright diff --git a/work/book/src/lexis/lexical-grammar.md b/work/book/src/lexis/lexical-grammar.md index 66db21a..7b4da72 100644 --- a/work/book/src/lexis/lexical-grammar.md +++ b/work/book/src/lexis/lexical-grammar.md @@ -45,7 +45,7 @@ attribute and provide a regular expression to match the corresponding token. The macro uses these expressions to build an optimized finite-state automaton, from which it generates the scanning program.. -From the [JSON example](https://github.com/Eliah-Lakhin/lady-deirdre/blob/master/work/crates/examples/src/json_grammar/lexis.rs#L47): +From the [JSON example](https://github.com/Eliah-Lakhin/lady-deirdre/blob/1f4ecdac2a1d8c73e6d94909fb0c7fcd04d31fc0/work/crates/examples/src/json_grammar/lexis.rs#L47): ```rust,noplayground use lady_deirdre::lexis::Token; diff --git a/work/book/src/overview.md b/work/book/src/overview.md index 1277a1e..104c655 100644 --- a/work/book/src/overview.md +++ b/work/book/src/overview.md @@ -151,7 +151,7 @@ the [derive macro](https://docs.rs/lady-deirdre/2.0.0/lady_deirdre/lexis/derive. on your enum type, where the enum variants denote individual token types. The token's lexical scanning rules are described in terms of regular expressions. -From the [JSON example](https://github.com/Eliah-Lakhin/lady-deirdre/blob/master/work/crates/examples/src/json_grammar/lexis.rs#L47): +From the [JSON example](https://github.com/Eliah-Lakhin/lady-deirdre/blob/1f4ecdac2a1d8c73e6d94909fb0c7fcd04d31fc0/work/crates/examples/src/json_grammar/lexis.rs#L47): ```rust,noplayground #[derive(Token)] @@ -195,7 +195,7 @@ the parser establishes ascending node-to-parent relationships, allowing traversal from nodes to the tree root. Lady Deirdre's incremental reparser ensures both kinds of references are kept up to date. -From the [JSON example](https://github.com/Eliah-Lakhin/lady-deirdre/blob/master/work/crates/examples/src/json_grammar/syntax.rs#L52): +From the [JSON example](https://github.com/Eliah-Lakhin/lady-deirdre/blob/1f4ecdac2a1d8c73e6d94909fb0c7fcd04d31fc0/work/crates/examples/src/json_grammar/syntax.rs#L52): ```rust,noplayground #[derive(Node)] @@ -370,7 +370,7 @@ let (_, attribute_value) = semantics ``` You can find a complete setup example of the syntax tree with semantics in the -[Chain Analysis](https://github.com/Eliah-Lakhin/lady-deirdre/blob/master/work/crates/examples/src/chain_analysis/syntax.rs) +[Chain Analysis](https://github.com/Eliah-Lakhin/lady-deirdre/blob/1f4ecdac2a1d8c73e6d94909fb0c7fcd04d31fc0/work/crates/examples/src/chain_analysis/syntax.rs) example. ### Concurrent Analysis @@ -396,7 +396,7 @@ operations. These functions return RAII-guard-like objects called "tasks" through which necessary operations can be performed. -From the [Chain Analysis](https://github.com/Eliah-Lakhin/lady-deirdre/blob/master/work/crates/examples/src/chain_analysis/mod.rs#L84) example: +From the [Chain Analysis](https://github.com/Eliah-Lakhin/lady-deirdre/blob/1f4ecdac2a1d8c73e6d94909fb0c7fcd04d31fc0/work/crates/examples/src/chain_analysis/mod.rs#L84) example: ```rust,noplayground let analyzer = Analyzer::::new(AnalyzerConfig::default()); diff --git a/work/book/src/semantics/configuration-issues.md b/work/book/src/semantics/configuration-issues.md index 5911705..7a7ec03 100644 --- a/work/book/src/semantics/configuration-issues.md +++ b/work/book/src/semantics/configuration-issues.md @@ -61,7 +61,7 @@ infallible. If you receive an abnormal error from a framework function, it likely indicates a bug in your program's code that needs to be fixed. In particular, the computable functions of -the [Chain Analysis](https://github.com/Eliah-Lakhin/lady-deirdre/blob/master/work/crates/examples/src/chain_analysis/semantics.rs#L337) +the [Chain Analysis](https://github.com/Eliah-Lakhin/lady-deirdre/blob/1f4ecdac2a1d8c73e6d94909fb0c7fcd04d31fc0/work/crates/examples/src/chain_analysis/semantics.rs#L337) example use the [unwrap_abnormal](https://docs.rs/lady-deirdre/2.0.0/lady_deirdre/analysis/type.AnalysisResult.html#method.unwrap_abnormal) helper function to filter out normal errors from abnormal ones, panicking if an diff --git a/work/book/src/semantics/grammar-setup.md b/work/book/src/semantics/grammar-setup.md index fe80342..7d1208f 100644 --- a/work/book/src/semantics/grammar-setup.md +++ b/work/book/src/semantics/grammar-setup.md @@ -54,7 +54,7 @@ to extend this enum type with additional metadata: the `#[classifier]` macro attribute. From -the [Chain Analysis](https://github.com/Eliah-Lakhin/lady-deirdre/tree/master/work/crates/examples/src/chain_analysis) +the [Chain Analysis](https://github.com/Eliah-Lakhin/lady-deirdre/tree/1f4ecdac2a1d8c73e6d94909fb0c7fcd04d31fc0/work/crates/examples/src/chain_analysis) example: ```rust,noplayground diff --git a/work/book/src/semantics/granularity.md b/work/book/src/semantics/granularity.md index b54ac01..484e753 100644 --- a/work/book/src/semantics/granularity.md +++ b/work/book/src/semantics/granularity.md @@ -45,7 +45,7 @@ attribute values with previous caches and stopping the propagation process if they are found to be equal. In the Chain Analysis example, -the [BlockAnalysis](https://github.com/Eliah-Lakhin/lady-deirdre/blob/master/work/crates/examples/src/chain_analysis/semantics.rs#L197) +the [BlockAnalysis](https://github.com/Eliah-Lakhin/lady-deirdre/blob/1f4ecdac2a1d8c73e6d94909fb0c7fcd04d31fc0/work/crates/examples/src/chain_analysis/semantics.rs#L197) input attribute initially collects all assignment statements and inner blocks into two dedicated maps: `assignments` and `blocks`. @@ -58,9 +58,9 @@ pub struct BlockAnalysis { ``` Later on, these maps are utilized in -the [LocalResolution](https://github.com/Eliah-Lakhin/lady-deirdre/blob/master/work/crates/examples/src/chain_analysis/semantics.rs#L155) +the [LocalResolution](https://github.com/Eliah-Lakhin/lady-deirdre/blob/1f4ecdac2a1d8c73e6d94909fb0c7fcd04d31fc0/work/crates/examples/src/chain_analysis/semantics.rs#L155) and -[GlobalResolution](https://github.com/Eliah-Lakhin/lady-deirdre/blob/master/work/crates/examples/src/chain_analysis/semantics.rs#L85) +[GlobalResolution](https://github.com/Eliah-Lakhin/lady-deirdre/blob/1f4ecdac2a1d8c73e6d94909fb0c7fcd04d31fc0/work/crates/examples/src/chain_analysis/semantics.rs#L85) attributes. In theory, we could directly read the *BlockAnalysis* attribute from these computable functions. However, in practice, when the end user modifies the content of a block, it's likely that one of the BlockAnalysis maps may remain @@ -69,8 +69,8 @@ attribute to read just one of the two maps is probably unnecessary[^blockanalysi For these reasons, we spread both maps into the intermediate -[BlockAssignmentMap](https://github.com/Eliah-Lakhin/lady-deirdre/blob/master/work/crates/examples/src/chain_analysis/semantics.rs#L310) -and [BlockNamespaceMap](https://github.com/Eliah-Lakhin/lady-deirdre/blob/master/work/crates/examples/src/chain_analysis/semantics.rs#L337) attributes +[BlockAssignmentMap](https://github.com/Eliah-Lakhin/lady-deirdre/blob/1f4ecdac2a1d8c73e6d94909fb0c7fcd04d31fc0/work/crates/examples/src/chain_analysis/semantics.rs#L310) +and [BlockNamespaceMap](https://github.com/Eliah-Lakhin/lady-deirdre/blob/1f4ecdac2a1d8c73e6d94909fb0c7fcd04d31fc0/work/crates/examples/src/chain_analysis/semantics.rs#L337) attributes by cloning the hash maps into them. Subsequently, we read these maps in the final attributes through these intermediaries independently. @@ -133,9 +133,9 @@ function through which you return `Shared` instead of `T`. This trait is especially handy for propagating the Shared value through intermediate attributes. For instance, -the [BlockAssignmentMap](https://github.com/Eliah-Lakhin/lady-deirdre/blob/master/work/crates/examples/src/chain_analysis/semantics.rs#L328) +the [BlockAssignmentMap](https://github.com/Eliah-Lakhin/lady-deirdre/blob/1f4ecdac2a1d8c73e6d94909fb0c7fcd04d31fc0/work/crates/examples/src/chain_analysis/semantics.rs#L328) simply clones a shared map from -the [BlockAnalysis](https://github.com/Eliah-Lakhin/lady-deirdre/blob/master/work/crates/examples/src/chain_analysis/semantics.rs#L198) +the [BlockAnalysis](https://github.com/Eliah-Lakhin/lady-deirdre/blob/1f4ecdac2a1d8c73e6d94909fb0c7fcd04d31fc0/work/crates/examples/src/chain_analysis/semantics.rs#L198) (which is cheap, as it merely creates a new smart pointer to the same allocation). diff --git a/work/book/src/semantics/incremental-computations.md b/work/book/src/semantics/incremental-computations.md index d8646ae..10fd0ed 100644 --- a/work/book/src/semantics/incremental-computations.md +++ b/work/book/src/semantics/incremental-computations.md @@ -100,7 +100,7 @@ computable function implementation, it should be reflected in the initial semantic model objects by the input attributes. In the Chain Analysis example, only -the [BlockAnalysis](https://github.com/Eliah-Lakhin/lady-deirdre/blob/master/work/crates/examples/src/chain_analysis/semantics.rs#L202) +the [BlockAnalysis](https://github.com/Eliah-Lakhin/lady-deirdre/blob/1f4ecdac2a1d8c73e6d94909fb0c7fcd04d31fc0/work/crates/examples/src/chain_analysis/semantics.rs#L202) attribute (which is a `#[scoped]` attribute of the `#[scope]` node syntax tree node) iterates through the block's inner let-statements and the inner blocks and collects them into HashMaps usable for further analysis. Moreover, this @@ -108,9 +108,9 @@ attribute does not inspect the inner structure of its nested blocks too, because the sub-block's inner syntax structure is outside of the current block scope. Other attributes directly (e.g., -[BlockAssignmentMap](https://github.com/Eliah-Lakhin/lady-deirdre/blob/master/work/crates/examples/src/chain_analysis/semantics.rs#L310)) +[BlockAssignmentMap](https://github.com/Eliah-Lakhin/lady-deirdre/blob/1f4ecdac2a1d8c73e6d94909fb0c7fcd04d31fc0/work/crates/examples/src/chain_analysis/semantics.rs#L310)) or indirectly (e.g., -[LocalResolution](https://github.com/Eliah-Lakhin/lady-deirdre/blob/master/work/crates/examples/src/chain_analysis/semantics.rs#L155) -and [GlobalResolution](https://github.com/Eliah-Lakhin/lady-deirdre/blob/master/work/crates/examples/src/chain_analysis/semantics.rs#L85)) +[LocalResolution](https://github.com/Eliah-Lakhin/lady-deirdre/blob/1f4ecdac2a1d8c73e6d94909fb0c7fcd04d31fc0/work/crates/examples/src/chain_analysis/semantics.rs#L155) +and [GlobalResolution](https://github.com/Eliah-Lakhin/lady-deirdre/blob/1f4ecdac2a1d8c73e6d94909fb0c7fcd04d31fc0/work/crates/examples/src/chain_analysis/semantics.rs#L85)) read the BlockAnalysis's HashMaps, but they do not perform deeper inspection of the node's syntax tree structure inside their computable functions. diff --git a/work/book/src/semantics/scope-access.md b/work/book/src/semantics/scope-access.md index a9e6c31..21825f5 100644 --- a/work/book/src/semantics/scope-access.md +++ b/work/book/src/semantics/scope-access.md @@ -44,7 +44,7 @@ accuracy of this attribute's value, and you can utilize it within any computable functions. For instance, in the Chain Analysis example, -the [LocalResolution](https://github.com/Eliah-Lakhin/lady-deirdre/blob/master/work/crates/examples/src/chain_analysis/semantics.rs#L172) +the [LocalResolution](https://github.com/Eliah-Lakhin/lady-deirdre/blob/1f4ecdac2a1d8c73e6d94909fb0c7fcd04d31fc0/work/crates/examples/src/chain_analysis/semantics.rs#L172) function accesses the scope block of the `ChainNode::Key` node by utilizing this attribute. @@ -83,7 +83,7 @@ parent scopes. The `ChainNode::Block` node, which serves as a top node of a scope, is nested within its parent, Block[^parent]. By iteratively climbing up, you will eventually reach the root of the syntax tree. -The [GlobalResolution](https://github.com/Eliah-Lakhin/lady-deirdre/blob/master/work/crates/examples/src/chain_analysis/semantics.rs#L85) +The [GlobalResolution](https://github.com/Eliah-Lakhin/lady-deirdre/blob/1f4ecdac2a1d8c73e6d94909fb0c7fcd04d31fc0/work/crates/examples/src/chain_analysis/semantics.rs#L85) attribute leverages this feature to calculate the ultimate resolution of the `ChainNode::Key` value by ascending through the hierarchy of nested blocks. diff --git a/work/book/src/semantics/semantic-graph.md b/work/book/src/semantics/semantic-graph.md index 527ca43..8441691 100644 --- a/work/book/src/semantics/semantic-graph.md +++ b/work/book/src/semantics/semantic-graph.md @@ -120,7 +120,7 @@ Similarly to the syntax analysis stage, semantic analysis should be resilient to errors. If the computable function cannot fully infer the target value, it attempts to compute as much metadata as possible or fallback to reasonable defaults without causing a panic. For this reason, most semantic model objects -in the [Chain Analysis](https://github.com/Eliah-Lakhin/lady-deirdre/blob/master/work/crates/examples/src/chain_analysis/semantics.rs#L147) +in the [Chain Analysis](https://github.com/Eliah-Lakhin/lady-deirdre/blob/1f4ecdac2a1d8c73e6d94909fb0c7fcd04d31fc0/work/crates/examples/src/chain_analysis/semantics.rs#L147) example implement the Default trait. For instance, in Rust source code, when introducing a variable with `let x;`, @@ -144,10 +144,10 @@ values. This mechanism allows you to infer more specific semantic facts from more general facts. For instance, in the Chain Analysis example, -the [LocalResolution](https://github.com/Eliah-Lakhin/lady-deirdre/blob/master/work/crates/examples/src/chain_analysis/semantics.rs#L155) +the [LocalResolution](https://github.com/Eliah-Lakhin/lady-deirdre/blob/1f4ecdac2a1d8c73e6d94909fb0c7fcd04d31fc0/work/crates/examples/src/chain_analysis/semantics.rs#L155) attribute infers let-statement references within the local block in which it was declared based on all local assignments -([BlockAssignmentMap](https://github.com/Eliah-Lakhin/lady-deirdre/blob/master/work/crates/examples/src/chain_analysis/semantics.rs#L306) attribute) +([BlockAssignmentMap](https://github.com/Eliah-Lakhin/lady-deirdre/blob/1f4ecdac2a1d8c73e6d94909fb0c7fcd04d31fc0/work/crates/examples/src/chain_analysis/semantics.rs#L306) attribute) within this block. ```rust,noplayground diff --git a/work/book/src/semantics/semantics.md b/work/book/src/semantics/semantics.md index fe6b021..e01464f 100644 --- a/work/book/src/semantics/semantics.md +++ b/work/book/src/semantics/semantics.md @@ -66,7 +66,7 @@ the compilation project. ## Chain Analysis Example The subchapters of this book section refer to -the [Chain Analysis](https://github.com/Eliah-Lakhin/lady-deirdre/tree/master/work/crates/examples/src/chain_analysis) +the [Chain Analysis](https://github.com/Eliah-Lakhin/lady-deirdre/tree/1f4ecdac2a1d8c73e6d94909fb0c7fcd04d31fc0/work/crates/examples/src/chain_analysis) example, which illustrates the basic concepts of the framework. The example program attempts to analyze a simple programming language consisting diff --git a/work/book/src/semantics/tasks-management.md b/work/book/src/semantics/tasks-management.md index 7331795..93a266d 100644 --- a/work/book/src/semantics/tasks-management.md +++ b/work/book/src/semantics/tasks-management.md @@ -162,7 +162,7 @@ function execution. To make the trigger handle state examination more granular, you can manually check its state in long-running computable functions. For instance, in -the [BlockAnalysis](https://github.com/Eliah-Lakhin/lady-deirdre/blob/master/work/crates/examples/src/chain_analysis/semantics.rs#L223) +the [BlockAnalysis](https://github.com/Eliah-Lakhin/lady-deirdre/blob/1f4ecdac2a1d8c73e6d94909fb0c7fcd04d31fc0/work/crates/examples/src/chain_analysis/semantics.rs#L223) attribute of the Chain Analysis example, we are checking the interruption state during the iteration through the assignment statements of the block. diff --git a/work/book/src/semantics/tree-index.md b/work/book/src/semantics/tree-index.md index fadee68..dc2eb15 100644 --- a/work/book/src/semantics/tree-index.md +++ b/work/book/src/semantics/tree-index.md @@ -99,7 +99,7 @@ trait. It denotes classes of nodes, essentially serving as indices, and the function that partitions requested nodes between these classes. In -the [Chain Analysis](https://github.com/Eliah-Lakhin/lady-deirdre/blob/master/work/crates/examples/src/chain_analysis/semantics.rs#L411) +the [Chain Analysis](https://github.com/Eliah-Lakhin/lady-deirdre/blob/1f4ecdac2a1d8c73e6d94909fb0c7fcd04d31fc0/work/crates/examples/src/chain_analysis/semantics.rs#L411) example, we define just one class for all `ChainNode::Key` nodes within the syntax tree. diff --git a/work/book/src/snippets.md b/work/book/src/snippets.md index 293794b..a9a2a1f 100644 --- a/work/book/src/snippets.md +++ b/work/book/src/snippets.md @@ -65,7 +65,7 @@ printed, and annotate arbitrary code spans with string messages. Once building is finished, the Snippet prints the annotated snippet into the Formatter's output. -The [Json Highlight](https://github.com/Eliah-Lakhin/lady-deirdre/blob/master/work/crates/examples/src/json_highlight/highlighter.rs#L45) +The [Json Highlight](https://github.com/Eliah-Lakhin/lady-deirdre/blob/1f4ecdac2a1d8c73e6d94909fb0c7fcd04d31fc0/work/crates/examples/src/json_highlight/highlighter.rs#L45) example demonstrates how to set up this builder on a custom object that wraps a compilation unit document. diff --git a/work/book/src/syntax/error-recovering.md b/work/book/src/syntax/error-recovering.md index 2738c83..361d538 100644 --- a/work/book/src/syntax/error-recovering.md +++ b/work/book/src/syntax/error-recovering.md @@ -78,7 +78,7 @@ In the macro, you can specify a set of panic-recovery halting tokens using the `#[recovery(...)]` macro attribute. In -the [JSON example](https://github.com/Eliah-Lakhin/lady-deirdre/blob/master/work/crates/examples/src/json_grammar/syntax.rs#L46), +the [JSON example](https://github.com/Eliah-Lakhin/lady-deirdre/blob/1f4ecdac2a1d8c73e6d94909fb0c7fcd04d31fc0/work/crates/examples/src/json_grammar/syntax.rs#L46), we specify the following recovery configuration: ```rust,noplayground diff --git a/work/book/src/syntax/hand-written-parsers.md b/work/book/src/syntax/hand-written-parsers.md index d164541..cae52fc 100644 --- a/work/book/src/syntax/hand-written-parsers.md +++ b/work/book/src/syntax/hand-written-parsers.md @@ -44,6 +44,6 @@ is infix expression parsing. Infix expressions usually require left recursion, which cannot be directly expressed in terms of LL(1) grammars. These chapters will guide you through -the [Expr Parser](https://github.com/Eliah-Lakhin/lady-deirdre/tree/master/work/crates/examples/src/expr_parser) +the [Expr Parser](https://github.com/Eliah-Lakhin/lady-deirdre/tree/1f4ecdac2a1d8c73e6d94909fb0c7fcd04d31fc0/work/crates/examples/src/expr_parser) example. This example demonstrates how to parse boolean expressions (e.g., `(true | false) & true`) using the Pratt algorithm. diff --git a/work/book/src/syntax/overriding-a-parser.md b/work/book/src/syntax/overriding-a-parser.md index 82d6e69..455bc48 100644 --- a/work/book/src/syntax/overriding-a-parser.md +++ b/work/book/src/syntax/overriding-a-parser.md @@ -55,7 +55,7 @@ that represents the current state of the parsing environment. Usually, inside this expression, you would call your parsing function passing the `session` variable as an argument. -From the [Expr Parser](https://github.com/Eliah-Lakhin/lady-deirdre/blob/master/work/crates/examples/src/expr_parser/syntax.rs#L57) example: +From the [Expr Parser](https://github.com/Eliah-Lakhin/lady-deirdre/blob/1f4ecdac2a1d8c73e6d94909fb0c7fcd04d31fc0/work/crates/examples/src/expr_parser/syntax.rs#L57) example: ```rust,noplayground diff --git a/work/book/src/syntax/pratts-algorithm.md b/work/book/src/syntax/pratts-algorithm.md index 4203326..2c0aab3 100644 --- a/work/book/src/syntax/pratts-algorithm.md +++ b/work/book/src/syntax/pratts-algorithm.md @@ -36,7 +36,7 @@ In this chapter, I will explain how the algorithm implemented in the hand-written parser in -the [Expr Parser](https://github.com/Eliah-Lakhin/lady-deirdre/tree/master/work/crates/examples/src/expr_parser) +the [Expr Parser](https://github.com/Eliah-Lakhin/lady-deirdre/tree/1f4ecdac2a1d8c73e6d94909fb0c7fcd04d31fc0/work/crates/examples/src/expr_parser) example works in general. You may find this approach useful for programming languages with infix expressions (math expressions with binary operators). diff --git a/work/book/src/syntax/syntax-grammar.md b/work/book/src/syntax/syntax-grammar.md index ce32f36..3de7634 100644 --- a/work/book/src/syntax/syntax-grammar.md +++ b/work/book/src/syntax/syntax-grammar.md @@ -62,7 +62,7 @@ The opposite ascending node-to-parent relationships are established automatically if you declare a variant field with the `#[parent]` macro attribute. -From the [JSON example](https://github.com/Eliah-Lakhin/lady-deirdre/blob/master/work/crates/examples/src/json_grammar/syntax.rs): +From the [JSON example](https://github.com/Eliah-Lakhin/lady-deirdre/blob/1f4ecdac2a1d8c73e6d94909fb0c7fcd04d31fc0/work/crates/examples/src/json_grammar/syntax.rs): ```rust,noplayground @@ -141,7 +141,7 @@ this guide. In this chapter, I will intentionally omit some details, referring you to the [macro documentation](https://docs.rs/lady-deirdre/2.0.0/lady_deirdre/syntax/derive.Node.html) for a more verbose description of the available features, and to -the [JSON example](https://github.com/Eliah-Lakhin/lady-deirdre/blob/master/work/crates/examples/src/json_grammar/syntax.rs) +the [JSON example](https://github.com/Eliah-Lakhin/lady-deirdre/blob/1f4ecdac2a1d8c73e6d94909fb0c7fcd04d31fc0/work/crates/examples/src/json_grammar/syntax.rs) as an example of a node implementation that utilizes most of the macro's capabilities. @@ -260,7 +260,7 @@ Examples: function. In particular, for this reason, in - the [JSON object and array rules](https://github.com/Eliah-Lakhin/lady-deirdre/blob/master/work/crates/examples/src/json_grammar/syntax.rs#L96), + the [JSON object and array rules](https://github.com/Eliah-Lakhin/lady-deirdre/blob/1f4ecdac2a1d8c73e6d94909fb0c7fcd04d31fc0/work/crates/examples/src/json_grammar/syntax.rs#L96), we capture start and end tokens even though they are meaningless in terms of syntax tree traversing. @@ -304,7 +304,7 @@ Examples: with node captures, so you should prefer wrapping. For example, in - the [JSON object entry rule](https://github.com/Eliah-Lakhin/lady-deirdre/blob/master/work/crates/examples/src/json_grammar/syntax.rs#L83), + the [JSON object entry rule](https://github.com/Eliah-Lakhin/lady-deirdre/blob/1f4ecdac2a1d8c73e6d94909fb0c7fcd04d31fc0/work/crates/examples/src/json_grammar/syntax.rs#L83), we capture the entry's key as a node-wrapper (String node) rather than as a token for this reason. diff --git a/work/book/src/syntax/syntax-session.md b/work/book/src/syntax/syntax-session.md index a2a9e6e..7dc2e53 100644 --- a/work/book/src/syntax/syntax-session.md +++ b/work/book/src/syntax/syntax-session.md @@ -70,7 +70,7 @@ or [TokenCursor::skip](https://docs.rs/lady-deirdre/2.0.0/lady_deirdre/lexis/tra which allows you to consume several tokens. For instance, in -the [Expr Parser](https://github.com/Eliah-Lakhin/lady-deirdre/blob/master/work/crates/examples/src/expr_parser/parser.rs#L271) +the [Expr Parser](https://github.com/Eliah-Lakhin/lady-deirdre/blob/1f4ecdac2a1d8c73e6d94909fb0c7fcd04d31fc0/work/crates/examples/src/expr_parser/parser.rs#L271) example, we are parsing a sequence of whitespaces iteratively by reading the tokens one by one: @@ -133,7 +133,7 @@ and stored in a static for fast reuse. Depending on the parsing procedure complexity, you may want to prepare several Recovery objects for various types of syntax errors. For instance, in -the [Expr Parser](https://github.com/Eliah-Lakhin/lady-deirdre/blob/master/work/crates/examples/src/expr_parser/parser.rs#L54) +the [Expr Parser](https://github.com/Eliah-Lakhin/lady-deirdre/blob/1f4ecdac2a1d8c73e6d94909fb0c7fcd04d31fc0/work/crates/examples/src/expr_parser/parser.rs#L54) example, there are three prepared Recovery objects: one to recover from syntax errors in the operators, one for operands, and one for errors inside the parentheses. @@ -247,7 +247,7 @@ You should prefer to use the *descend* function on the [primary nodes](syntax-grammar.md#incremental-reparsing) whenever possible. In -the [Expr Parser](https://github.com/Eliah-Lakhin/lady-deirdre/blob/master/work/crates/examples/src/expr_parser/parser.rs#L230) +the [Expr Parser](https://github.com/Eliah-Lakhin/lady-deirdre/blob/1f4ecdac2a1d8c73e6d94909fb0c7fcd04d31fc0/work/crates/examples/src/expr_parser/parser.rs#L230) example, we are using this method to descend into the subexpression when parsing the expression group surrounded by the `(...)` parentheses. @@ -347,7 +347,7 @@ function automatically changes the parent NodeRef of the former sibling to the node that we start parsing. From the operator parser of -the [Expr Parser](https://github.com/Eliah-Lakhin/lady-deirdre/blob/master/work/crates/examples/src/expr_parser/parser.rs#L90) +the [Expr Parser](https://github.com/Eliah-Lakhin/lady-deirdre/blob/1f4ecdac2a1d8c73e6d94909fb0c7fcd04d31fc0/work/crates/examples/src/expr_parser/parser.rs#L90) example: ```rust,noplayground diff --git a/work/crates/derive/readme.md b/work/crates/derive/readme.md index 25b71ad..6a77414 100644 --- a/work/crates/derive/readme.md +++ b/work/crates/derive/readme.md @@ -34,7 +34,7 @@ # Lady Deirdre Macros Crate -Lady Deirdre Logo +Lady Deirdre Logo This is a helper crate for the [main crate](https://crates.io/crates/lady-deirdre) of Lady Deirdre, compiler front-end foundation technology.