Skip to content

Commit

Permalink
fixed documentation of Box
Browse files Browse the repository at this point in the history
  • Loading branch information
jurgenvinju committed Apr 2, 2024
1 parent d4745a4 commit 8495825
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/org/rascalmpl/library/lang/box/syntax/Box.rsc
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ import List;
* `SPACE` produces `space` spaces
* `L` produces A literal word. This word may only contain printable characters and no spaces; this is a required property that the formatting algorithm depends on for correctness.
* `U` splices its contents in the surrounding box, for automatic flattening of overly nested structures in syntax trees.
* `((G))` is an additional group-by feature that reduces tot the above core features
* `((SL))` is a convenience box for separated syntax lists based on ((G))
* `NULL()` is the group that will dissappear from its context, useful for skipping content. It is based on the ((U)) box.
* `G` is an additional group-by feature that reduces tot the above core features
* `SL` is a convenience box for separated syntax lists based on `G`
* `NULL()` is the group that will dissappear from its context, useful for skipping content. It is based on the `U` box.
}
@benefits{
* Box expressions are a declarative mechanism to express formatting rules that are flexible enough to deal
Expand Down
6 changes: 3 additions & 3 deletions src/org/rascalmpl/library/lang/box/util/Box2Text.rsc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
@contributor{Bert Lisser - [email protected] (CWI)}
@synopsis{Two-dimensional text layout algorithm}
@description{
The input to Box2Text is a hierarchy of "Boxes" represented by the ((data:Box)) algebraic data-type.
The input to Box2Text is a hierarchy of "Boxes" represented by the Box algebraic data-type.
These boxes put hard and soft relative positioning constraints on the embedded text fragments, and
there is the global soft constraints of the width of the screen (or the paper). Box2Text can also
add markup for syntax highlighting in either ANSI plaintext encoding, HTML font tags or LaTex macros.
Expand All @@ -19,8 +19,8 @@ This implementation is a port from ASF+SDF to Rascal. The ASF+SDF implementation
and Eelco Visser (June 30, 1994). The original Box concept was introduced by Joel Coutaz as this technical report:
"The Box, A Layout Abstraction for User Interface Toolkits" (1984) Pittsburgh, PA: Carnegie Mellon University.
The main function `format` maps a ((data:Box)) tree to a `str`:
* To obtain ((data:Box)) terms people typically transform ASTs or ((ParseTree))s to ((data:Box)) using pattern matching in Rascal.
The main function `format` maps a Box tree to a `str`:
* To obtain Box terms people typically transform ASTs or ((ParseTree))s to Box using pattern matching in Rascal.
* ((Options)) encode global default options for constraint parameters that only override local parameters if they were elided.
* ((MarkupLanguage)) configures which markup language to use for syntax highlighting purposes.
}
Expand Down

0 comments on commit 8495825

Please sign in to comment.