Lines Matching refs:parse

75         doc = self.parse(
90 doc = self.parse("""\
99 doc = self.parse(
112 doc = self.parse(
125 doc = self.parse(
140 doc = self.parse(
148 doc = self.parse(
163 FeatureLibError, 'Unknown anchor "UnknownName"', self.parse,
169 [foo] = self.parse("anchorDef 123 456 foo;").statements
177 [foo] = self.parse("anchorDef 123 456 contourpoint 5 foo;").statements
185 anon = self.parse("anon TEST { # a\nfoo\n } TEST; # qux").statements[0]
191 anon = self.parse("anonymous TEST {\nbar\n} TEST;").statements[0]
200 self.parse, "anon TEST { \n no end in sight")
203 doc = self.parse("table GDEF {Attach [a e] 2;} GDEF;")
210 [liga] = self.parse("feature liga {} liga;").statements
215 [liga] = self.parse("feature liga useExtension {} liga;").statements
222 [liga] = self.parse("feature liga { # Comment\n } liga;").statements
228 doc = self.parse("feature aalt { feature salt; } aalt;")
236 self.parse, "feature ss01 { featureNames { feature test; } ss01;")
239 [feature] = self.parse(
248 [feature] = self.parse(
255 doc = self.parse("table head {FontRevision 2.5;} head;")
263 self.parse, "table head {FontRevision -17.2;} head;")
266 [gc] = self.parse("@dash = [endash emdash figuredash];").statements
273 self.parse, "@GlyphClass = [%s];" % ("G" * 64))
279 self.parse, "@bad = [a 123];")
283 ab, xy = self.parse("@dup = [a b]; @dup = [x y];").statements
288 [gc] = self.parse("@empty_set = [];").statements
293 [foo, bar] = self.parse("@foo = [a b]; @bar = @foo;").statements
298 doc = self.parse(
307 [gc] = self.parse(r"@GlyphClass = [\999-\1001];").statements
315 self.parse, r"@bad = [\998-\995];")
318 [gc] = self.parse("@swashes = [X.swash-Z.swash];").statements
323 [gc] = self.parse("@defg.sc = [d.sc-g.sc];").statements
329 [gc] = self.parse("@range = [A-foo.sc-C-foo.sc];", glyphNames).statements
334 [gc] = self.parse("@range = [A-foo.sc - C-foo.sc];", gn).statements
343 [gc] = self.parse("@range = [A-foo.sc-C-foo.sc];", glyphNames).statements
352 self.parse, r"@bad = [A-B-C];", glyphNames)
355 [gc] = self.parse("@range = [foo.2-foo.5];").statements
359 [gc] = self.parse("@range = [foo.09-foo.11];").statements
363 [gc] = self.parse("@range = [foo.123-foo.125];").statements
370 self.parse, "@bad = [a-foobar];")
373 self.parse, "@bad = [A.swash-z.swash];")
376 self.parse, "@bad = [B.swash-A.swash];")
379 self.parse, "@bad = [foo.1234-foo.9876];")
382 [gc] = self.parse("@range = [a foo.09-foo.11 X.sc-Z.sc];").statements
388 [vowels_lc, vowels_uc, vowels] = self.parse(
398 self.parse, "@bad = [@unknown];")
401 [foo, liga, smcp] = self.parse(
412 f1, f2 = self.parse(
420 doc = self.parse("table GDEF {GlyphClassDef [b],[l],[m],[C c];} GDEF;")
429 doc = self.parse("table GDEF {GlyphClassDef ,,,;} GDEF;")
437 doc = self.parse("feature test {ignore pos e t' c, q u' u' x;} test;")
449 doc = self.parse(
464 self.parse,
469 doc = self.parse("feature test {ignore sub e t' c, q u' u' x;} test;")
481 doc = self.parse(
496 self.parse,
501 doc = self.parse("""\
518 doc = self.parse("""\
527 doc = self.parse("feature test {language DEU;} test;")
535 doc = self.parse("feature test {language DEU exclude_dflt;} test;")
543 doc = self.parse("feature test {"
553 doc = self.parse("feature test {language DEU include_dflt;} test;")
561 doc = self.parse("feature test {"
574 self.parse, "feature test { language DFLT; } test;")
577 doc = self.parse("table GDEF{LigatureCaretByIndex [c_t f_i] 2;}GDEF;")
584 doc = self.parse("table GDEF{LigatureCaretByIndex f_f_i 3 7;}GDEF;")
591 doc = self.parse("table GDEF {LigatureCaretByPos [c_t f_i] 7;} GDEF;")
598 doc = self.parse("table GDEF {LigatureCaretByPos f_i 400 380;} GDEF;")
605 [lookup] = self.parse("lookup Ligatures {} Ligatures;").statements
610 [lookup] = self.parse("lookup Foo useExtension {} Foo;").statements
619 self.parse, "lookup Foo {} Bar;")
622 doc = self.parse("feature liga {"
634 doc = self.parse("feature vkrn {"
646 [lookup] = self.parse("lookup L { # Comment\n } L;").statements
652 [foo, bar] = self.parse("lookup Foo {} Foo;"
659 [qux, bar] = self.parse("feature Qux {lookup Foo {} Foo;} Qux;"
669 self.parse, "feature liga {lookup Huh;} liga;")
672 return self.parse("lookup L {%s} L;" % s).statements[0].statements[-1]
729 self.parse,
736 self.parse,
743 self.parse, "feature test {lookupflag IgnoreCookies;} test;")
746 doc = self.parse("feature kern {pos one <1 2 3 4>;} kern;")
754 doc = self.parse("feature kern {pos [one two] -300;} kern;")
762 doc = self.parse("feature vkrn {pos [one two] -300;} vkrn;")
770 doc = self.parse("feature f {pos one'1 two'2 [five six]'56;} f;")
787 self.parse, "feature test {enum pos T 100;} test;")
791 self.parse, "feature test {enumerate pos T 100;} test;")
794 doc = self.parse("feature kern {pos [A B] [T Y]' 20 comma;} kern;")
804 doc = self.parse("feature kern {pos [A B] [T Y]' comma 20;} kern;")
814 doc = self.parse("feature kern {pos [A B] [T Y]' comma <0 0 0 0>;} kern;")
824 doc = self.parse("feature kern {"
836 doc = self.parse("feature kern {"
848 doc = self.parse("feature kern {"
862 doc = self.parse("feature kern {"
875 doc = self.parse("feature kern {"
887 doc = self.parse("feature kern {"
899 doc = self.parse("feature kern {"
912 self.parse,
918 doc = self.parse(
939 self.parse,
947 FeatureLibError, "@MARKS is not a markClass", self.parse,
954 doc = self.parse(
983 self.parse,
993 FeatureLibError, "@MARKS is not a markClass", self.parse,
1000 doc = self.parse(
1016 self.parse,
1024 FeatureLibError, "@MARKS is not a markClass", self.parse,
1031 doc = self.parse(
1048 self.parse,
1055 doc = self.parse("markClass [acute grave] <anchor 350 3> @MARKS;")
1063 doc = self.parse(
1075 doc = self.parse(r'table name { nameid 9 "Back\005cslash"; } name;')
1081 doc = self.parse(
1088 doc = self.parse(r'table name { nameid 9 "Carrot \D83E\DD55"; } name;')
1094 doc = self.parse(
1107 doc = self.parse(
1120 self.parse, 'table name { nameid 9 666 "Foo"; } name;')
1123 doc = self.parse("feature test {rsub a [b B] c' d [e E] by C;} test;")
1132 doc = self.parse(r"feature test {rsub \1 [\2 \3] \4' \5 by \6;} test;")
1142 doc = self.parse(
1156 doc = self.parse(
1175 self.parse, "feature test {rsub a from [a.1 a.2 a.3];} test;")
1182 self.parse, "feature test {rsub c d by c_d;} test;")
1189 self.parse, "feature test {rsub f_i by f i;} test;")
1192 doc = self.parse("feature test {script cyrl;} test;")
1201 self.parse, "feature test {script dflt;} test;")
1204 doc = self.parse("feature smcp {substitute a by a.sc;} smcp;")
1212 doc = self.parse("feature test {sub [A a] d' [C] by d.alt;} test;")
1220 doc = self.parse(r"feature smcp {substitute \12345 by \78987;} smcp;")
1228 doc = self.parse(
1242 doc = self.parse(
1256 doc = self.parse(
1272 doc = self.parse(
1292 self.parse, "feature smcp {sub [a-d] by [A.sc-Z.sc];} smcp;")
1298 self.parse, "feature smcp {sub A' 20 by A.sc;} smcp;")
1301 doc = self.parse("lookup Look {substitute f_f_i by f f i;} Look;")
1308 doc = self.parse("lookup L {sub [A-C] f_f_i' [X-Z] by f f i;} L;")
1315 doc = self.parse("lookup L {sub f_f_i' by f f i;} L;")
1327 self.parse,
1334 self.parse, "feature test{"
1340 self.parse, "lookup shift {"
1350 self.parse, "feature test {"
1356 self.parse, "lookup upper {"
1367 doc = self.parse("lookup Look {"
1379 doc = self.parse("feature test {"
1390 doc = self.parse("feature test {"
1401 doc = self.parse(r"feature test {"
1412 doc = self.parse("feature test {"
1425 doc = self.parse("feature liga {substitute f f i by f_f_i;} liga;")
1434 doc = self.parse("feature F {substitute A B f' i' Z by f_i;} F;")
1443 doc = Parser(self.getpath("spec5fi1.fea"), GLYPHNAMES).parse()
1452 self.parse, "feature liga {substitute f f i;} liga;")
1455 doc = self.parse("feature test {subtable;} test;")
1461 FeatureLibError, 'Expected "GDEF"', self.parse,
1466 doc = self.parse("table %s { # Comment\n } %s;" % (table, table))
1473 FeatureLibError, '"table Foo" is not supported', self.parse,
1477 doc = self.parse("feature liga {valueRecordDef 123 foo;} liga;")
1492 doc = self.parse("feature vkrn {valueRecordDef 123 foo;} vkrn;")
1507 doc = self.parse("feature liga {valueRecordDef 0 foo;} liga;")
1522 doc = self.parse("feature vkrn {valueRecordDef 0 foo;} vkrn;")
1538 doc = self.parse(
1546 doc = self.parse("feature liga {valueRecordDef <1 2 3 4> foo;} liga;")
1561 doc = self.parse("feature liga {valueRecordDef <0 0 0 0> foo;} liga;")
1576 doc = self.parse(
1600 doc = self.parse("feature test {valueRecordDef <NULL> foo;} test;")
1606 doc = self.parse("valueRecordDef <1 2 3 4> foo;"
1617 self.parse, "valueRecordDef <unknown> foo;")
1620 [foo, liga, smcp] = self.parse(
1632 self.parse,
1637 [langsys] = self.parse("languagesystem latn DEU;").statements
1640 [langsys] = self.parse("languagesystem DFLT DEU;").statements
1646 self.parse, "languagesystem dflt dflt;")
1650 self.parse, "languagesystem latn DFLT;")
1653 self.parse, "languagesystem latn DEU")
1656 self.parse, "languagesystem foobar DEU;")
1659 self.parse, "languagesystem latn FOOBAR;")
1662 doc = self.parse("feature test {;} test;")
1664 doc = self.parse(";;;")
1667 doc = self.parse("table %s { ;;; } %s;" % (table, table))
1670 def parse(self, text, glyphNames=GLYPHNAMES, followIncludes=True): member in ParserTest
1673 return p.parse()