[ create a new paste ] login | about

Link: http://codepad.org/R8arse0p    [ raw code | output | fork ]

C, pasted on Jul 13:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
from random import choice
import re

testre = re.compile('^(\w+)\s+(\w+)')
def main():
    start = 'hello pypy'
    count = 0
    big = start + ''.join([choice(start) for i in range(1000000)])
    for i in range(len(start) + 1, len(big)):
        if testre.match(buffer(big, i)):
            count += 1
    print count

if __name__ == '__main__':
    main()


Output:
1
2
3
4
5
6
7
8
Line 1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'random'
Line 20: warning: unknown escape sequence '\w'
Line 20: warning: unknown escape sequence '\s'
Line 20: warning: unknown escape sequence '\w'
Line 20: warning: character constant too long for its type
Line 12: warning: character constant too long for its type
Line 18: error: empty character constant
Line 15: warning: character constant too long for its type


Create a new paste based on this one


Comments: