Arpeggio-2.0.2/ 0000755 0001750 0001750 00000000000 14452523355 013636 5 ustar debalance debalance Arpeggio-2.0.2/runtests.sh 0000755 0001750 0001750 00000000430 14452523355 016061 0 ustar debalance debalance #!/bin/sh
# Run all tests and generate coverage report
coverage run --omit="arpeggio/tests/*" --source arpeggio -m pytest arpeggio/tests || exit 1
coverage report --fail-under 90 || exit 1
# Run this to generate html report
# coverage html --directory=coverage
#flake8 || exit 1
Arpeggio-2.0.2/docs/ 0000755 0001750 0001750 00000000000 14452523355 014566 5 ustar debalance debalance Arpeggio-2.0.2/docs/extra.css 0000644 0001750 0001750 00000000602 14452523355 016421 0 ustar debalance debalance div.col-md-9 img[alt="Arpeggio logo"] { background-color: transparent; border: none; }
div.col-md-9 h1:first-of-type {
text-align: center;
font-size: 60px;
font-weight: 300;
}
div.col-md-9>p:first-of-type {
text-align: center;
}
div.col-md-9 p.admonition-title:first-of-type {
text-align: left;
}
div.col-md-9 h1:first-of-type .headerlink {
display: none;
}
Arpeggio-2.0.2/docs/js/ 0000755 0001750 0001750 00000000000 14452523355 015202 5 ustar debalance debalance Arpeggio-2.0.2/docs/js/version-select.js 0000644 0001750 0001750 00000004037 14452523355 020506 0 ustar debalance debalance window.addEventListener("DOMContentLoaded", function() {
function normalizePath(path) {
var normalized = [];
path.split("/").forEach(function(bit, i) {
if (bit === "." || (bit === "" && i !== 0)) {
return;
} else if (bit === "..") {
if (normalized.length === 1 && normalized[0] === "") {
// We must be trying to .. past the root!
throw new Error("invalid path");
} else if (normalized.length === 0 ||
normalized[normalized.length - 1] === "..") {
normalized.push("..");
} else {
normalized.pop();
}
} else {
normalized.push(bit);
}
});
return normalized.join("/");
}
// `base_url` comes from the base.html template for this theme.
var REL_BASE_URL = base_url;
var ABS_BASE_URL = normalizePath(window.location.pathname + "/" +
REL_BASE_URL);
var CURRENT_VERSION = ABS_BASE_URL.split("/").pop();
function makeSelect(options, selected) {
var select = document.createElement("select");
options.forEach(function(i) {
var option = new Option(i.text, i.value, undefined,
i.value === selected);
select.add(option);
});
return select;
}
var xhr = new XMLHttpRequest();
xhr.open("GET", REL_BASE_URL + "/../versions.json");
xhr.onload = function() {
var versions = JSON.parse(this.responseText);
var realVersion = versions.find(function(i) {
return i.version === CURRENT_VERSION ||
i.aliases.includes(CURRENT_VERSION);
}).version;
var select = makeSelect(versions.map(function(i) {
return {text: i.title, value: i.version};
}), realVersion);
select.id = "version-selector";
select.addEventListener("change", function(event) {
window.location.href = REL_BASE_URL + "/../" + this.value;
});
var title = document.querySelector("div.wy-side-nav-search");
title.insertBefore(select, title.querySelector(".icon-home").nextSibling);
};
xhr.send();
});
Arpeggio-2.0.2/docs/index.md 0000644 0001750 0001750 00000006370 14452523355 016225 0 ustar debalance debalance 
Arpeggio is recursive descent parser with backtracking and memoization (a.k.a.
pacrat parser). Arpeggio grammars are based on [PEG
formalism](http://en.wikipedia.org/wiki/Parsing_expression_grammar).
Arpeggio's main use is a foundation for a tool-chain for DSL development but it
can be used for all sort of general purpose parsing.
For more information on PEG and packrat parsers see [this
page](http://bford.info/packrat/).
For a higher level library for building DSLs take a look at
[textX](https://github.com/textX/textX). It builds on top of Arpeggio
and makes language parser implementation a lot easier.
See [Getting started](getting_started.md) in the `User Guide` menu to get you going or read some of the
tutorials.
## Features
- Using [Parsing Expression Grammar](http://en.wikipedia.org/wiki/Parsing_expression_grammar)
and packrat parsing - unambiguous grammars, unlimited lookahead, linear time.
- Works as grammar interpreter - no code is generated.
- Multiple syntaxes for grammar definition ([Python](grammars.md#grammars-written-in-python),
[peg, cleanpeg](grammars.md#grammars-written-in-peg-notations), make your own)
* [Case sensitive/insensitive
parsing](configuration.md#case-insensitive-parsing)
* [Whitespace handling control](configuration.md#white-space-handling)
* [Keyword handling](configuration.md#keyword-handling)
* [Support for comments](configuration.md#comment-handling)
* [Newline termination for
Repetition](configuration.md#newline-termination-for-repetitions) (available only in Python syntax)
* [Parse tree navigation](parse_trees.md)
* [Visitors for semantic analysis](semantics.md)
* [Extensive error reporting](handling_errors.md)
* [Good support for debugging and visualization](debugging.md)
* [Good test coverage](https://github.com/textX/Arpeggio/tree/master/tests/unit)
* Beautiful mkdocs documentation - you are reading it
## Python versions
Arpeggio works with Python 3.6+. Other versions might work but are not tested.
## Open-source projects using Arpeggio
- [textX](https://github.com/textX/textX) - Meta-language for building
Domain-Specific Languages in Python (and all projects using textX)
- [whatami](https://github.com/sdvillal/whatami) - Unobtrusive object
self-identification for Python
([parsers](https://github.com/sdvillal/whatami/blob/master/whatami/parsers.py)
module)
- [ithkuil](https://github.com/fizyk20/ithkuil) - A Python package providing
tools for analysing texts in the [Ithkuil](http://ithkuil.net/) constructed language.
## Why is it called arpeggio?
In music, arpeggio is playing the chord notes one by one in sequence. I came up
with the name by thinking that parsing is very similar to arpeggios in music.
You take tokens one by one from an input and make sense out of it – make a
chord!
Well, if you don't buy this maybe it is time to tell you the truth. I searched
the dictionary for the words that contain PEG acronym and the word arpeggio was
at the top of the list ;)
## Citing Arpeggio
If you use Arpeggio please cite this paper:
Dejanović I., Milosavljević G., Vaderna R.: Arpeggio: A flexible PEG parser for
Python, Knowledge-Based Systems, 2016, 95, 71 - 74,
[doi:10.1016/j.knosys.2015.12.004](http://dx.doi.org/10.1016/j.knosys.2015.12.004)
Arpeggio-2.0.2/docs/css/ 0000755 0001750 0001750 00000000000 14452523355 015356 5 ustar debalance debalance Arpeggio-2.0.2/docs/css/version-select.css 0000644 0001750 0001750 00000000126 14452523355 021031 0 ustar debalance debalance #version-selector {
display: block;
margin: -10px auto 0.809em;
padding: 2px;
}
Arpeggio-2.0.2/docs/images/ 0000755 0001750 0001750 00000000000 14452523355 016033 5 ustar debalance debalance Arpeggio-2.0.2/docs/images/arpeggio-logo.svg 0000644 0001750 0001750 00000033277 14452523355 021323 0 ustar debalance debalance
Arpeggio-2.0.2/docs/images/csvfile_parse_tree.dot.png 0000644 0001750 0001750 00001031255 14452523355 023201 0 ustar debalance debalance PNG
IHDR D " W[A bKGD IDATxy|Se=]tOw
PcKA-
Ha|AqEEtMH VM6K%i=RϝܧM͕˯C @W{ aN ^D = lfvtqxxxpp$I~~~:.88X3
aN @_khh8rHeeeUUd4LUUU"x:;Z666`0$%%~1bĈО: :::Ԟ `x|ȑ#GKjt:N
bW!!!aaabln$I퍍vfv1j
SRRF1bĈ#Gs9GNJJR !0' 'utt;wܻw}G@@O9rRSSfV---ǎӤG9tPyy$IYYYGrssSRRfJ :s N}͛#""=ѣG=:++
U{,ޟٳ~hoo͝8qg 0 >IHH3fLnnnNNرc՞innkWqqqQQQQQj6lؤI'O 0P ڏ>hٲe[n
?~)SLrYg=m۶k[nϞ=!!!]v5\3}~X1
~0' [ZZZVXlذA̘1+k]|yaaaXX،3| 0' Fŋx
rEp
W^yeDDk
e˖Yf͚5+::Zy # 8۷?3WNLL3gάYԞ8hѢ$tM