Changeset 13694 in project


Ignore:
Timestamp:
03/12/09 07:46:49 (11 years ago)
Author:
Kon Lovett
Message:

Added 'symbol-escape' support. Renamed 'parenthesis-synonyms' -> 'parentheses-synonyms'. Changed command-line option for 'parentheses-synonyms' to 'no-parentheses-synonyms' since binary only. Added minor comments to 'regex', used common identifier name for regular-expression argument. Re-flowed command usage so under 80 columns. Updated manual with new features.

Location:
chicken/trunk
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • chicken/trunk/batch-driver.scm

    r13672 r13694  
    126126        [hshrink (memq 'heap-shrinkage options)]
    127127        [kwstyle (memq 'keyword-style options)]
    128         [paransyn (memq 'parenthesis-synonyms options)]
    129128        [uses-units '()]
    130129        [uunit (memq 'unit options)]
     
    281280              [(string=? "suffix" val) (keyword-style #:suffix)]
    282281              [else (quit "invalid argument to `-keyword-style' option")] ) ) )
    283     (when paransyn
    284       (let ([val (option-arg paransyn)])
    285         (cond [(string=? "block" val) (parenthesis-synonyms #:block)]
    286               [(string=? "none" val) (parenthesis-synonyms #:none)]
    287               [else (quit "invalid argument to `-parenthesis-synonyms' option")] ) ) )
     282    (when (memq 'no-parenthesis-synonyms options)
     283      (dribble "Disabled support for parenthesis synonyms")
     284      (parenthesis-synonyms #f) )
     285    (when (memq 'no-symbol-escape options)
     286      (dribble "Disabled support for escaped symbols")
     287      (symbol-escape #f) )
     288    (when (memq '("-chicken-syntax") options)
     289      (unless quiet (display "Enabled the Chicken extensions to R5RS syntax\n"))
     290        (case-sensitive #t)
     291        (keyword-style #:suffix)
     292        (parentheses-synonyms #t)
     293        (symbol-escape #t) )
     294    (when (memq '("-r5rs-syntax") options)
     295      (unless quiet (display "Disabled the Chicken extensions to R5RS syntax\n"))
     296        (case-sensitive #f)
     297        (keyword-style #:none)
     298        (parentheses-synonyms #f)
     299        (symbol-escape #f) )
    288300    (set! verbose-mode verbose)
    289301    (set! ##sys#read-error-with-line-number #t)
  • chicken/trunk/c-platform.scm

    r13672 r13694  
    123123    disable-stack-overflow-checks disable-c-syntax-checks unsafe-libraries raw
    124124    emit-external-prototypes-first release local inline-global
    125     analyze-only dynamic) )
     125    analyze-only dynamic
     126    no-parentheses-synonyms no-symbol-escape chicken-syntax r5rs-syntax) )
    126127
    127128(define valid-compiler-options-with-argument
  • chicken/trunk/chicken.import.scm

    r13685 r13694  
    153153   open-input-string
    154154   open-output-string
    155    parenthesis-synonyms
     155   parentheses-synonyms
    156156   port-name
    157157   port-position
     
    191191   strip-syntax
    192192   sub1
     193   symbol-escape
    193194   symbol-plist
    194195   syntax-error
  • chicken/trunk/csc.scm

    r13672 r13694  
    128128    -lambda-lift -dynamic -disable-stack-overflow-checks -local
    129129    -emit-external-prototypes-first -inline -extension -release
    130     -analyze-only -keep-shadowed-macros -inline-global) -ignore-repository)
     130    -analyze-only -keep-shadowed-macros -inline-global -ignore-repository
     131    -no-symbol-escape -no-parentheses-synonyms -chicken-syntax -r5rs-syntax))
    131132
    132133(define-constant complex-options
     
    264265
    265266(define (usage)
    266   (display
    267 "Usage: csc FILENAME | OPTION ...
    268 
    269   `csc' is a driver program for the CHICKEN compiler. Any Scheme, C or object
    270   files and all libraries given on the command line are translated, compiled or
    271   linked as needed.
     267  (display #<<EOF
     268Usage: csc FILENAME | OPTION ...
     269
     270  `csc' is a driver program for the CHICKEN compiler. Files given on the
     271  command line are translated, compiled or linked as needed.
     272
     273  FILENAME is a Scheme source file name with optional extension or a
     274  C/C++/Objective-C source, object or library file name with extension. OPTION
     275  may be one of the following:
    272276
    273277  General options:
    274278
    275     -h  -help                   display this text and exit
    276     -v                          show intermediate compilation stages
    277     -v2  -verbose               display information about translation progress
    278     -v3                         display information about all compilation stages
    279     -V  -version                display Scheme compiler version and exit
    280     -release                    display release number and exit
     279    -h  -help                      display this text and exit
     280    -v                             show intermediate compilation stages
     281    -v2  -verbose                  display information about translation
     282                                    progress
     283    -v3                            display information about all compilation
     284                                    stages
     285    -V  -version                   display Scheme compiler version and exit
     286    -release                       display release number and exit
    281287
    282288  File and pathname options:
    283289
    284     -o -output-file FILENAME    specifies target executable name
    285     -I -include-path PATHNAME   specifies alternative path for included files
    286     -to-stdout                  write compiler to stdout (implies -t)
    287     -s -shared -dynamic         generate dynamically loadable shared object file
     290    -o -output-file FILENAME       specifies target executable name
     291    -I -include-path PATHNAME      specifies alternative path for included
     292                                    files
     293    -to-stdout                     write compiler to stdout (implies -t)
     294    -s -shared -dynamic            generate dynamically loadable shared object
     295                                    file
    288296
    289297  Language options:
    290298
    291     -D  -DSYMBOL  -feature SYMBOL
    292                                 register feature identifier
    293     -c++                        Compile via a C++ source file (.cpp)
    294     -objc                       Compile via Objective-C source file (.m)
     299    -D  -DSYMBOL  -feature SYMBOL  register feature identifier
     300    -c++                           compile via a C++ source file (.cpp)
     301    -objc                          compile via Objective-C source file (.m)
    295302
    296303  Syntax related options:
    297304
    298     -i -case-insensitive        don't preserve case of read symbols   
    299     -K -keyword-style STYLE     allow alternative keyword syntax (prefix, suffix or none)
    300        -parenthesis-synonyms STYLE
    301                                 allow list delimiter synonyms (block or none)
    302     -compile-syntax             macros are made available at run-time
    303     -j -emit-import-library MODULE
    304                                 write compile-time module information into separate file
     305    -i -case-insensitive           don't preserve case of read symbols   
     306    -k  -keyword-style STYLE       enable alternative keyword-syntax
     307                                    (prefix, suffix or none)
     308        -no-parentheses-synonyms   disables list delimiter synonyms
     309        -no-symbol-escape          disables support for escaped symbols
     310        -chicken-syntax            enables the Chicken extensions to
     311                                    R5RS syntax
     312        -r5rs-syntax               disables the Chicken extensions to
     313                                    R5RS syntax
     314    -compile-syntax                macros are made available at run-time
     315    -j -emit-import-library MODULE write compile-time module information into
     316                                    separate file
    305317
    306318  Translation options:
    307319
    308     -x  -explicit-use           do not use units `library' and `eval' by default
    309     -P  -check-syntax           stop compilation after macro-expansion
    310     -A  -analyze-only           stop compilation after first analysis pass
     320    -x  -explicit-use              do not use units `library' and `eval' by
     321                                    default
     322    -P  -check-syntax              stop compilation after macro-expansion
     323    -A  -analyze-only              stop compilation after first analysis pass
    311324
    312325  Debugging options:
    313326
    314     -w  -no-warnings            disable warnings
    315     -disable-warning CLASS      disable specific class of warnings
     327    -w  -no-warnings               disable warnings
     328    -disable-warning CLASS         disable specific class of warnings
    316329    -d0 -d1 -d2 -debug-level NUMBER
    317                                 set level of available debugging information
    318     -no-trace                   disable rudimentary debugging information
    319     -profile                    executable emits profiling information
    320     -accumulate-profile         executable emits profiling information in append mode
    321     -profile-name FILENAME      name of the generated profile information file
     330                                   set level of available debugging information
     331    -no-trace                      disable rudimentary debugging information
     332    -profile                       executable emits profiling information
     333    -accumulate-profile            executable emits profiling information in
     334                                    append mode
     335    -profile-name FILENAME         name of the generated profile information
     336                                    file
    322337
    323338  Optimization options:
    324339
    325340    -O -O1 -O2 -O3 -O4 -optimize-level NUMBER
    326                                 enable certain sets of optimization options
    327     -optimize-leaf-routines     enable leaf routine optimization
    328     -N  -no-usual-integrations  standard procedures may be redefined
    329     -u  -unsafe                 disable safety checks
    330     -local                      assume globals are only modified in current file
    331     -b  -block                  enable block-compilation
    332     -disable-interrupts         disable interrupts in compiled code
    333     -f  -fixnum-arithmetic      assume all numbers are fixnums
    334     -Ob  -benchmark-mode        equivalent to '-block -optimize-level 4
    335                                  -debug-level 0 -fixnum-arithmetic -lambda-lift
    336                                  -disable-interrupts -inline'
    337     -lambda-lift                perform lambda-lifting
    338     -unsafe-libraries           link with unsafe runtime system
    339     -disable-stack-overflow-checks  disables detection of stack-overflows
    340     -inline                     enable inlining
    341     -inline-limit               set inlining threshold
    342     -inline-global              enable cross-module inlining
    343     -n -emit-inline-file FILENAME 
    344                                 generate file with globally inlinable procedures
    345                                 (implies -inline -local)
     341                                   enable certain sets of optimization options
     342    -optimize-leaf-routines        enable leaf routine optimization
     343    -N  -no-usual-integrations     standard procedures may be redefined
     344    -u  -unsafe                    disable safety checks
     345    -local                         assume globals are only modified in current
     346                                    file
     347    -b  -block                     enable block-compilation
     348    -disable-interrupts            disable interrupts in compiled code
     349    -f  -fixnum-arithmetic         assume all numbers are fixnums
     350    -Ob  -benchmark-mode           equivalent to '-block -optimize-level 4
     351                                    -debug-level 0 -fixnum-arithmetic
     352                                    -lambda-lift -inline -disable-interrupts'
     353    -lambda-lift                   perform lambda-lifting
     354    -unsafe-libraries              link with unsafe runtime system
     355    -disable-stack-overflow-checks disables detection of stack-overflows
     356    -inline                        enable inlining
     357    -inline-limit                  set inlining threshold
     358    -inline-global                 enable cross-module inlining
     359    -n -emit-inline-file FILENAME  generate file with globally inlinable
     360                                    procedures (implies -inline -local)
    346361
    347362  Configuration options:
    348363
    349     -unit NAME                  compile file as a library unit
    350     -uses NAME                  declare library unit as used.
    351     -heap-size NUMBER           specifies heap-size of compiled executable
    352     -heap-initial-size NUMBER   specifies heap-size at startup time
    353     -heap-growth PERCENTAGE     specifies growth-rate of expanding heap
    354     -heap-shrinkage PERCENTAGE  specifies shrink-rate of contracting heap
     364    -unit NAME                     compile file as a library unit
     365    -uses NAME                     declare library unit as used.
     366    -heap-size NUMBER              specifies heap-size of compiled executable
     367    -heap-initial-size NUMBER      specifies heap-size at startup time
     368    -heap-growth PERCENTAGE        specifies growth-rate of expanding heap
     369    -heap-shrinkage PERCENTAGE     specifies shrink-rate of contracting heap
    355370    -nursery NUMBER  -stack-size NUMBER
    356                                 specifies nursery size of compiled executable
    357     -X -extend FILENAME         load file before compilation commences
    358     -prelude EXPRESSION         add expression to beginning of source file
    359     -postlude EXPRESSION        add expression to end of source file
    360     -prologue FILENAME          include file before main source file
    361     -epilogue FILENAME          include file after main source file
    362     -ignore-repository          do not refer to repository for extensions
    363 
    364     -e  -embedded               compile as embedded (don't generate `main()')
    365     -W  -windows                compile as Windows GUI application (MSVC only)
    366     -R  -require-extension NAME require extension and import in compiled code
    367     -E  -extension              compile as extension (dynamic or static)
    368     -dll -library               compile multiple units into a dynamic library
     371                                   specifies nursery size of compiled
     372                                   executable
     373    -X -extend FILENAME            load file before compilation commences
     374    -prelude EXPRESSION            add expression to beginning of source file
     375    -postlude EXPRESSION           add expression to end of source file
     376    -prologue FILENAME             include file before main source file
     377    -epilogue FILENAME             include file after main source file
     378    -ignore-repository             do not refer to repository for extensions
     379
     380    -e  -embedded                  compile as embedded
     381                                    (don't generate `main()')
     382    -W  -windows                   compile as Windows GUI application
     383                                    (MSVC only)
     384    -R  -require-extension NAME    require extension and import in compiled
     385                                    code
     386    -E  -extension                 compile as extension (dynamic or static)
     387    -dll -library                  compile multiple units into a dynamic
     388                                    library
    369389
    370390  Options to other passes:
    371391
    372     -C OPTION                   pass option to C compiler
    373     -L OPTION                   pass option to linker
    374     -I<DIR>                     pass \"-I<DIR>\" to C compiler (add include path)
    375     -L<DIR>                     pass \"-L<DIR>\" to linker (add library path)
    376     -k                          keep intermediate files
    377     -c                          stop after compilation to object files
    378     -t                          stop after translation to C
    379     -cc COMPILER                select other C compiler than the default one
    380     -cxx COMPILER               select other C++ compiler than the default one
    381     -ld COMPILER                select other linker than the default one
    382     -lLIBNAME                   link with given library (`libLIBNAME' on UNIX,
    383                                  `LIBNAME.lib' on Windows)                               
    384     -static-libs                link with static CHICKEN libraries
    385     -static                     generate completely statically linked executable
    386     -static-extension NAME      link extension NAME statically (if available)
    387     -F<DIR>                     pass \"-F<DIR>\" to C compiler (add framework
    388                                  header path on Mac OS X)
    389     -framework NAME             passed to linker on Mac OS X
    390     -rpath PATHNAME             add directory to runtime library search path
    391     -Wl,...                     pass linker options
    392     -strip                      strip resulting binary
     392    -C OPTION                      pass option to C compiler
     393    -L OPTION                      pass option to linker
     394    -I<DIR>                        pass \"-I<DIR>\" to C compiler
     395                                    (add include path)
     396    -L<DIR>                        pass \"-L<DIR>\" to linker
     397                                    (add library path)
     398    -k                             keep intermediate files
     399    -c                             stop after compilation to object files
     400    -t                             stop after translation to C
     401    -cc COMPILER                   select other C compiler than the default one
     402    -cxx COMPILER                  select other C++ compiler than the default one
     403    -ld COMPILER                   select other linker than the default one
     404    -lLIBNAME                      link with given library
     405                                    (`libLIBNAME' on UNIX,
     406                                     `LIBNAME.lib' on Windows)
     407    -static-libs                   link with static CHICKEN libraries
     408    -static                        generate completely statically linked
     409                                    executable
     410    -static-extension NAME         link extension NAME statically
     411                                    (if available)
     412    -F<DIR>                        pass \"-F<DIR>\" to C compiler
     413                                    (add framework header path on Mac OS X)
     414    -framework NAME                passed to linker on Mac OS X
     415    -rpath PATHNAME                add directory to runtime library search path
     416    -Wl,...                        pass linker options
     417    -strip                         strip resulting binary
    393418
    394419  Inquiry options:
    395420
    396     -home                       show home-directory (where support files go)
    397     -cflags                     show required C-compiler flags and exit
    398     -ldflags                    show required linker flags and exit
    399     -libs                       show required libraries and exit
    400     -cc-name                    show name of default C compiler used
    401     -cxx-name                   show name of default C++ compiler used
    402     -ld-name                    show name of default linker used
    403     -dry-run                    just show commands executed, don't run them
    404                                  (implies `-v')
     421    -home                          show home-directory (where support files go)
     422    -cflags                        show required C-compiler flags and exit
     423    -ldflags                       show required linker flags and exit
     424    -libs                          show required libraries and exit
     425    -cc-name                       show name of default C compiler used
     426    -cxx-name                      show name of default C++ compiler used
     427    -ld-name                       show name of default linker used
     428    -dry-run                       just show commands executed, don't run them
     429                                    (implies `-v')
    405430
    406431  Obscure options:
    407432
    408     -debug MODES                display debugging output for the given modes
    409     -compiler PATHNAME          use other compiler than default `chicken'
    410     -disable-c-syntax-checks    disable syntax checks of C code fragments
    411     -raw                        do not generate implicit init- and exit code                           
    412     -emit-external-prototypes-first  emit protoypes for callbacks before foreign
    413                                  declarations
    414     -keep-shadowed-macros       do not remove shadowed macro
    415     -host                       compile for host when configured for cross-compiling
     433    -debug MODES                   display debugging output for the given modes
     434    -compiler PATHNAME             use other compiler than default `chicken'
     435    -disable-c-syntax-checks       disable syntax checks of C code fragments
     436    -raw                           do not generate implicit init- and exit code
     437    -emit-external-prototypes-first
     438                                   emit protoypes for callbacks before foreign
     439                                    declarations
     440    -keep-shadowed-macros          do not remove shadowed macro
     441    -host                          compile for host when configured for
     442                                    cross-compiling
    416443
    417444  Options can be collapsed if unambiguous, so
     
    423450    -v -k -fixnum-arithmetic -optimize
    424451
    425   The contents of the environment variable CSC_OPTIONS are implicitly
    426   passed to every invocation of `csc'.
    427 "
     452  The contents of the environment variable CSC_OPTIONS are implicitly passed to
     453  every invocation of `csc'.
     454
     455EOF
    428456) )
    429457
     
    462490             (newline)
    463491             (exit) )
    464            #;(when (null? scheme-files)
     492           #; ;UNUSED
     493           (when (null? scheme-files)
    465494             (set! scheme-files c-files)
    466495             (set! c-files '()) )
  • chicken/trunk/csi.scm

    r13672 r13694  
    7171
    7272(define (print-usage)
    73   (display
    74 "usage: csi [FILENAME | OPTION ...]
    75 
    76   where OPTION may be one of the following:
    77 
    78     -h  -help  --help           display this text and exit
    79     -v  -version                display version and exit
    80         -release                print release number and exit
    81     -i  -case-insensitive       enable case-insensitive reading
    82     -e  -eval EXPRESSION        evaluate given expression
    83     -p  -print EXPRESSION       evaluate and print result(s)
     73  (display #<<EOF
     74usage: csi [FILENAME | OPTION ...]
     75
     76  `csi' is the CHICKEN interpreter.
     77 
     78  FILENAME is a Scheme source file name with optional extension. OPTION may be
     79  one of the following:
     80
     81    -h  -help  --help             display this text and exit
     82    -v  -version                  display version and exit
     83        -release                  print release number and exit
     84    -i  -case-insensitive         enable case-insensitive reading
     85    -e  -eval EXPRESSION          evaluate given expression
     86    -p  -print EXPRESSION         evaluate and print result(s)
    8487    -P  -pretty-print EXPRESSION  evaluate and print result(s) prettily
    85     -D  -feature SYMBOL         register feature identifier
    86     -q  -quiet                  do not print banner
    87     -n  -no-init                do not load initialization file `")
    88   (display init-file)
    89   (display
    90 "'
    91     -b  -batch                  terminate after command-line processing
    92     -w  -no-warnings            disable all warnings
    93     -k  -keyword-style STYLE    enable alternative keyword-syntax (prefix, suffix or none)
    94         -parenthesis-synonyms STYLE
    95                                 allow list delimiter synonyms (block or none)
    96     -s  -script PATHNAME        use interpreter for shell scripts
    97         -ss PATHNAME            shell script with `main' procedure
    98         -sx PATHNAME            same as `-s', but print each expression as it is evaluated
    99     -R  -require-extension NAME require extension and import before executing code
    100     -I  -include-path PATHNAME  add PATHNAME to include path
    101     --                          ignore all following options
    102 
    103 ") )
     88    -D  -feature SYMBOL           register feature identifier
     89    -q  -quiet                    do not print banner
     90
     91EOF
     92)
     93  (display #<#EOF
     94    -n  -no-init                  do not load initialization file #{#\`} #{init-file} #{#\'}
     95
     96EOF
     97)
     98  (display  #<<EOF
     99    -b  -batch                    terminate after command-line processing
     100    -w  -no-warnings              disable all warnings
     101    -k  -keyword-style STYLE      enable alternative keyword-syntax
     102                                   (prefix, suffix or none)
     103        -no-parentheses-synonyms  disables list delimiter synonyms
     104        -no-symbol-escape         disables support for escaped symbols
     105        -chicken-syntax           enables the Chicken extensions to
     106                                   R5RS syntax
     107        -r5rs-syntax              disables the Chicken extensions to
     108                                   R5RS syntax
     109    -s  -script PATHNAME          use interpreter for shell scripts
     110        -ss PATHNAME              shell script with `main' procedure
     111        -sx PATHNAME              same as `-s', but print each expression
     112                                   as it is evaluated
     113    -R  -require-extension NAME   require extension and import before
     114                                   executing code
     115    -I  -include-path PATHNAME    add PATHNAME to include path
     116    --                            ignore all following options
     117
     118EOF
     119) )
    104120
    105121(define (print-banner)
    106122  (newline)
    107   #;(when (and (tty-input?) (##sys#fudge 11))
     123  #; ;UNUSED
     124  (when (and (tty-input?) (##sys#fudge 11))
    108125    (let* ((t (string-copy +product+))
    109126           (len (string-length t))
     
    819836
    820837(define-constant long-options
    821   '("-script" "-version" "-help" "--help" "--" "-feature"
    822     "-eval" "-case-insensitive" "-keyword-style" "-parenthesis-synonyms"
     838  '("-ss" "-sx" "-script" "-version" "-help" "--help" "-feature" "-eval"
     839    "-case-insensitive" "-keyword-style" "-no-parentheses-synonyms" "-no-symbol-escape"
     840    "-r5rs-syntax" "-chicken-syntax"
    823841    "-require-extension" "-batch" "-quiet" "-no-warnings" "-no-init"
    824     "-include-path" "-release" "-ss" "-sx"
    825     "-print" "-pretty-print") )
     842    "-include-path" "-release" "-print" "-pretty-print" "--") )
    826843
    827844(define (canonicalize-args args)
     
    830847        '()
    831848        (let ((x (car args)))
    832           (cond
    833            ((member x '("-s" "-ss" "-script" "--")) args)
    834            ((and (fx> (##sys#size x) 2)
    835                  (char=? #\- (##core#inline "C_subchar" x 0))
    836                  (not (member x long-options)) )
    837             (if (char=? #\: (##core#inline "C_subchar" x 1))
    838                 (loop (cdr args))
    839                 (let ((cs (string->list (substring x 1))))
    840                   (if (findall cs short-options)
    841                       (append (map (cut string #\- <>) cs) (loop (cdr args)))
    842                       (##sys#error "invalid option" x) ) ) ) )
    843            (else (cons x (loop (cdr args)))))))))
     849          (cond ((member x '("-s" "-ss" "-script" "--")) args)
     850                ((and (fx> (##sys#size x) 2)
     851                       (char=? #\- (##core#inline "C_subchar" x 0))
     852                       (not (member x long-options)) )
     853                 (if (char=? #\: (##core#inline "C_subchar" x 1))
     854                     (loop (cdr args))
     855                     (let ((cs (string->list (substring x 1))))
     856                       (if (findall cs short-options)
     857                           (append (map (cut string #\- <>) cs) (loop (cdr args)))
     858                           (##sys#error "invalid option" x) ) ) ) )
     859                (else (cons x (loop (cdr args)))))))))
    844860
    845861(define (findall chars clist)
     
    849865             (loop (cdr chars))))))
    850866
     867(define-constant simple-options
     868  '("--" "-b" "-batch" "-q" "-quiet" "-n" "-no-init" "-w" "-no-warnings" "-i" "-case-insensitive"
     869    "-no-parentheses-synonyms" "-no-symbol-escape" "-r5rs-syntax" "-chicken-syntax"
     870    ; Not "simple" but processed early
     871    "-ss" "-sx" "-s" "-script") )
     872
     873(define-constant complex-options
     874  '("-D" "-feature" "-I" "-include-path" "-k" "-keyword-style") )
     875
    851876(define (run)
    852877  (let* ([extraopts (parse-option-string (or (getenv "CSI_OPTIONS") ""))]
    853878         [args (canonicalize-args (command-line-arguments))]
     879         ; Check for these before 'args' is updated by any 'extraopts'
    854880         [kwstyle (member* '("-k" "-keyword-style") args)]
    855          [paransyn (member* '("-parenthesis-synonyms") args)]
    856          [script (member* '("-s" "-ss" "-sx" "-script") args)])
     881         [script (member* '("-ss" "-sx" "-s" "-script") args)])
    857882    (cond [script
    858883           (when (or (not (pair? (cdr script)))
     
    935960              [(string=? "suffix" (cadr kwstyle))
    936961               (keyword-style #:suffix) ] ) )
    937       (when paransyn
    938         (cond [(not (pair? (cdr paransyn)))
    939                (##sys#error "missing argument to `-parenthesis-synonyms' option") ]
    940               [(string=? "block" (cadr paransyn))
    941                (parenthesis-synonyms #:block) ]
    942               [(string=? "none" (cadr paransyn))
    943                (parenthesis-synonyms #:none) ] ) )
     962      (when (member* '("-no-parentheses-synonyms") args)
     963        (unless quiet (display "Disabled support for parentheses synonyms\n"))
     964        (parentheses-synonyms #f) )
     965      (when (member* '("-no-symbol-escape") args)
     966        (unless quiet (display "Disabled support for escaped symbols\n"))
     967        (symbol-escape #f) )
     968      (when (member* '("-chicken-syntax") args)
     969        (unless quiet (display "Enabled the Chicken extensions to R5RS syntax\n"))
     970        (case-sensitive #t)
     971        (keyword-style #:suffix)
     972        (parentheses-synonyms #t)
     973        (symbol-escape #t) )
     974      (when (member* '("-r5rs-syntax") args)
     975        (unless quiet (display "Disabled the Chicken extensions to R5RS syntax\n"))
     976        (case-sensitive #f)
     977        (keyword-style #:none)
     978        (parentheses-synonyms #f)
     979        (symbol-escape #f) )
    944980      (unless (or (member* '("-n" "-no-init") args) script) (loadinit))
    945981      (do ([args args (cdr args)])
     
    949985             (##sys#write-char-0 #\newline ##sys#standard-output) ) )
    950986        (let* ([arg (car args)]
    951                [len (string-length arg)] )
    952           (cond ((member
    953                   arg
    954                   '("--" "-batch" "-quiet" "-no-init" "-no-warnings" "-script"
    955                     "-b" "-q" "-n" "-w" "-s" "-i"
    956                     "-case-insensitive" "-ss" "-sx") ) )
    957                 ((member arg '("-feature" "-include-path" "-keyword-style"
    958                                "-D" "-I" "-k"))
     987               #;[len (string-length arg)] )
     988          (cond ((member arg simple-options) )
     989                ((member arg complex-options)
    959990                 (set! args (cdr args)) )
    960991                ((or (string=? "-R" arg) (string=? "-require-extension" arg))
     
    965996                 (set! args (cdr args)) )
    966997                ((or (string=? "-p" arg) (string=? "-print" arg))
    967                  (evalstring
    968                   (cadr args)
    969                   (cut for-each print <...>) )
     998                 (evalstring (cadr args) (cut for-each print <...>))
    970999                 (set! args (cdr args)) )
    9711000                ((or (string=? "-P" arg) (string=? "-pretty-print" arg))
    972                  (evalstring
    973                   (cadr args)
    974                   (cut for-each pretty-print <...>) )
     1001                 (evalstring (cadr args) (cut for-each pretty-print <...>) )
    9751002                 (set! args (cdr args)) )
    9761003                (else
     
    9841011                           (eval x)))
    9851012                    #f)
    986                    (when (equal? scr "-ss")
     1013                   (when (equal? "-ss" scr)
    9871014                     (call-with-values (cut main (command-line-arguments))
    9881015                       (lambda results
  • chicken/trunk/library.scm

    r13672 r13694  
    21112111(define case-sensitive (make-parameter #t))
    21122112(define keyword-style (make-parameter #:suffix))
    2113 (define parenthesis-synonyms (make-parameter #:block))
     2113(define parentheses-synonyms (make-parameter #t))
     2114(define symbol-escape (make-parameter #t))
    21142115
    21152116(define current-read-table (make-parameter (##sys#make-structure 'read-table #f #f #f)))
     
    21462147        [csp case-sensitive]
    21472148        [ksp keyword-style]
    2148         [psp parenthesis-synonyms]
     2149        [psp parentheses-synonyms]
     2150        [sep symbol-escape]
    21492151        [crt current-read-table]
    2150         [kwprefix (string (integer->char 0))]
    2151         ; give it a name.
    2152         [full-terminating-characters '(#\, #\; #\( #\) #\[ #\] #\{ #\} #\' #\")]
    2153         [restricted-terminating-characters '(#\, #\; #\( #\) #\' #\") ] )
     2152        [kwprefix (string (integer->char 0))])
    21542153    (lambda (port infohandler)
    21552154      (let ([csp (csp)]
    21562155            [ksp (ksp)]
    21572156            [psp (psp)]
     2157            [sep (sep)]
    21582158            [crt (crt)]
    21592159            [rat-flag #f]
    2160             ; set below - needs 'psp' to make a decision.
    2161             [terminating-characters #f] )
     2160            ; set below - needs more state to make a decision
     2161            [terminating-characters #f]
     2162            [reserved-characters #f] )
    21622163
    21632164        (define (container c)
    2164           (##sys#read-error port "unexpected list terminator" c))
     2165          (##sys#read-error port "unexpected list terminator" c) )
    21652166
    21662167        (define (info class data val)
     
    21732174            (if (and (not (##core#inline "C_eofp" c)) (not (eq? #\newline c)))
    21742175                (skip (##sys#read-char-0 port)) ) ) )
     2176
     2177        (define (reserved-character c)
     2178          (##sys#read-char-0 port)
     2179          (##sys#read-error port "reserved character" c) )
     2180
     2181        (define (read-unreserved-char-0 port)
     2182          (let ((c (##sys#read-char-0 port)))
     2183            (if (memq c reserved-characters)
     2184                (reserved-character c)
     2185                c) ) )
    21752186
    21762187        (define (readrec)
     
    23602371                    [else
    23612372                     (when (char=? c #\/) (set! rat-flag #t))
    2362                      (##sys#read-char-0 port)
     2373                     (read-unreserved-char-0 port)
    23632374                     (loop (##sys#peek-char-0 port)
    2364                        (cons (if csp
    2365                                  c
    2366                                  (char-downcase c) )
    2367                              lst) ) ] ) ) )
     2375                           (cons (if csp c (char-downcase c)) lst) ) ] ) ) )
    23682376
    23692377          (define (r-digits)
     
    23872395
    23882396          (define (r-xtoken)
    2389             (if (char=? #\| (##sys#read-char-0 port))
     2397            (if (char=? #\| (read-unreserved-char-0 port))
    23902398                (let loop ((c (##sys#read-char-0 port)) (lst '()))
    23912399                  (cond ((eof-object? c) (##sys#read-error port "unexpected end of `| ... |' symbol"))
     
    24832491            (##sys#intern-symbol (##sys#string-append kwprefix tok)) )
    24842492
    2485           ; Handle parenthesis-synonyms
    2486 
    2487           (define (open-list/maybe start end)
    2488             (if (eq? #:block psp) (r-list start end) (r-symbol)))
    2489 
    2490           (define (close-list/maybe c)
    2491             (if (eq? #:block psp)
    2492                 (begin (##sys#read-char-0 port) (container c))
    2493                 (r-symbol)))
    2494 
    24952493          ; now have the state to make a decision.
    24962494          (set! terminating-characters
    2497                 (if (eq? #:block psp) full-terminating-characters restricted-terminating-characters))
     2495                (if psp
     2496                    '(#\, #\; #\( #\) #\' #\" #\[ #\] #\{ #\})
     2497                    '(#\, #\; #\( #\) #\' #\")))
     2498          (set! reserved-characters
     2499                (if psp
     2500                    (if sep
     2501                        '()
     2502                        '(#\[ #\] #\{ #\}) )
     2503                    (if sep
     2504                        '(#\|)
     2505                        '(#\[ #\] #\{ #\} #\|))))
    24982506
    24992507          (r-spaces)
     
    25022510                 [h (and srst (##sys#slot srst (char->integer c)) ) ] )
    25032511            (if h
     2512                ;then handled by read-table entry
    25042513                (h c port)
     2514                ;otherwise chicken extended r5rs syntax
    25052515                (case c
    25062516                  ((#\')
     
    25242534                                (spdrst (##sys#slot crt 3))
    25252535                                (h (and spdrst (##sys#slot spdrst (char->integer dchar)) ) ) )
     2536                                 ;#<num> handled by parameterized # read-table entry?
    25262537                           (cond (h (h dchar port n))
     2538                                 ;#<num>?
    25272539                                 ((or (eq? dchar #\)) (char-whitespace? dchar)) (##sys#sharp-number-hook port n))
    25282540                                 (else (##sys#read-error port "invalid parameterized read syntax" dchar n) ) ) )
     
    25302542                                (h (and sdrst (##sys#slot sdrst (char->integer dchar)) ) ) )
    25312543                           (if h
     2544                               ;then handled by # read-table entry
    25322545                               (h dchar port)
     2546                               ;otherwise chicken extended r5rs syntax
    25332547                               (case (char-downcase dchar)
    25342548                                 ((#\x) (##sys#read-char-0 port) (r-number-with-exactness 16))
     
    25982612                                                          (##sys#read-error port "invalid `#!' token" tok) ) ) ] ) ) ) ) ) )
    25992613                                 (else (##sys#user-read-hook dchar port)) ) ) ) ) ) )
    2600                   ((#\() (r-list #\( #\)))
    2601                   ((#\))
    2602                    (##sys#read-char-0 port)
    2603                    (container c) )
    2604                   ((#\{) (r-list/maybe #\{ #\}))
    2605                   ((#\}) (close-list/maybe c))
    2606                   ((#\[) (open-list/maybe #\[ #\]))
    2607                   ((#\]) (close-list/maybe c))
     2614                  ((#\( #;#\)) (r-list #\( #\)))
     2615                  ((#;#\( #\)) (##sys#read-char-0 port) (container c))
    26082616                  ((#\") (r-string #\"))
    26092617                  ((#\.) (r-number #f))
    26102618                  ((#\- #\+) (r-number #f))
    2611                   (else (cond [(eof-object? c) c]
    2612                               [(char-numeric? c) (r-number #f)]
    2613                               [else (r-symbol)] ) ) ) ) ) )
     2619                  (else
     2620                   (cond [(eof-object? c) c]
     2621                         [(char-numeric? c) (r-number #f)]
     2622                         [else
     2623                          (if (memq c reserved-characters)
     2624                              (reserved-character c)
     2625                              (case c
     2626                                ((#\[ #;#\]) (r-list #\[ #\]))
     2627                                ((#\{ #;#\}) (r-list #\{ #\}))
     2628                                ((#;#\[ #\] #;#\{ #\}) (##sys#read-char-0 port) (container c))
     2629                                (else (r-symbol) ) ) ) ] ) ) ) ) ) )
    26142630
    26152631        (readrec) ) ) ) )
     
    27792795        [csp case-sensitive]
    27802796        [ksp keyword-style]
    2781         [psp parenthesis-synonyms]
    27822797        [cpp current-print-length]
    2783         [string-append string-append]
    2784         ; give it a name.
    2785         [full-special-characters '(#\( #\) #\| #\, #\[ #\] #\{ #\} #\' #\" #\; #\\ #\`)]
    2786         [restricted-special-characters '(#\( #\) #\| #\, #\' #\" #\; #\\ #\`)] )
     2798        [string-append string-append])
    27872799    (lambda (x readable port)
    27882800      (##sys#check-port-mode port #f)
    27892801      (let ([csp (csp)]
    27902802            [ksp (ksp)]
    2791             [psp (psp)]
    27922803            [length-limit (print-length-limit)]
    2793             ; set below - needs 'psp' to make a decision.
    2794             [special-characters #f] )
     2804            [special-characters '(#\( #\) #\, #\[ #\] #\{ #\} #\' #\" #\; #\ #\` #\|)] )
    27952805
    27962806        (define (outstr port str)
     
    28592869                              (not (specialchar? c))
    28602870                              (loop (fx- i 1)) ) ) ) ) ) ) )
    2861 
    2862         ; now have the state to make a decision.
    2863         (set! special-characters
    2864               (if (eq? #:block psp) full-special-characters restricted-special-characters))
    28652871
    28662872        (let out ([x x])
  • chicken/trunk/manual/Parameters

    r13683 r13694  
    9898
    9999=== parenthesis-synonyms
    100 Enables list delimiter synonyms, where {{STYLE}} may be {{#:block}}.
    101 Any other value disables the alternative syntaxes.
     100If true, then the list delimiter synonyms {{#\[}} {{#\]}} and {{#\{}} {{#\}}} are enabled. Defaults to {{#t}}.
     101
     102
     103=== symbol-escape
     104If true, then the symbol escape {{#\|}} {{#\|}} is enabled. Defaults to {{#t}}.
    102105
    103106
  • chicken/trunk/manual/Using the compiler

    r13683 r13694  
    3434
    3535; -check-syntax : Aborts compilation process after macro-expansion and syntax checks.
     36
     37; -chicken-syntax : Enables the Chicken extensions to R5RS syntax, case sensitivity, {...} and [...] read as (...), and |...| escapes a symbol.
    3638
    3739; -debug MODES : Enables one or more compiler debugging modes. {{MODES}} is a string of characters that select debugging information about the compiler that will be printed to standard output.
     
    136138; -no-lambda-info : Don't emit additional information for each {{lambda}} expression (currently the argument-list, after alpha-conversion/renaming).
    137139
     140; -no-parentheses-synonyms STYLE : Disables list delimiter synonyms, [..] and {...} for (...).
     141
     142; -no-symbol-escape : Disables support for escaped symbols, the |...| form.
     143
    138144; -no-trace : Disable generation of tracing information. If a compiled executable should halt due to a runtime error, then a list of the name and the line-number (if available) of the last procedure calls is printed, unless {{-no-trace}} is specified. With this option the generated code is slightly faster.
    139145
     
    155161; -output-file FILENAME : Specifies the pathname of the generated C file. Default is {{FILENAME.c}}.
    156162
    157 ; -parenthesis-synonyms STYLE : Enables list delimiter synonyms, where {{STYLE}} may be {{#:block}}. Any other value is ignored.
    158 
    159163; -postlude EXPRESSIONS : Add {{EXPRESSIONS}} after all other toplevel expressions in the compiled file.  This option may be given multiple times. Processing of this option takes place after processing of {{-epilogue}}.
    160164
     
    162166
    163167; -profile :
    164 ;-accumulate-profile : Instruments the source code to count procedure calls and execution times. After the program terminates (either via an explicit {{exit}} or implicitly), profiling statistics are written to a file named {{PROFILE}}. Each line of the generated file contains a list with the procedure name, the number of calls and the time spent executing it. Use the {{chicken-profile}} program to display the profiling information in a more user-friendly form. Enter {{chicken-profile}} with no arguments at the command line to get a list of available options. The {{-accumulate-profile}} option is similar to {{-profile}}, but the resulting profile information will be appended to any existing {{PROFILE}} file. {{chicken-profile}} will merge and sum up the accumulated timing information, if several entries for the same procedure calls exist.
     168; -accumulate-profile : Instruments the source code to count procedure calls and execution times. After the program terminates (either via an explicit {{exit}} or implicitly), profiling statistics are written to a file named {{PROFILE}}. Each line of the generated file contains a list with the procedure name, the number of calls and the time spent executing it. Use the {{chicken-profile}} program to display the profiling information in a more user-friendly form. Enter {{chicken-profile}} with no arguments at the command line to get a list of available options. The {{-accumulate-profile}} option is similar to {{-profile}}, but the resulting profile information will be appended to any existing {{PROFILE}} file. {{chicken-profile}} will merge and sum up the accumulated timing information, if several entries for the same procedure calls exist.
    165169
    166170; -profile-name FILENAME : Specifies name of the generated profile information (which defaults to {{PROFILE}}. Implies {{-profile}}.
    167171
    168172; -prologue FILENAME : Includes the file named {{FILENAME}} at the start of the compiled source file.  The include-path is not searched. This option may be given multiple times.
     173
     174; -r5rs-syntax : Disables the Chicken extensions to R5RS syntax. Does not disable [[Non-standard read syntax|non-standard read syntax]].
    169175
    170176; -raw : Disables the generation of any implicit code that uses the Scheme libraries (that is all runtime system files besides {{runtime.c}} and {{chicken.h}}).
  • chicken/trunk/manual/Using the interpreter

    r13683 r13694  
    2424; -i  -case-insensitive : Enables the reader to read symbols case insensitive. The default is to read case sensitive (in violation of R5RS).  This option registers the {{case-insensitive}} feature identifier.
    2525
     26;     -chicken-syntax : Enables the Chicken extensions to R5RS syntax, case sensitivity, {...} and [...] read as (...), and |...| escapes a symbol.
     27
    2628; -b  -batch : Quit the interpreter after processing all command line options.
    2729
    2830; -e  -eval EXPRESSIONS : Evaluate {{EXPRESSIONS}}. This option implies {{-batch}} and {{-quiet}}, so no startup message will be printed and the interpreter exits after processing all {{-eval}} options and/or loading files given on the command-line.
    2931
    30 ;     -parenthesis-synonyms STYLE : Enables list delimiter synonyms, where {{STYLE}} may be {{#:block}}. Any other value is ignored.
    31 
    3232; -p  -print EXPRESSIONS : Evaluate {{EXPRESSIONS}} and print the results of each expression using {{print}}. Implies {{-batch}} and {{-quiet}}.
    3333
     
    4444; -n  -no-init : Do not load initialization-file. If this option is not given and the file {{./.csirc}} or {{$HOME/.csirc}} exists, then it is loaded before the read-eval-print loop commences.
    4545
     46;     -no-parentheses-synonyms STYLE : Disables list delimiter synonyms, [..] and {...} for (...).
     47
     48;     -no-symbol-escape : Disables support for escaped symbols, the |...| form.
     49
    4650; -w  -no-warnings : Disables any warnings that might be issued by the reader or evaluated code.
    4751
    4852; -q  -quiet : Do not print a startup message. Also disables generation of call-trace information for interpreted code.
     53
     54;     -r5rs-syntax : Disables the Chicken extensions to R5RS syntax. Does not disable [[Non-standard read syntax|non-standard read syntax]].
    4955
    5056; -s  -script PATHNAME : This is equivalent to {{-batch -quiet -no-init PATHNAME}}. Arguments following {{PATHNAME}} are available by using  {{command-line-arguments}} and are not processed as interpreter options. Extra options in the environment variable {{CSI_OPTIONS}} are ignored.
  • chicken/trunk/regex.scm

    r13169 r13694  
    6666(include "irregex.scm")
    6767
     68
     69;;; Record `regexp'
     70
    6871(define-record regexp x)
    6972
     
    8386        ((irregex? x) x)
    8487        (else (irregex x))))
     88
     89
     90;;; Basic `regexp' operations
    8591
    8692(define (string-match rx str)
     
    127133
    128134
    129 
    130135;;; Split string into fields:
    131136
     
    134139        [substring substring]
    135140        [string-search-positions string-search-positions] )
    136     (lambda (rgxp str . mode-and-start)
     141    (lambda (rx str . mode-and-start)
    137142      (##sys#check-string str 'string-split-fields)
    138143      (let* ([argc (length mode-and-start)]
     
    145150                        (if (fx< start len)
    146151                            (##sys#error 'string-split-fields
    147                                          "record does not end with suffix" str rgxp)
     152                                         "record does not end with suffix" str rx)
    148153                            (reverse ms) ) ) ]
    149154                     [(#:infix)
     
    157162                      [else (lambda (start from to) (substring str from to))] ) ] )
    158163        (let loop ([ms '()] [start start])
    159           (let ([m (string-search-positions rgxp str start)])
     164          (let ([m (string-search-positions rx str start)])
    160165            (if m
    161166                (let* ([mp (car m)]
     
    177182        [make-string make-string]
    178183        [string-search-positions string-search-positions] )
    179     (lambda (regex subst string . flag)
     184    (lambda (rx subst string . flag)
    180185      (##sys#check-string subst 'string-substitute)
    181186      (let* ([which (if (pair? flag) (car flag) 1)]
     
    205210        (let loop ([index 0] [count 1])
    206211          (let ((matches (and (fx< index strlen)
    207                               (string-search-positions regex string index))))
     212                              (string-search-positions rx string index))))
    208213            (cond [matches
    209214                   (let* ([range (car matches)]
     
    212217                            (##sys#error
    213218                             'string-substitute "empty substitution match"
    214                              regex) )
     219                             rx) )
    215220                           ((or (not (fixnum? which)) (fx= count which))
    216221                            (push (substring string index (car range)))
     
    291296(define grep
    292297  (let ([string-search string-search])
    293     (lambda (rgxp lst)
     298    (lambda (rx lst)
    294299      (##sys#check-list lst 'grep)
    295300      (let loop ([lst lst])
     
    298303            (let ([x (car lst)]
    299304                  [r (cdr lst)] )
    300               (if (string-search rgxp x)
     305              (if (string-search rx x)
    301306                  (cons x (loop r))
    302307                  (loop r) ) ) ) ) ) ) )
  • chicken/trunk/support.scm

    r13672 r13694  
    12301230Usage: chicken FILENAME OPTION ...
    12311231
     1232  `chicken' is the CHICKEN compiler.
     1233 
    12321234  FILENAME should be a complete source file name with extension, or "-" for
    12331235  standard input. OPTION may be one of the following:
     
    12351237  General options:
    12361238
    1237     -help                       display this text and exit
    1238     -version                    display compiler version and exit
    1239     -release                    print release number and exit
    1240     -verbose                    display information on compilation progress
     1239    -help                        display this text and exit
     1240    -version                     display compiler version and exit
     1241    -release                     print release number and exit
     1242    -verbose                     display information on compilation progress
    12411243
    12421244  File and pathname options:
    12431245
    1244     -output-file FILENAME       specifies output-filename, default is 'out.c'
    1245     -include-path PATHNAME      specifies alternative path for included files
    1246     -to-stdout                  write compiled file to stdout instead of file
     1246    -output-file FILENAME        specifies output-filename, default is 'out.c'
     1247    -include-path PATHNAME       specifies alternative path for included files
     1248    -to-stdout                   write compiled file to stdout instead of file
    12471249
    12481250  Language options:
    12491251
    1250     -feature SYMBOL             register feature identifier
     1252    -feature SYMBOL              register feature identifier
    12511253
    12521254  Syntax related options:
    12531255
    1254     -case-insensitive           don't preserve case of read symbols
    1255     -keyword-style STYLE        allow alternative keyword syntax (prefix, suffix or none)
    1256     -parenthesis-synonyms STYLE allow alternative keyword syntax (block or none)
    1257     -compile-syntax             macros are made available at run-time
    1258     -emit-import-library MODULE write compile-time module information into separate file
     1256    -case-insensitive            don't preserve case of read symbols
     1257    -keyword-style STYLE         allow alternative keyword syntax
     1258                                  (prefix, suffix or none)
     1259    -no-parentheses-synonyms     disables list delimiter synonyms
     1260    -no-symbol-escape            disables support for escaped symbols
     1261    -chicken-syntax              enables the Chicken extensions to
     1262                                  R5RS syntax
     1263    -r5rs-syntax                 disables the Chicken extensions to
     1264                                  R5RS syntax
     1265    -compile-syntax              macros are made available at run-time
     1266    -emit-import-library MODULE  write compile-time module information into
     1267                                  separate file
    12591268
    12601269  Translation options:
    12611270
    1262     -explicit-use               do not use units 'library' and 'eval' by default
    1263     -check-syntax               stop compilation after macro-expansion
    1264     -analyze-only               stop compilation after first analysis pass
     1271    -explicit-use                do not use units 'library' and 'eval' by
     1272                                  default
     1273    -check-syntax                stop compilation after macro-expansion
     1274    -analyze-only                stop compilation after first analysis pass
    12651275
    12661276  Debugging options:
    12671277
    1268     -no-warnings                disable warnings
    1269     -disable-warning CLASS      disable specific class of warnings
    1270     -debug-level NUMBER         set level of available debugging information
    1271     -no-trace                   disable tracing information
    1272     -profile                    executable emits profiling information
    1273     -profile-name FILENAME      name of the generated profile information file
    1274     -accumulate-profile         executable emits profiling information in append mode
    1275     -no-lambda-info             omit additional procedure-information
     1278    -no-warnings                 disable warnings
     1279    -disable-warning CLASS       disable specific class of warnings
     1280    -debug-level NUMBER          set level of available debugging information
     1281    -no-trace                    disable tracing information
     1282    -profile                     executable emits profiling information
     1283    -profile-name FILENAME       name of the generated profile information file
     1284    -accumulate-profile          executable emits profiling information in
     1285                                  append mode
     1286    -no-lambda-info              omit additional procedure-information
    12761287
    12771288  Optimization options:
    12781289
    1279     -optimize-level NUMBER      enable certain sets of optimization options
    1280     -optimize-leaf-routines     enable leaf routine optimization
    1281     -lambda-lift                enable lambda-lifting
    1282     -no-usual-integrations      standard procedures may be redefined
    1283     -unsafe                     disable safety checks
    1284     -local                      assume globals are only modified in current file
    1285     -block                      enable block-compilation
    1286     -disable-interrupts         disable interrupts in compiled code
    1287     -fixnum-arithmetic          assume all numbers are fixnums
    1288     -benchmark-mode             equivalent to '-block -optimize-level 4
    1289                                  -debug-level 0 -fixnum-arithmetic -lambda-lift
    1290                                  -disable-interrupts -inline'
    1291     -disable-stack-overflow-checks 
    1292                                 disables detection of stack-overflows.
    1293     -inline                     enable inlining
    1294     -inline-limit               set inlining threshold
    1295     -inline-global              enable cross-module inlining
    1296     -emit-inline-file FILENAME  generate file with globally inlinable procedures
    1297                                 (implies -inline -local)
     1290    -optimize-level NUMBER       enable certain sets of optimization options
     1291    -optimize-leaf-routines      enable leaf routine optimization
     1292    -lambda-lift                 enable lambda-lifting
     1293    -no-usual-integrations       standard procedures may be redefined
     1294    -unsafe                      disable safety checks
     1295    -local                       assume globals are only modified in current
     1296                                  file
     1297    -block                       enable block-compilation
     1298    -disable-interrupts          disable interrupts in compiled code
     1299    -fixnum-arithmetic           assume all numbers are fixnums
     1300    -benchmark-mode              equivalent to 'block -optimize-level 4
     1301                                  -debug-level 0 -fixnum-arithmetic -lambda-lift
     1302                                  -inline -disable-interrupts'
     1303    -disable-stack-overflow-checks  disables detection of stack-overflows
     1304    -inline                      enable inlining
     1305    -inline-limit                set inlining threshold
     1306    -inline-global               enable cross-module inlining
     1307    -emit-inline-file FILENAME   generate file with globally inlinable
     1308                                  procedures (implies -inline -local)
    12981309
    12991310  Configuration options:
    13001311
    1301     -unit NAME                  compile file as a library unit
    1302     -uses NAME                  declare library unit as used.
    1303     -heap-size NUMBER           specifies heap-size of compiled executable
    1304     -heap-initial-size NUMBER   specifies heap-size at startup time
    1305     -heap-growth PERCENTAGE     specifies growth-rate of expanding heap
    1306     -heap-shrinkage PERCENTAGE  specifies shrink-rate of contracting heap
    1307     -nursery NUMBER
    1308     -stack-size NUMBER          specifies nursery size of compiled executable
    1309     -extend FILENAME            load file before compilation commences
    1310     -prelude EXPRESSION         add expression to front of source file
    1311     -postlude EXPRESSION        add expression to end of source file
    1312     -prologue FILENAME          include file before main source file
    1313     -epilogue FILENAME          include file after main source file
    1314     -dynamic                    compile as dynamically loadable code
    1315     -require-extension NAME     require and import extension NAME
    1316     -static-extension NAME      import extension NAME but link statically (if available)
    1317     -extension                  compile as extension (dynamic or static)
    1318     -ignore-repository          do not refer to repository for extensions
     1312    -unit NAME                   compile file as a library unit
     1313    -uses NAME                   declare library unit as used.
     1314    -heap-size NUMBER            specifies heap-size of compiled executable
     1315    -heap-initial-size NUMBER    specifies heap-size at startup time
     1316    -heap-growth PERCENTAGE      specifies growth-rate of expanding heap
     1317    -heap-shrinkage PERCENTAGE   specifies shrink-rate of contracting heap
     1318    -nursery NUMBER  -stack-size NUMBER
     1319                                 specifies nursery size of compiled executable
     1320    -extend FILENAME             load file before compilation commences
     1321    -prelude EXPRESSION          add expression to front of source file
     1322    -postlude EXPRESSION         add expression to end of source file
     1323    -prologue FILENAME           include file before main source file
     1324    -epilogue FILENAME           include file after main source file
     1325    -dynamic                     compile as dynamically loadable code
     1326    -require-extension NAME      require and import extension NAME
     1327    -static-extension NAME       import extension NAME but link statically
     1328                                  (if available)
     1329    -extension                   compile as extension (dynamic or static)
     1330    -ignore-repository           do not refer to repository for extensions
    13191331
    13201332  Obscure options:
    13211333
    1322     -debug MODES                display debugging output for the given modes
    1323     -unsafe-libraries           marks the generated file as being linked
    1324                                 with the unsafe runtime system
    1325     -raw                        do not generate implicit init- and exit code                           
    1326     -emit-external-prototypes-first  emit protoypes for callbacks before foreign
    1327                                 declarations
     1334    -debug MODES                 display debugging output for the given modes
     1335    -unsafe-libraries            marks the generated file as being linked with
     1336                                  the unsafe runtime system
     1337    -raw                         do not generate implicit init- and exit code                           
     1338    -emit-external-prototypes-first
     1339                                 emit protoypes for callbacks before foreign
     1340                                  declarations
    13281341
    13291342EOF
  • chicken/trunk/tests/hash-table-tests.scm

    r13150 r13694  
    6060(assert (= (hash-table-size ht) 2))
    6161
    62 (print "HT - AList")
     62(print "HT - A-List")
    6363(let ([alist (hash-table->alist ht)])
    6464  (assert (list? alist))
     
    8181(assert (= (hash-table-size ht) 0))
    8282
    83 (print "HT - Make from AList")
     83(print "HT - Make from A-List")
    8484(set! ht (alist->hash-table '(("abc" . #t) ("cbs" . #t) ("cnn" . #f))))
    8585(assert (hash-table? ht))
Note: See TracChangeset for help on using the changeset viewer.