Function call expression

Submit

Your name:
File:
Open code-statistics:

Language is selected by the extension of the file. See the list of supported languages to know the extension of your language.

Problem

Convert JavaScript-style function-call expressions to S-expressions

Options

exec is denied

now post-mortem time, all source codes will be revealed

Sample input:_

f(f)
f(f(f))
f(f(f(f)))
f(f(f(f(f))))
f(f)(f)
f(f)(f)(f)
f(f)(f)(f)(f)

Sample output:

(f f)
(f (f f))
(f (f (f f)))
(f (f (f (f f))))
((f f) f)
(((f f) f) f)
((((f f) f) f) f)

Sample input:_

f(f(f(f(f)(f))))(f)
f(f(f(f(f)(f)))(f))(f)
f(f(f)(f(f(f(f)(f)(f)))))
f(f)(f(f)(f)(f)(f))(f)(f)
f(f(f(f)(f(f(f(f))))(f)))
f(f)(f(f)(f)(f))
f(f(f(f)))(f)(f(f(f(f)(f))(f)(f)(f)))
f(f(f(f))(f)(f)(f)(f(f(f(f(f)(f))))(f)))
f(f)(f(f(f(f))(f)(f)))(f)
f(f(f(f(f))(f)))
f(f)(f(f(f)(f))(f))
f(f(f)(f(f(f))(f(f))(f(f)(f)))(f)(f(f(f)))(f))
f(f(f(f)(f(f(f)(f))(f))(f)))
f(f(f(f))(f))
f(f(f(f(f))(f))(f(f)(f(f))))
f(f)(f)(f(f(f))(f))(f)
f(f(f)(f)(f(f(f)(f)(f)(f))))(f)(f(f))
f(f)(f)(f(f))(f)(f)
f(f)(f)(f(f(f)))
f(f)(f(f)(f(f(f)(f))(f)))
f(f(f(f(f(f))(f)(f)))(f)(f))
f(f(f(f)(f))(f))
f(f)(f(f)(f(f)(f(f)))(f)(f))
f(f(f))(f(f(f)(f)(f(f))(f(f(f))))(f))(f)(f(f(f)))
f(f(f))(f(f)(f))
f(f(f)(f)(f)(f(f(f))))
f(f(f(f)(f)(f(f)))(f)(f(f(f)))(f)(f))
f(f)(f(f(f(f(f))(f)))(f))

Sample output:

((f (f (f ((f f) f)))) f)
((f ((f (f ((f f) f))) f)) f)
(f ((f f) (f (f (((f f) f) f)))))
((((f f) ((((f f) f) f) f)) f) f)
(f (f (((f f) (f (f (f f)))) f)))
((f f) (((f f) f) f))
(((f (f (f f))) f) (f ((((f ((f f) f)) f) f) f)))
(f (((((f (f f)) f) f) f) ((f (f (f ((f f) f)))) f)))
(((f f) (f (((f (f f)) f) f))) f)
(f (f ((f (f f)) f)))
((f f) ((f ((f f) f)) f))
(f (((((f f) (((f (f f)) (f f)) ((f f) f))) f) (f (f f))) f))
(f (f (((f f) ((f ((f f) f)) f)) f)))
(f ((f (f f)) f))
(f ((f ((f (f f)) f)) ((f f) (f f))))
((((f f) f) ((f (f f)) f)) f)
(((f (((f f) f) (f ((((f f) f) f) f)))) f) (f f))
(((((f f) f) (f f)) f) f)
(((f f) f) (f (f f)))
((f f) ((f f) ((f ((f f) f)) f)))
(f (((f (f (((f (f f)) f) f))) f) f))
(f ((f ((f f) f)) f))
((f f) ((((f f) ((f f) (f f))) f) f))
((((f (f f)) ((f ((((f f) f) (f f)) (f (f f)))) f)) f) (f (f f)))
((f (f f)) ((f f) f))
(f ((((f f) f) f) (f (f f))))
(f (((((f (((f f) f) (f f))) f) (f (f f))) f) f))
((f f) ((f (f ((f (f f)) f))) f))

Sample input:_

