help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: read .m into parse tree (AST), write tree to file


From: siko1056
Subject: Re: read .m into parse tree (AST), write tree to file
Date: Sat, 30 Apr 2016 14:01:49 -0700 (PDT)

I don't really get, what information you want to extract from a M-file. Maybe
you provide a small example of what is relevant for you? A textual approach
was to read the M-file via fileread() or alike and do some meaningful
extracting/parsing.

AFAIK Octave does not expose any features of the parsing tree or a linter.
If you build Octave from the sources, and have some knowledge of GNU Bison
and flex, you can modify the sources to get access to the syntax-tree. A
starting point in the sources is

http://hg.savannah.gnu.org/hgweb/octave/file/ff2347e1df02/libinterp/parse-tree

HTH,
Kai



--
View this message in context: 
http://octave.1599824.n4.nabble.com/read-m-into-parse-tree-AST-write-tree-to-file-tp4676624p4676640.html
Sent from the Octave - General mailing list archive at Nabble.com.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]