This is an egg for CHICKEN 4, the unsupported old release. You're almost certainly looking for the CHICKEN 5 version of this egg, if it exists.
If it does not exist, there may be equivalent functionality provided by another egg; have a look at the egg index. Otherwise, please consider porting this egg to the current version of CHICKEN.
The peep extension can be loaded into the chicken compiler to interactively explore the internal database during compilation of a program.
If the readline extension is installed, the interactive prompt supports line-editing.
Pass peep to the -extend option while compiling a file. This sets the user-post-analysis-hook and will start a read-eval-print loop after all optimizations have been performed. You can enter a number of commands (described below) to inspect the analysis database and node tree.
Before the compilation starts, a file named .peeprc will be loaded, if it exists, either from the current directory, or from the user's home directory.
When the REPL is started, you can enter arbitrary Scheme expressions, including any of the following commands:
(.pp [X]) [.p] pretty-print node or other value (defaults to program graph) (.dump) [.d] dump database (.find NAME) [.f] find symbol in database (.show SYMBOL) [.s] show properties of symbol (.get SYMBOL PROP) [.g] get symbol property (.set SYMBOL PROP X) set symbol property (.select PROP ...) [.sel] return list of symbols that have given properties (.inspect [X]) [.i] inspect value (defaults to program graph) (.props) list valid symbol properties (.quit) [.q] continue compilation until finished (.continue [PASS]) [.c] continue until PASS is reached or to next analysis (.help) [.h] show this message
The special expression # holds the result of the last entered expression.
Copyright (c) 2007, Felix L. Winkelmann All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of the author nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- Got rid of deprecated getenv calls
- Marked as obsolete
- ported to CHICKEN 4
- .peeprc, adapted to CHICKEN 2.621, new commands, dropped readline requirement
- initial release