semantic 是一个Haskell库和命令行工具,用来解析、分析和比较程序代码。
使用方法:
ParseUsage:semanticparse([--sexpression]|[--json]|[--json-graph]|[--symbols]|[--dot]|[--show]|[--quiet])[FILES...]Generateparsetreesforpath(s)Availableoptions:--sexpressionOutputs-expressionparsetrees(default)--jsonOutputJSONparsetrees--json-graphOutputJSONadjacencylist--symbolsOutputJSONsymbollist--dotOutputDOTgraphparsetrees--showOutputusingtheShowinstance(debugonly,formatsubjecttochangewithoutnotice)--quietDon'tproduceoutput,butshowtimingstatsDiffUsage:semanticdiff([--sexpression]|[--json]|[--json-graph]|[--toc]|[--dot]|[--show])[FILE_A][FILE_B]ComputechangesbetweenpathsAvailableoptions:--sexpressionOutputs-expressiondifftree(default)--jsonOutputJSONdifftrees--json-graphOutputJSONdifftrees--tocOutputJSONtableofcontentsdiffsummary--dotOutputthediffasaDOTgraph--showOutputusingtheShowinstance(debugonly,formatsubjecttochangewithoutnotice)GraphUsage:semanticgraph([--imports]|[--calls])[--packages]([--dot]|[--json]|[--show])([--rootDIR][--exclude-dirDIR]DIR:LANGUAGE|FILE|--languageARG(FILES...|--stdin))Computeagraphforadirectoryorfromatop-levelentrypointmoduleAvailableoptions:--importsComputeanimportgraph(default)--callsComputeacallgraph--packagesIncludeavertexforthepackage,withedgesfromittoeachmodule--dotOutputinDOTgraphformat(default)--jsonOutputJSONgraph--showOutputusingtheShowinstance(debugonly,formatsubjecttochangewithoutnotice)--rootDIRRootdirectoryofproject.Optional,defaultstoentryfile/directory.--exclude-dirDIRExcludeadirectory(e.g.vendor)--languageARGThelanguagefortheanalysis.--stdinReadalistofnewline-separatedpathstoanalyzefromstdin.支持的编程语言:
评论