• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

renatahodovan / grammarinator / 13485354897
84%

Build:
DEFAULT BRANCH: master
Ran 23 Feb 2025 05:37PM UTC
Jobs 1
Files 26
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

23 Feb 2025 05:34PM UTC coverage: 83.697% (-0.2%) from 83.859%
13485354897

push

github

web-flow
Fix user guide about models (#280)

- The example grammar was incorrect, at least for parsing. For
  ANTLR, character classes are invalid in parser rules, may only be
  used in lexer rules. Thus, grammar was rewritten to use lexer
  rules.
- In the python examples, indentation was off by one for `quantify`
  and `charset` methods. Fixed.
- The `quantify` methods in the examples used an old API: the
  number and names of arguments was incorrect, and the methods
  still acted as generators. So, the `cnt` argument was added,
  `min` and `max` were renamed to `start` and `stop`, and `return`
  was used instead of `yield`ing.
- Since the `decimal` rule in the grammar got turned into an lexer
  rule, `Decimal` nodes don't have children anymore. Thus,
  `charset` methods in the examples have been updated to make
  decisions based on token length instead of children count.
- It got revealed that `charset` methods don't get charsets as
  lists but as tuples. The documentation of `Model.charset` had to
  updated and example `charset` methods had to be adapted.
- All methods in the `DispatchingModel` subclass example fell into
  infinite recursion. The use of `super()` in the subclass directed
  the call to the method defined in `DispatchingModel`, which in
  turn called back into the subclass (and so on), instead of
  calling to the method in `DefaultModel`, the parent class of
  `DispatchingModel` and the grandparent of the subclass. Fixed by
  using the two-argument version of `super(..., ...)`.

Fixes: #272

2069 of 2472 relevant lines covered (83.7%)

0.84 hits per line

Uncovered Existing Lines

Lines Coverage ∆ File
4
65.16
-1.81% grammarinator/runtime/rule.py
14
67.63
-0.36% grammarinator/tool/generator.py
Jobs
ID Job ID Ran Files Coverage
1 13485354897.1 23 Feb 2025 05:37PM UTC 26
83.7
Source Files on build 13485354897
  • Tree
  • List 26
  • Changed 3
  • Source Changed 0
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 0402b7f0 on github
  • Prev Build on master (#13485051217)
  • Next Build on master (#13578064734)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc