According to @amr 's suggestion, I scanned every .nb files under the Mathematica\9.0\Documentation\English\ directory - which is fairly fast even on my outdated PC. This is what I got:
wsc = (WhitespaceCharacter ...);
prePtn = "RowBox[" ~~ wsc ~~ "{" ~~ wsc ~~ "\"";
inPtn = "\"" ~~ wsc ~~ "," ~~ wsc ~~ "\"";
rdOptExtractor = Function[testfile,
Module[{fileStr},
fileStr = Import[testfile, "String"];
Function[ruleType,
StringCases[fileStr,
Shortest[
prePtn ~~ opt : Except[WhitespaceCharacter] .. ~~ inPtn ~~
ruleOpr : ruleType ~~ "\""] :> opt]
] /@ {":>", "\[RuleDelayed]", "\\[RuleDelayed]"} // Flatten // Union
] ];
filelist =
FileNames["*.nb",{"D:\\Wolfram Research\\Mathematica\\9.0\\Documentation\\English\\"}, ∞];
Length[filelist]
10416
AbsoluteTiming[res = Union[Flatten[rdOptExtractor /@ filelist]];]
{504.27584,Null}
Cases[
Union[Quiet[Check[
ToExpression[#],
StringReplace[#, "\\\"\\<" ~~ opt : __ ~~ "\\>\\\"" :> opt]
] & /@ res]],
a_ /; MemberQ[{String, Symbol}, Head[a]]]
{"-", "+", "10!", "4!", "7!", "a", "b", "back", "c", "dialog1",
"Drag", "\\<\\\"E1\\\"\\>", "\\<\\\"E2\\\"\\>", "E2",
"\\<\\\"E3\\\"\\>", "end", "EvaluationMonitor", "Event",
"EventAction", "halfway", "In", "Invariants",
"\\<\\\"listHead\\\"\\>", "listHead", "MethodMonitor",
"MouseClicked", "MouseDown", "MouseDragged", "MouseUp", "Off", "On",
"one", "\\<\\\"opt2\\\"\\>", "Out", "Pinch", "PositionVariables",
"print1", "Reset", "ReturnKeyDown", "start", "Subsubtitle",
"Subtitle", "Title", "two", "WindowClose", Assumptions, b,
bookmarkName, ButtonData, ButtonFunction, CellEpilog, CellProlog,
CharacterEncoding, DateFunction, Deinitialization, DialogProlog,
DialogSymbols, DisplayFunction, DistributedContexts, e, Epilog,
EvaluationMonitor, EventAction, FontFamily, FontSize, FormatType, g1,
g2, g3, g4, GeneratedParameters, Gradient, Initialization,
InterpretationFunction, List, NotebookDynamicExpression, NumberMarks,
ParameterVariables, PassEventsUp, Path, PerformanceGoal, PlotLabel,
Polygon, Prolog, RegionFunction, StepMonitor, TextStyle, TimeZone,
Tooltip, TrackedSymbols, UnsavedVariables, WordBoundary, x, y}
Of cause some elements in the above list are irrelevant, but unfortunately I can't figure out a good way to filter them out.
Remaining work:
I didn't scan .m files. Also there are still many corpus under Mathematica\9.0\AddOns\ and Mathematica\9.0\SystemFiles\, which are worth looking-into.
Hope this helps.
Rule[]
orRuleDelayed[]
, depending on the circumstances. $\endgroup$NMinimize[x^4 - 3 x^2 - x, x, EvaluationMonitor -> Hold[Print[x]]]
but I think especially in the monitor options the user almost always wants:>
. In many other cases it probably doesn't hurt to use:>
in preference to->
. $\endgroup$