f(f)(f(f(f(f)(f)))(f))
f(f)(f(f)(f(f)))
f(f)(f(f))(f)
f(f(f(f)(f(f)))(f)(f(f(f(f)))(f(f)))(f(f))(f(f(f)(f))))
f(f(f)(f(f)))
f(f(f))(f(f))
f(f)(f)(f)(f(f))(f(f(f))(f(f(f(f)(f)))))
f(f(f(f)))(f(f(f)(f))(f))
f(f(f(f(f(f(f)(f)))))(f(f(f(f)))(f))(f))
f(f(f)(f)(f(f))(f))
f(f)(f(f(f)))
f(f(f)(f(f)(f)(f))(f))
f(f)(f(f)(f))
f(f(f)(f(f(f(f)(f))(f(f)))(f(f))))(f)
f(f(f(f)))(f)
f(f(f(f)(f)(f(f(f)(f(f))))(f)(f)))(f)
f(f(f(f(f)))(f))(f(f))(f)(f)
f(f(f(f))(f(f))(f)(f)(f)(f))
f(f)(f)(f(f(f(f(f)(f)(f))))(f)(f(f(f(f)))(f)))
f(f(f(f)(f(f))))
f(f(f(f)(f(f(f)))))
f(f)(f(f)(f(f)))(f(f))
f(f(f)(f(f)(f)(f(f))(f)(f(f)(f))(f)))
f(f(f))(f)
f(f(f)(f(f)(f(f)(f)(f(f(f(f))(f(f)))))(f(f)(f(f))(f)(f))))
f(f(f))(f)(f)
f(f(f(f(f(f))))(f)(f))
f(f(f(f)(f)(f)))
f(f(f))(f)(f(f)(f))(f)
f(f)(f)(f)(f)(f)
f(f)(f(f)(f)(f(f)(f)))(f(f)(f)(f(f)(f(f)(f)(f))))(f)
f(f(f(f)(f(f))(f))(f(f)))(f(f(f)(f(f)(f))(f(f))(f)))(f)(f)

Sample output:

((f f) ((f (f ((f f) f))) f))
((f f) ((f f) (f f)))
(((f f) (f f)) f)
(f (((((f ((f f) (f f))) f) ((f (f (f f))) (f f))) (f f)) (f ((f f) f))))
(f ((f f) (f f)))
((f (f f)) (f f))
(((((f f) f) f) (f f)) ((f (f f)) (f (f ((f f) f)))))
((f (f (f f))) ((f ((f f) f)) f))
(f (((f (f (f (f ((f f) f))))) ((f (f (f f))) f)) f))
(f ((((f f) f) (f f)) f))
((f f) (f (f f)))
(f (((f f) (((f f) f) f)) f))
((f f) ((f f) f))
((f ((f f) ((f ((f ((f f) f)) (f f))) (f f)))) f)
((f (f (f f))) f)
((f (f (((((f f) f) (f ((f f) (f f)))) f) f))) f)
((((f ((f (f (f f))) f)) (f f)) f) f)
(f ((((((f (f f)) (f f)) f) f) f) f))
(((f f) f) (((f (f (f (((f f) f) f)))) f) ((f (f (f f))) f)))
(f (f ((f f) (f f))))
(f (f ((f f) (f (f f)))))
(((f f) ((f f) (f f))) (f f))
(f ((f f) ((((((f f) f) (f f)) f) ((f f) f)) f)))
((f (f f)) f)
(f ((f f) (((f f) (((f f) f) (f ((f (f f)) (f f))))) ((((f f) (f f)) f) f))))
(((f (f f)) f) f)
(f (((f (f (f (f f)))) f) f))
(f (f (((f f) f) f)))
((((f (f f)) f) ((f f) f)) f)
(((((f f) f) f) f) f)
((((f f) (((f f) f) ((f f) f))) (((f f) f) ((f f) (((f f) f) f)))) f)
((((f ((f (((f f) (f f)) f)) (f f))) (f ((((f f) ((f f) f)) (f f)) f))) f) f)

Ranking

Ruby _

RankUserSizeTimeDateStatistics
1youz650.06372011/05/12 01:25:570B / 23B / 37B
2kaki700.06712011/05/11 12:40:200B / 18B / 46B
3bk1e1460.06712011/05/10 15:35:560B / 75B / 50B
4youz(kaki)620.06372011/05/23 00:16:550B / 24B / 32B

