Skip to content

Commit

Permalink
URLs fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Eliah-Lakhin committed Jun 19, 2024
1 parent 1f4ecda commit 3722540
Show file tree
Hide file tree
Showing 21 changed files with 43 additions and 43 deletions.
2 changes: 1 addition & 1 deletion work/book/src/code-formatters/code-formatters.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
4 changes: 2 additions & 2 deletions work/book/src/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

# Introduction

<img style="width: 160px" alt="Lady Deirdre Logo" src="https://github.com/Eliah-Lakhin/lady-deirdre/blob/master/work/logo.jpg" />
<img align="right" style="width: 160px" alt="Lady Deirdre Logo" src="https://raw.githubusercontent.com/Eliah-Lakhin/lady-deirdre/1f4ecdac2a1d8c73e6d94909fb0c7fcd04d31fc0/work/logo.jpg" />

Lady Deirdre is a framework that helps you develop front-end code analysis
tools, such as code editor language extensions, programming language compilers
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion work/book/src/lexis/lexical-grammar.md
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
8 changes: 4 additions & 4 deletions work/book/src/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down Expand Up @@ -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)]
Expand Down Expand Up @@ -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
Expand All @@ -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::<ChainNode>::new(AnalyzerConfig::default());
Expand Down
2 changes: 1 addition & 1 deletion work/book/src/semantics/configuration-issues.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion work/book/src/semantics/grammar-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 7 additions & 7 deletions work/book/src/semantics/granularity.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.

Expand All @@ -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
Expand All @@ -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.

Expand Down Expand Up @@ -133,9 +133,9 @@ function through which you return `Shared<T>` 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).

Expand Down
8 changes: 4 additions & 4 deletions work/book/src/semantics/incremental-computations.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,17 +100,17 @@ 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
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.
4 changes: 2 additions & 2 deletions work/book/src/semantics/scope-access.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -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.

Expand Down
6 changes: 3 additions & 3 deletions work/book/src/semantics/semantic-graph.md
Original file line number Diff line number Diff line change
Expand Up @@ -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;`,
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion work/book/src/semantics/semantics.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion work/book/src/semantics/tasks-management.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion work/book/src/semantics/tree-index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion work/book/src/snippets.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion work/book/src/syntax/error-recovering.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion work/book/src/syntax/hand-written-parsers.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
2 changes: 1 addition & 1 deletion work/book/src/syntax/overriding-a-parser.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion work/book/src/syntax/pratts-algorithm.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

Expand Down
Loading

0 comments on commit 3722540

Please sign in to comment.