예제 #1
0
            if (input_line != output_line):
                print("<" + input_line)
                print(">" + output_line)
                print()


if __name__ == "__main__":  # called from the command line
    sys.excepthook = debugHook
    sys.stdout = codecs.getwriter('utf8')(sys.stdout)
    parser = parser.Parser(ui=ui())

    if (1 < len(sys.argv)):
        for fileName in sys.argv[1:]:
            print("Parsing: " + fileName)
            file = open(fileName)
            parser.reset()
            text = file.read()
            parser.parse(text)
            assert (text == unicode(parser))
        quit()

    idl = u"""dictionary CSSFontFaceLoadEventInit : EventInit { sequence<CSSFontFaceRule> fontfaces = [ ]; };
interface Simple{
    serializer;
    serializer = { foo };
    serializer cereal(short one);
    iterable<Foo>;
    iterable<Foo, Bar>;
    async iterable<Foo, Bar>;
    readonly maplike<Foo, Bar>;
    setlike<Uint8ClampedArray>;
예제 #2
0
파일: test.py 프로젝트: birtles/bikeshed
        for input_line, output_line in itertools.izip_longest(input_lines, output_lines, fillvalue=''):
            if (input_line != output_line):
                print("<" + input_line)
                print(">" + output_line)
                print()


if __name__ == "__main__":      # called from the command line
    sys.excepthook = debugHook
    parser = parser.Parser(ui=ui())

    if (1 < len(sys.argv)):
        for fileName in sys.argv[1:]:
            print("Parsing: " + fileName)
            file = open(fileName)
            parser.reset()
            text = file.read()
            parser.parse(text)
            assert (text == unicode(parser))
        quit()


    idl = u"""dictionary CSSFontFaceLoadEventInit : EventInit { sequence<CSSFontFaceRule> fontfaces = [ ]; };
interface Simple{
    serializer;
    serializer = { foo };
    serializer cereal(short one);
    iterable<Foo>;
    iterable<Foo, Bar>;
    readonly maplike<Foo, Bar>;
    setlike<Uint8ClampedArray>;