Reimplementation of Scansion in Rust
|
||
---|---|---|
examples | ||
src | ||
.gitignore | ||
.woodpecker.yml | ||
Cargo.toml | ||
LICENSE | ||
README.md | ||
rustfmt.toml |
Scansion-dsl
Parser for the Scansion project DSL.
License
SPDX: MPL-2.0. See LICENSE file.
Parsing support
Language features are more or less defined here:
https://matthewwild.co.uk/projects/scansion/usage/script-basics/
This library supports parsing the following:
- Metadata
- Client
- Attributes
Following lines beginning with at least a tab (\t
) character, in the formattr: value
, and ending with a newline (\n
). Any line that matches this format will be parsed and will be discarded if it doesn't match an actual client attribute.- jid: Expects a bare jid or a full jid. Will be converted to
jid::Jid
. - password
- custom_host
- custom_port: Expect a u16
- jid: Expects a bare jid or a full jid. Will be converted to
- Attributes
- [-] Actions
- 'connects'
- 'disconnects'
- [-] 'sends:' / 'receives:'
- A block of lines each starting with a tab (
\t
) after the action will be converted to aminidom::Element
. nothing
as the absence of stanza.
- A block of lines each starting with a tab (
- Comments
Optional lines starting with a#
or//
and ending with a newline (\n
). They get discarded in the output
minidom::Element
Minidom Element
s require every element to be namespaced. This parser adds
jabber:client
as a default namespace. It also adds a scansion
namespace
that is used for the scansion:strict
XML parameter.