Perl _

RankUserSizeTimeDateStatistics
1tails430.06182011/05/08 17:09:060B / 14B / 25B
2tybalt89430.14032011/05/14 04:07:420B / ?B / ?B

Python _

RankUserSizeTimeDateStatistics
1Sven760.11162011/05/20 23:16:060B / 43B / 28B
2lifthrasiir880.09992011/05/16 20:38:190B / 49B / 32B
3youz900.07462011/05/15 14:23:420B / 49B / 30B
4twobit1100.59502011/05/09 21:43:560B / 50B / 48B
5bk1e1790.07822011/05/10 15:35:460B / 83B / 62B

Scheme _

RankUserSizeTimeDateStatistics
1youz910.19522011/05/11 22:42:350B / 49B / 39B
2kaki1160.17482011/05/18 22:37:440B / 53B / 61B
3kaki(youz)900.08292013/03/25 06:43:350B / 47B / 41B

Common LISP _

RankUserSizeTimeDateStatistics
1youz1110.62562011/05/10 22:48:200B / 64B / 43B
2kozima1110.18262011/05/11 22:50:530B / 64B / 43B
3kurohuku1080.61542011/05/24 08:58:261B / ?B / ?B

Arc _

RankUserSizeTimeDateStatistics
1youz716.64282011/05/09 23:33:520B / 48B / 18B

Clojure _

RankUserSizeTimeDateStatistics
1youz875.65472011/05/15 14:45:410B / 49B / 35B

JavaScript _

RankUserSizeTimeDateStatistics
1nn880.08072011/05/13 01:08:450B / 40B / 47B
2youz880.04602011/05/14 11:01:420B / 47B / 40B

J _

RankUserSizeTimeDateStatistics
1pooq1040.15352011/05/28 12:41:280B / 41B / 53B

C _

RankUserSizeTimeDateStatistics
1nn1020.03462011/05/20 02:24:100B / 47B / 54B
2nai1050.06062011/05/19 10:48:400B / 53B / 52B
3koi1140.04002011/05/19 01:13:340B / 64B / 50B
4not1230.04262011/05/18 23:45:040B / 60B / 63B
5Agano1920.03712011/05/21 15:32:340B / 87B / 104B
6bk1e2350.00222011/05/15 03:30:170B / 117B / 115B

Haskell _

RankUserSizeTimeDateStatistics
1notogawa910.03642011/05/19 21:33:100B / 42B / 45B
2rst76920.01152011/05/22 12:07:140B / 43B / 45B
3Lost_dog1320.03632011/05/20 05:38:390B / 52B / 78B

sed _

RankUserSizeTimeDateStatistics
1youz420.03692011/05/15 14:31:410B / 11B / 27B
2nn440.04142011/05/15 14:22:470B / 11B / 29B
3tails460.03572011/05/09 22:43:240B / 7B / 35B
4kaki460.03572011/05/10 15:33:500B / 5B / 40B

GolfScript _

RankUserSizeTimeDateStatistics
1nn270.23362011/05/14 04:57:320B / 3B / 23B
2tails220.19262013/07/23 14:48:230B / 2B / 19B
3narb230.21582011/05/24 15:04:540B / 1B / 21B

FlogScript _

RankUserSizeTimeDateStatistics
1zzo38211.41142011/06/07 12:13:530B / 3B / 18B

Vim _

RankUserSizeTimeDateStatistics
1nn380.60842011/05/15 13:17:152B / 22B / 12B
2tails440.42362011/05/15 09:34:241B / 21B / 18B
3nn370.33002011/11/14 02:01:182B / 22B / 11B

Groovy _

RankUserSizeTimeDateStatistics
1nn886.65392011/05/13 18:24:040B / 38B / 47B

Language Ranking_

RankLangUserSizeScore
1FlogScriptzzo382110000
2GolfScripttails229545
3Vimnn375675
4sedyouz425000
5Perltails434883
6Rubyyouz(kaki)623387
7Arcyouz712957
8PythonSven762763
9Clojureyouz872413
10JavaScriptnn882386
11Groovynn882386
12Schemekaki(youz)902333
13Haskellnotogawa912307
14Cnn1022058
15Jpooq1042019
16Common LISPkurohuku1081944

return top