OLD | NEW |
1 #!/usr/local/bin/python | 1 #!/usr/local/bin/python |
2 # coding: utf-8 | 2 # coding: utf-8 |
3 | 3 |
4 import sys | 4 import sys |
5 import re | 5 import re |
6 | 6 |
7 # TODO(edisonn): put processed part of file in a new file | 7 # TODO(edisonn): put processed part of file in a new file |
8 # put unprocessed part, in a new file, so we see what we miss | 8 # put unprocessed part, in a new file, so we see what we miss |
9 # keep blank lines, and generate a version without the blank lines | 9 # keep blank lines, and generate a version without the blank lines |
10 | 10 |
(...skipping 603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
614 for line in sys.stdin: | 614 for line in sys.stdin: |
615 processLine(line) | 615 processLine(line) |
616 | 616 |
617 # close last table if it was not closed already | 617 # close last table if it was not closed already |
618 stopTable() | 618 stopTable() |
619 | 619 |
620 print | 620 print |
621 | 621 |
622 print 'def addDictionaryTypesTo(knowTypes):' | 622 print 'def addDictionaryTypesTo(knowTypes):' |
623 for e in tableToClassName: | 623 for e in tableToClassName: |
624 print(' knowTypes[\'' + tableToClassName[e][0] + '\'] = [\'SkPdf' + tableTo
ClassName[e][0] + '*\', \'DictionaryFromDictionary2\', datatypes.CppNull(), \'re
t->podofo()->GetDataType() == ePdfDataType_Dictionary\']') | 624 print(' knowTypes[\'' + tableToClassName[e][0] + '\'] = [\'SkPdf' + tableTo
ClassName[e][0] + '*\', \'' + tableToClassName[e][0] + 'FromDictionary\', dataty
pes.CppNull(), \'ret->podofo()->GetDataType() == ePdfDataType_Dictionary\']') |
625 print | 625 print |
626 print | 626 print |
627 | 627 |
628 | 628 |
629 #print lines | 629 #print lines |
630 fnewspec.close() | 630 fnewspec.close() |
631 | 631 |
632 if '__main__' == __name__: | 632 if '__main__' == __name__: |
633 sys.exit(generateDef()) | 633 sys.exit(generateDef()) |
OLD | NEW |