marcomaggi / vicare

A native compiler for Scheme compliant with R6RS
http://marcomaggi.github.com/vicare.html
Other
200 stars 34 forks source link

vicare error: program file name given after mode option #33

Closed cnsgsz closed 12 years ago

cnsgsz commented 12 years ago

Not sure what is happening. Also tried the latest version, but same issue. It also passed 100 of 104 of the simple tests in the package. Any suggestion much appreciated!

cnsgsz@ubuntu:~$ vicare --r6rs-script test.sps hi there *\ vicare error: program file name given after mode option

The program otherwise seems to run correctly:

cnsgsz@ubuntu:~$ vicare Vicare Scheme version 0.2d10 Revision devel/de54fd79ed8b7dd28e18924aa1c64ba45adf7add Build 2012-08-07

Copyright (c) 2006-2010 Abdulaziz Ghuloum and contributors Copyright (c) 2011, 2012 Marco Maggi

vicare>

marcomaggi commented 12 years ago

Check the help screen:

$ vicare -h
Vicare Scheme, a compiler for R6RS Scheme.
Usage:

vicare [OPTIONS] [FILENAME]                     [-- [PROGRAM OPTS]]
vicare [OPTIONS] --r6rs-script PROGRAM          [-- [PROGRAM OPTS]]
vicare [OPTIONS] --r6rs-repl PROGRAM            [-- [PROGRAM OPTS]]
vicare [OPTIONS] --script CODE                  [-- [PROGRAM OPTS]]
vicare [OPTIONS] --compile-dependencies PROGRAM [-- [PROGRAM OPTS]]
vicare [OPTIONS] --r6rs-expand PROGRAM          [-- [PROGRAM OPTS]]

the  OPTIONS are  interpreted by  vicare, PROGRAM  OPTS can  be obtained
using the COMMAND-LINE procedure in the (rnrs programs) library.

as you see to specify command line arguments to a Scheme program we have to separate them with -- from the command line arguments that go to the "vicare" executable. So:

$ cat proof.sps
#!r6rs
(import (vicare))
(pretty-print (command-line)
          (current-error-port))

$ vicare proof.sps
("proof.sps")
$ vicare proof.sps -- a b c
("proof.sps" "a" "b" "c")
$ vicare proof.sps a b c
*** vicare error: program file name given after mode option
$

is this what you need?

cnsgsz commented 12 years ago

Thanks! That solved it.