Beispiel #1
0
            print('    ' + member.idlType + ': ' + unicode(member.normalName) +
                  ' (' + unicode(member.name) + ')')

    print("FIND:")
    print(parser.find('round').fullName)
    print(parser.find('Foo/method/y').fullName)
    print(parser.find('Foo.method').fullName)
    print(parser.find('Foo(constructor)').fullName)
    print(parser.find('longest').fullName)
    print(parser.find('fooArg').fullName)
    print(parser.find('Window').fullName)
    print(parser.find('mediaText').fullName)
    print(parser.find('Foo.method').markup(Marker()))
    for method in parser.findAll('Foo.method'):
        print(method.fullName)

    print("NORMALIZE:")
    print(parser.normalizedMethodName('foo'))
    print(parser.normalizedMethodName('unknown'))
    print(parser.normalizedMethodName('testMethod(short one, double two)'))
    print(parser.normalizedMethodName('testMethod2(one, two, and a half)'))
    print(parser.normalizedMethodName('bob(xxx)', 'LinkStyle'))
    print(parser.normalizedMethodName('bob'))
    print(parser.normalizedMethodName('bob()'))
    print(', '.join(parser.normalizedMethodNames('method', 'Foo')))
    print(', '.join(parser.normalizedMethodNames('method()', 'Foo')))
    print(', '.join(parser.normalizedMethodNames('method(x)', 'Foo')))
    print(', '.join(parser.normalizedMethodNames('method(x, y)', 'Foo')))
    print(', '.join(parser.normalizedMethodNames('method (x, y, bar)', 'Foo')))
    print(', '.join(parser.normalizedMethodNames('abort()', 'Foo')))
Beispiel #2
0
    print "Complexity: " + unicode(parser.complexityFactor)
    
    
    for construct in parser.constructs:
        print unicode(construct.idlType) + u': ' + unicode(construct.normalName)
        for member in construct:
            print '    ' + member.idlType + ': ' + unicode(member.normalName) + ' (' + unicode(member.name) + ')'

    print "FIND:"
    print parser.find('round').fullName
    print parser.find('Foo/method/y').fullName
    print parser.find('Foo.method').fullName
    print parser.find('Foo(constructor)').fullName
    print parser.find('longest').fullName
    print parser.find('fooArg').fullName
    print parser.find('Window').fullName
    print parser.find('mediaText').fullName
    print parser.find('Foo.method').markup(Marker())

    print "NORMALIZE:"
    print parser.normalizedMethodName('foo')
    print parser.normalizedMethodName('unknown')
    print parser.normalizedMethodName('testMethod(short one, double two)')
    print parser.normalizedMethodName('testMethod2(one, two, and a half)')
    print parser.normalizedMethodName('bob(xxx)', 'LinkStyle')
    print parser.normalizedMethodName('bob')
    print parser.normalizedMethodName('bob()')
    print repr(parser.normalizedMethodNames('method', 'Foo'))

Beispiel #3
0
        for member in construct:
            print('    ' + member.idlType + ': ' + unicode(member.normalName) + ' (' + unicode(member.name) + ')')

    print("FIND:")
    print(parser.find('round').fullName)
    print(parser.find('Foo/method/y').fullName)
    print(parser.find('Foo.method').fullName)
    print(parser.find('Foo(constructor)').fullName)
    print(parser.find('longest').fullName)
    print(parser.find('fooArg').fullName)
    print(parser.find('Window').fullName)
    print(parser.find('mediaText').fullName)
    print(parser.find('Foo.method').markup(Marker()))
    for method in parser.findAll('Foo.method'):
        print(method.fullName)

    print("NORMALIZE:")
    print(parser.normalizedMethodName('foo'))
    print(parser.normalizedMethodName('unknown'))
    print(parser.normalizedMethodName('testMethod(short one, double two)'))
    print(parser.normalizedMethodName('testMethod2(one, two, and a half)'))
    print(parser.normalizedMethodName('bob(xxx)', 'LinkStyle'))
    print(parser.normalizedMethodName('bob'))
    print(parser.normalizedMethodName('bob()'))
    print(', '.join(parser.normalizedMethodNames('method', 'Foo')))
    print(', '.join(parser.normalizedMethodNames('method()', 'Foo')))
    print(', '.join(parser.normalizedMethodNames('method(x)', 'Foo')))
    print(', '.join(parser.normalizedMethodNames('method(x, y)', 'Foo')))
    print(', '.join(parser.normalizedMethodNames('method(x, y, bar)', 'Foo')))
    print(', '.join(parser.normalizedMethodNames('abort()', 'Foo')))
Beispiel #4
0
    for construct in parser.constructs:
        print unicode(construct.idlType) + u': ' + unicode(
            construct.normalName)
        for member in construct:
            print '    ' + member.idlType + ': ' + unicode(
                member.normalName) + ' (' + unicode(member.name) + ')'

    print "FIND:"
    print parser.find('round').fullName
    print parser.find('Foo/method/y').fullName
    print parser.find('Foo.method').fullName
    print parser.find('Foo(constructor)').fullName
    print parser.find('longest').fullName
    print parser.find('fooArg').fullName
    print parser.find('Window').fullName
    print parser.find('mediaText').fullName
    print parser.find('Foo.method').markup(Marker())
    for method in parser.findAll('Foo.method'):
        print method.fullName

    print "NORMALIZE:"
    print parser.normalizedMethodName('foo')
    print parser.normalizedMethodName('unknown')
    print parser.normalizedMethodName('testMethod(short one, double two)')
    print parser.normalizedMethodName('testMethod2(one, two, and a half)')
    print parser.normalizedMethodName('bob(xxx)', 'LinkStyle')
    print parser.normalizedMethodName('bob')
    print parser.normalizedMethodName('bob()')
    print repr(parser.normalizedMethodNames('method', 'Foo'))