Skip to main content
Homepage
Explore
Search or go to…
/
Register
Sign in
Explore
Primary navigation
Project
M
motion-grammar-example
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Collapse sidebar
Snippets
Groups
Projects
Show more breadcrumbs
JastAdd
motion-grammar-example
Commits
eb29b9a1
Commit
eb29b9a1
authored
Feb 27, 2022
by
Johannes Mey
Browse files
Options
Downloads
Patches
Plain Diff
add parser page
parent
2140fdad
No related branches found
No related tags found
No related merge requests found
Pipeline
#12784
passed
Feb 27, 2022
Status:
Stage: build
Status:
Stage: test
Status:
Stage: ragdoc
Status:
Stage: publish
Status:
Stage: deploy
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
pages/docs/index.md
+7
-5
7 additions, 5 deletions
pages/docs/index.md
pages/docs/parsing.md
+21
-0
21 additions, 0 deletions
pages/docs/parsing.md
pages/mkdocs.yml
+2
-1
2 additions, 1 deletion
pages/mkdocs.yml
with
30 additions
and
6 deletions
pages/docs/index.md
+
7
−
5
View file @
eb29b9a1
...
@@ -2,22 +2,24 @@
...
@@ -2,22 +2,24 @@
A testbed for a potential
*motion grammar*
[^1] implementation using JastAdd.
A testbed for a potential
*motion grammar*
[^1] implementation using JastAdd.
##
Descrip
tion
##
Introduc
tion
The motion grammar describes the Load/Unload scenario from Dantam[^1]. The point of this very simple grammar was
*not*
The motion grammar describes the Load/Unload scenario from Dantam[^1]. The point of this very simple grammar was
*not*
to show how motion grammars work, but rather the expressiveness of a CFG (compared to a regular grammar), but it is very
to show how motion grammars work, but rather the expressiveness of a CFG (compared to a regular grammar), but it is very
simple, so it serves as a starting point.
simple, so it serves as a starting point.
## Grammar


The
structure grammar is shown (after building the project) in
`src/gen/resources/diagrams/grammar/uml.png`
. It
The
grammar comprises three parts.
`MotionGrammar`
contains generic nonterminals present in every motion
comprises three parts.
`MotionGrammar`
contains generic nonterminals present in every motion grammar,
`LoadUnload`
has
grammar,
`LoadUnload`
has the actual nonterminals of the grammar, and
`World`
describes the context within which the
the actual nonterminals of the grammar, and
`World`
describes the context within which the
grammar is parsed.
grammar is parsed.
Currently, the parser reads a sequence of
`Load`
,
`Unload`
, and
`Full`
tokens and loads a
`Container`
with up to ten
Currently, the parser reads a sequence of
`Load`
,
`Unload`
, and
`Full`
tokens and loads a
`Container`
with up to ten
elements.
elements.
There are no
t
attributes used so far, but at each point where a semantic action takes place, the AST is printed to a
There are no attributes used so far, but at each point where a semantic action takes place, the AST is printed to a
file in
`src/gen/resources/diagrams/parsing`
, demonstrating the "available" part of the AST, which could be used by
file in
`src/gen/resources/diagrams/parsing`
, demonstrating the "available" part of the AST, which could be used by
attributes.
attributes.
...
...
...
...
This diff is collapsed.
Click to expand it.
pages/docs/parsing.md
0 → 100644
+
21
−
0
View file @
eb29b9a1
# Parsing the Load/Unload World
| Action | World | Motion Grammar |
|--------|---------------------------------------------------------------------------------|------------------------------------------------------------------------|
| | !
[](
diagrams/parsing/Context-World-000-initial.png
)
| |
| Load | !
[](
diagrams/parsing/Context-World-001-parseLoad.png
)
| !
[](
diagrams/parsing/AST-001-parseLoad.png
)
|
| Load | !
[](
diagrams/parsing/Context-World-002-parseLoad.png
)
| !
[](
diagrams/parsing/AST-002-parseLoad.png
)
|
| Load | !
[](
diagrams/parsing/Context-World-003-parseLoad.png
)
| !
[](
diagrams/parsing/AST-003-parseLoad.png
)
|
| Full | !
[](
diagrams/parsing/Context-World-004-parseFull.png
)
| !
[](
diagrams/parsing/AST-004-parseFull.png
)
|
| T2 | !
[](
diagrams/parsing/Context-World-005-parseT2.png
)
| !
[](
diagrams/parsing/AST-005-parseT2.png
)
|
| T | !
[](
diagrams/parsing/Context-World-006-parseT.png
)
| !
[](
diagrams/parsing/AST-006-parseT.png
)
|
| Unload | !
[](
diagrams/parsing/Context-World-007-parseUnload.png
)
| !
[](
diagrams/parsing/AST-007-parseUnload.png
)
|
| T1 | !
[](
diagrams/parsing/Context-World-008-parseT1.png
)
| !
[](
diagrams/parsing/AST-008-parseT1.png
)
|
| T | !
[](
diagrams/parsing/Context-World-009-parseT.png
)
| !
[](
diagrams/parsing/AST-009-parseT.png
)
|
| Unload | !
[](
diagrams/parsing/Context-World-010-parseUnload.png
)
| !
[](
diagrams/parsing/AST-010-parseUnload.png
)
|
| T1 | !
[](
diagrams/parsing/Context-World-011-parseT1.png
)
| !
[](
diagrams/parsing/AST-011-parseT1.png
)
|
| T | !
[](
diagrams/parsing/Context-World-012-parseT.png
)
| !
[](
diagrams/parsing/AST-012-parseT.png
)
|
| Unload | !
[](
diagrams/parsing/Context-World-013-parseUnload.png
)
| !
[](
diagrams/parsing/AST-013-parseUnload.png
)
|
| T1 | !
[](
diagrams/parsing/Context-World-014-parseT1.png
)
| !
[](
diagrams/parsing/AST-014-parseT1.png
)
|
| T | !
[](
diagrams/parsing/Context-World-015-parseT.png
)
| !
[](
diagrams/parsing/AST-015-parseT.png
)
|
| | !
[](
diagrams/parsing/Context-World-016-complete.png
)
| !
[](
diagrams/parsing/AST-016-complete.png
)
|
This diff is collapsed.
Click to expand it.
pages/mkdocs.yml
+
2
−
1
View file @
eb29b9a1
...
@@ -3,7 +3,8 @@ repo_url: https://git-st.inf.tu-dresden.de/jastadd/motion-grammar-example
...
@@ -3,7 +3,8 @@ repo_url: https://git-st.inf.tu-dresden.de/jastadd/motion-grammar-example
site_dir
:
../public
site_dir
:
../public
nav
:
nav
:
-
"
Motion
Grammar
Example"
:
index.md
-
"
Overview"
:
index.md
-
"
Parsing
Example"
:
parsing.md
-
"
API
documentation"
:
ragdoc/index.html
-
"
API
documentation"
:
ragdoc/index.html
theme
:
theme
:
...
...
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment