![]() |
Qucs-S S-parameter Viewer & RF Synthesis Tools
|


Public Member Functions | |
| method_rule (self, text, pos) | |
| test_expressions_from_rules (self) | |
| test_unicode (self) | |
| test_match (self) | |
| test_bad_grammar (self) | |
| test_comments (self) | |
| test_multi_line (self) | |
| test_not (self) | |
| test_lookahead (self) | |
| test_parens (self) | |
| test_resolve_refs_order (self) | |
| test_resolve_refs_completeness (self) | |
| test_infinite_loop (self) | |
| test_circular_toplevel_reference (self) | |
| test_right_recursive (self) | |
| test_badly_circular (self) | |
| test_parens_with_leading_whitespace (self) | |
| test_single_quoted_literals (self) | |
| test_simple_custom_rules (self) | |
| test_complex_custom_rules (self) | |
| test_lazy_custom_rules (self) | |
| test_unconnected_custom_rules (self) | |
| test_callability_of_routines (self) | |
| test_callability_custom_rules (self) | |
| test_lazy_default_rule (self) | |
| test_immutable_grammar (self) | |
| test_repr (self) | |
| test_rule_ordering_is_preserved (self) | |
| test_rule_ordering_is_preserved_on_shallow_copies (self) | |
| test_repetitions (self) | |
| test_equal (self) | |
Static Public Member Functions | |
| descriptor_rule (text, pos) | |
Public Attributes | |
| method_rule | |
Static Public Attributes | |
| dict | rules = {"descriptor_rule": descriptor_rule} |
Integration-test ``Grammar``: feed it a PEG and see if it works.
|
static |
This is an example of a grammar rule implemented as a descriptor, and is provided as a test fixture.
| parsimonious.tests.test_grammar.GrammarTests.method_rule | ( | self, | |
| text, | |||
| pos | |||
| ) |
This is an example of a grammar rule implemented as a method, and is provided as a test fixture.
| parsimonious.tests.test_grammar.GrammarTests.test_bad_grammar | ( | self | ) |
Constructing a Grammar with bad rules should raise ParseError.
| parsimonious.tests.test_grammar.GrammarTests.test_badly_circular | ( | self | ) |
Uselessly circular references should be detected by the grammar compiler.
| parsimonious.tests.test_grammar.GrammarTests.test_callability_custom_rules | ( | self | ) |
Confirms that functions, methods and method descriptors can all be used to supply custom grammar rules.
| parsimonious.tests.test_grammar.GrammarTests.test_comments | ( | self | ) |
Test tolerance of comments and blank lines in and around rules.
| parsimonious.tests.test_grammar.GrammarTests.test_complex_custom_rules | ( | self | ) |
Run 5-arg custom rules through their paces. Incidentally tests returning an actual Node from the custom rule.
| parsimonious.tests.test_grammar.GrammarTests.test_expressions_from_rules | ( | self | ) |
Test the ``Grammar`` base class's ability to compile an expression tree from rules. That the correct ``Expression`` tree is built is already tested in ``RuleGrammarTests``. This tests only that the ``Grammar`` base class's ``_expressions_from_rules`` works.
| parsimonious.tests.test_grammar.GrammarTests.test_immutable_grammar | ( | self | ) |
Make sure that a Grammar is immutable after being created.
| parsimonious.tests.test_grammar.GrammarTests.test_infinite_loop | ( | self | ) |
Smoke-test a grammar that was causing infinite loops while building. This was going awry because the "int" rule was never getting marked as resolved, so it would just keep trying to resolve it over and over.
| parsimonious.tests.test_grammar.GrammarTests.test_lazy_custom_rules | ( | self | ) |
Make sure LazyReferences manually shoved into custom rules are resolved. Incidentally test passing full-on Expressions as custom rules and having a custom rule as the default one.
| parsimonious.tests.test_grammar.GrammarTests.test_lazy_default_rule | ( | self | ) |
Make sure we get an actual rule set as our default rule, even when the first rule has forward references and is thus a LazyReference at some point during grammar compilation.
| parsimonious.tests.test_grammar.GrammarTests.test_match | ( | self | ) |
Make sure partial-matching (with pos) works.
| parsimonious.tests.test_grammar.GrammarTests.test_multi_line | ( | self | ) |
Make sure we tolerate all sorts of crazy line breaks and comments in the middle of rules.
| parsimonious.tests.test_grammar.GrammarTests.test_not | ( | self | ) |
Make sure "not" predicates get parsed and work properly.
| parsimonious.tests.test_grammar.GrammarTests.test_parens_with_leading_whitespace | ( | self | ) |
Make sure a parenthesized expression is allowed to have leading whitespace when nested directly inside another.
| parsimonious.tests.test_grammar.GrammarTests.test_resolve_refs_completeness | ( | self | ) |
Smoke-test another circumstance where lazy references don't get resolved.
| parsimonious.tests.test_grammar.GrammarTests.test_resolve_refs_order | ( | self | ) |
Smoke-test a circumstance where lazy references don't get resolved.
| parsimonious.tests.test_grammar.GrammarTests.test_right_recursive | ( | self | ) |
Right-recursive refs should resolve.
| parsimonious.tests.test_grammar.GrammarTests.test_simple_custom_rules | ( | self | ) |
Run 2-arg custom-coded rules through their paces.
| parsimonious.tests.test_grammar.GrammarTests.test_unconnected_custom_rules | ( | self | ) |
Make sure custom rules that aren't hooked to any other rules still get included in the grammar and that lone ones get set as the default. Incidentally test Grammar's `rules` default arg.
| parsimonious.tests.test_grammar.GrammarTests.test_unicode | ( | self | ) |
Assert that a ``Grammar`` can convert into a string-formatted series of rules.