Function list for Caml
-
Have a good look at how you parse for (optional) function parameters e.g. are the parentheses optional or mandatory?
-
Furthermore, I presume
([a-z_]\w*(\s+[a-z_]\w*)*\s+)|(\(\s*\)\s+)
is intended as
([a-z_]\w*(\s+[a-z_]\w*)*\s+|\(\s*\)\s+)
-
Indeed, the whitespace at the end was a problem so I replaced \s+in\s with \sin$
Still the problem with “for”. I noticed that it happend only with functions which has no parameters, but why… -
Did also remove the superfluous parentheses?