File Exchange

image thumbnail

farg: a pedestrian M-file parser showing all used functions' syntax

version 1.8.0.0 (20.1 KB) by us
parses an M-file searching for functions and prints their exact, literal syntax

1 Download

Updated 20 Jun 2010

View Version History

View License

FARG parses an M-file (function or script) searching for function tags and lists their exact, literal syntax.

in addition, FARG displays a wide variety of file statistics.

currently, these functions are detected and listed
- main function
- subfunctions
- nested functions
- anonymous functions
- eval class calls
- unresolved calls

whitespaces and continuation statements are removed for better readability of the function syntax.

if the lex parser encounters fatal errors, it will stop processing and print a list of the offending syntax.

tested under r2007a, older version 7 systems might work as well.

see:
>> help farg
and the accompanying published M-file for information and a few self-explanatory examples.

Cite As

us (2020). farg: a pedestrian M-file parser showing all used functions' syntax (https://www.mathworks.com/matlabcentral/fileexchange/15924-farg-a-pedestrian-m-file-parser-showing-all-used-functions-syntax), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (4)

Selva Haran

It is a very useful utility. Is it possible to list the actual parameters passed to each function call (not just the formal parameters used in the function definition)? Note that this may vary across calls to the same function. Thanks.

Joao Henriques

us

unlike FARG, M2HTML dose not
- distinguish between subfunctions and nested functions
- extract anonymous functions
- extract f/eval constructs

moreover, it is a standalone function that does not require other files and subfolders nor the web browser to display its result

just a few pedestrian thoughts...
us

Justine Walker

Very pedestrian indeed: See M2HTML

MATLAB Release Compatibility
Created with R2007a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!