empty.find
parse2find(parse.data)
find2replace(find.data)
locate2find(loc)getParseData function. In parse data each
element of an expression has it's own row. stringr. Uses a column
structure with start and end, organized into a matrix
with a row for each line. str_locate from stringr. same as replace
for most purposes but does not include a string. getParseData function,which returns an
objects with the attribute 'data'. Parse
formatteddata contains a row for every token, string, and
expression. The data frame describes a tree structure
with each row a node. Each node has a parent unless it
is a root node i.e. parent==0. It has the following
columns. line1 starting line of
the expression. col1 starting column.
line2 ending line of the expression. col2 ending column. token the token
class number. id the unique id of the
expression parent the parent of the
expression, 0 if none. top_level top_level,
which top level expression is the expression associated
with token class name of the token. terminal is this a terminal node? i.e. has no
child nodes. text the actual text of the
expression. col1=0,
col2=2. The line number however is 1 based so the first
line is 1, there is no zero line.line1,
col1, line2, and col2, marking the
beginning and end of a section. This is a condensation
of the parse data which would have the same columns as
well as additional columns, and a row for each expression
in the region. Find formatted data is defined to be R or 1 based arrays
and inclusive. the first two elements would be
col1=1, col2=2. Although both col elements are retained in
conversion functions, at this time only col
columns are used internally.start end string or line string would
be preferred but line to match up with line data.
find2replace uses the line, since the string is
not available in the find data. Replace data formatted data is also R/1 inclusive based
arrays.str_locate. It has columns start end Expects either a parse formatted data.frame or a list of data.frames. each data.frame is a contiguous region that is collapsed into a single find formatted data.frame, one row for each region.