This is the mail archive of the cgen@sources.redhat.com mailing list for the CGEN project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Typo: .substr in pmacros.texi is .substring in pmacros.scm


Please consider applying this patch.  It would IMHO be very useful
if .sym-built symbols were .pmacro-expanded, as I initially thought.
For example, a .pmacro could apply .sym on an argument and create
references to other, specialized .pmacro:s.  Currently this can be
accomplished only with the apparently frowned-upon "(.eval
(pmacro-expand '(.sym arg -something)))".  If you want, I guess I
can elaborate.

2002-01-28  Hans-Peter Nilsson  <hp@axis.com>

	* doc/pmacros.texi: Fix .substr typo to .substring.
	Mention that .sym expansions are not further expanded.

Index: pmacros.texi
===================================================================
RCS file: /cvs/src/src/cgen/doc/pmacros.texi,v
retrieving revision 1.2
diff -p -c -r1.2 pmacros.texi
*** pmacros.texi	2001/03/19 03:36:24	1.2
--- pmacros.texi	2002/01/28 18:33:26
*************** Preprocessor macros provide a way of sim
*** 21,27 ****
  * Convert a number to a hex::     The @code{.hex} builtin
  * Convert a string to uppercase:: The @code{.upcase} builtin
  * Convert a string to lowercase:: The @code{.downcase} builtin
! * Getting part of a string::      The @code{.substr} builtin
  * List splicing::                 The @code{.splice} builtin
  * Number generation::             The @code{.iota} builtin
  * Mapping a macro over a list::   The @code{.map} builtin
--- 21,27 ----
  * Convert a number to a hex::     The @code{.hex} builtin
  * Convert a string to uppercase:: The @code{.upcase} builtin
  * Convert a string to lowercase:: The @code{.downcase} builtin
! * Getting part of a string::      The @code{.substring} builtin
  * List splicing::                 The @code{.splice} builtin
  * Number generation::             The @code{.iota} builtin
  * Mapping a macro over a list::   The @code{.map} builtin
*************** Acceptable arguments are symbols, string
*** 144,150 ****
  The result is a symbol with the arguments concatenated together.
  Numbers are converted to a string, base 10, and then to a symbol.
  The result must be a valid Scheme symbol with the additional restriction
! that the first character must be a letter.
  
  @node String concatenation
  @section String concatenation
--- 144,151 ----
  The result is a symbol with the arguments concatenated together.
  Numbers are converted to a string, base 10, and then to a symbol.
  The result must be a valid Scheme symbol with the additional restriction
! that the first character must be a letter.  The result is not further
! expanded, regardless of whether there's a macro by that name.
  
  @node String concatenation
  @section String concatenation
*************** Example:
*** 222,232 ****
  
  @node Getting part of a string
  @section Getting part of a string
! @cindex .substr
  
! Extract a part of a string with @code{.substr}.
  
! Syntax: @code{(.substr string start end)}
  
  where @samp{start} is the starting character, and @samp{end} is one past
  the ending character.  Character numbering begins at position 0.
--- 223,233 ----
  
  @node Getting part of a string
  @section Getting part of a string
! @cindex .substring
  
! Extract a part of a string with @code{.substring}.
  
! Syntax: @code{(.substring string start end)}
  
  where @samp{start} is the starting character, and @samp{end} is one past
  the ending character.  Character numbering begins at position 0.
*************** string is returned.
*** 236,242 ****
  Example:
  
  @smallexample
! (.substr "howzitgoineh?" 2 6) --> "wzit"
  @end smallexample
  
  @node List splicing
--- 237,243 ----
  Example:
  
  @smallexample
! (.substring "howzitgoineh?" 2 6) --> "wzit"
  @end smallexample
  
  @node List splicing

brgds, H-P


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]