1.1 --- a/packages/ubuntu-gutsy/python-astgrep/debian/astgrep.1 Mon Oct 27 22:49:46 2008 +0100
1.2 +++ b/packages/ubuntu-gutsy/python-astgrep/debian/astgrep.1 Wed Oct 29 02:17:19 2008 +0100
1.3 @@ -11,7 +11,7 @@
1.4 astgrep \- grep/search through Python abstract syntax trees
1.5 .SH SYNOPSIS
1.6 .B astgrep
1.7 -[options] \-t TERM_TYPE [ \-e PATTERN ] ( \-r DIRECTORY | FILE )
1.8 +[options] [ \-t TERM_TYPE ] [ \-e PATTERN ] [ \-r ] FILE...
1.9 .SH DESCRIPTION
1.10 \fBastgrep\fR is a program which searches through Python source files for
1.11 textual information of a specific type. Instead of matching a search term or
1.12 @@ -19,9 +19,10 @@
1.13 \fBastgrep\fR matches only tokens in the program having a particular type,
1.14 specified using \fITERM_TYPE\fR, such as names or constants.
1.15
1.16 -Like \fBgrep\fR, a single \fIFILE\fR or a number of files within a directory
1.17 -hierarchy, \fIDIRECTORY\fR, can be searched, with the occurrences listed from
1.18 -each file.
1.19 +Like \fBgrep\fR, a collection of \fIFILE\fRs can be searched, and if the
1.20 +\fB\-r\fR option is specified, directory hierarchies can also be searched
1.21 +recursively, with the occurrences listed from each file successfully found
1.22 +and parsed.
1.23 .SH COMMAND LINE OPTIONS
1.24 .TP
1.25 .BR \-n , " \-\-line-number"
1.26 @@ -31,13 +32,14 @@
1.27 Show the matching token for each match.
1.28 .TP
1.29 \fB\-t\fR, \fB\-\-type\fR=\fITERM_TYPE\fR
1.30 -Indicate the type of token to be matched.
1.31 +Indicate the type of token to be matched. If \fB*\fR is given, all term types
1.32 +are tested.
1.33 .TP
1.34 \fB\-e\fR, \fB\-\-regexp\fR=\fIPATTERN\fR
1.35 Use \fIPATTERN\fR as the term to search for.
1.36 .TP
1.37 -\fB\-r\fR, \fB\-R\fR, \fB\-\-recursive\fR \fIDIRECTORY\fR
1.38 -Search Python files within \fIDIRECTORY\fR, recursively.
1.39 +\fB\-r\fR, \fB\-R\fR, \fB\-\-recursive\fR
1.40 +Search Python files found within directories.
1.41 .SH TERM TYPES
1.42 Details of term types can be found in the "AST Nodes" section of the Python
1.43 Library Reference or by using \fBpydoc\fR to inspect the node classes in the
1.44 @@ -76,8 +78,18 @@
1.45 .B astgrep -n -t Getattr -e '^_node$' -r libxml2dom
1.46 .RE
1.47 .PD
1.48 +.SH LIMITATIONS
1.49 +\fBastgrep\fR does not attempt to search docstrings (since line number
1.50 +information is inaccurate for docstrings in abstract syntax trees) or comments
1.51 +(since the \fBcompiler\fR package only considers significant syntax when parsing
1.52 +programs).
1.53 +.PP
1.54 +\fBastgrep\fR cannot search syntactically incorrect programs (since the
1.55 +\fBcompiler\fR package will only return an abstract syntax tree for valid
1.56 +programs).
1.57 .SH SEE ALSO
1.58 .BR python (1),
1.59 +.BR pydoc (1),
1.60 .BR grep (1)
1.61 .PP
1.62 astgrep