11 Commits

Author SHA1 Message Date
Khaled Hosny
cedf79b505 [voltLib] Return a tuple from parse_coverage_()
This is a followup to commit 94633e9f46975c356ec3a2d21ed30768c2fa0cd5,
where I mistakenly made it return an Enum but parse_coverage_() it not
used only for ENUMs and in many (most?) places returning an Enum is
wrong as you have a list of separate items that has to rmain separate.
2019-02-02 01:13:14 +02:00
Khaled Hosny
c5bbd39577 [voltLib] Add test for MARK glyph type 2019-01-24 13:59:06 +02:00
Khaled Hosny
cd553debc3 [voltLib] Accept COMPONENT glyph type 2019-01-24 13:55:53 +02:00
Khaled Hosny
098ce94edb Minor 2019-01-23 10:18:44 +02:00
Khaled Hosny
b6ec12bad0 [voltLib] Distinguish different PROCESS_MARKS
PROCESS_MARKS followed by a group name is used for markAttachmentType
lookup flag, while followed by MARK_GLYPH_SET is used for
useMarkFilteringSet. The code parsed both correctly but did not
distinguish between the two in the generated AST as it should since they
compile to different lookup flags.
2019-01-23 10:18:44 +02:00
Sascha Brawer
6a7e299c09 Fix “DeprecationWarning: invalid escape sequence” in Python 3.7 2019-01-22 16:36:15 +01:00
Khaled Hosny
4236772ec1 [voltLib] glyphSet() should return tuple
We need to maintain the glyph order and keep any duplicates.
2019-01-22 09:42:22 +02:00
Khaled Hosny
94633e9f46 [voltLib] Fix parsing glyph groups
* Fix ast.GroupDefinition.glyphSet() by using ast.GlyphName,
  ast.GroupName and ast.Range in Parser.parse_coverage_(), and making it return
  ast.Enum.

* Add ast.Enum.__len_() to fix the calculation of max_src and max_dest
  in Parser.parse_substitution_(). I’m not sure I understand the logic
  of this many to many check, will double check later.

* Update the test suite to reflect this. Had to add ast.Enum.__eq__() to
  make it less painful, and __hash__() as otherwise ast.Enum wouldn’t be
  used as a key in dicts (not sure this is a goo idea either, will
  double check later).
2019-01-22 09:42:22 +02:00
Khaled Hosny
e529832362 [voltLib] Don’t try to read past END
The parser was still trying to read the next token even when the current
token was END, but I think it should just stop reading here. When
reading from TSIV table there can be null bytes at the end when would
cause an exception in the lexer.
2019-01-16 23:04:14 +02:00
Khaled Hosny
ca716e0925 [voltLib] Fix check for duplicate anchors
When checking for duplicate anchors, the component number should be
taken into account since the same anchors can be used for different
components i.e. over ligatures.
2019-01-16 15:31:05 +02:00
Cosimo Lupo
78ad48eaf3
Move all *_test.py modules and test data to external Tests/ folder 2017-01-16 09:14:12 +00:00