Page 1 of 1

Trying to compile a program

Posted: Thu May 05, 2011 9:30 am
by ngemb
Hi, I am very new in lisp.

I really need help.
How can I can execute this: clisp sme_RuleCompiler.lisp < keywords.in

sme_RuleCompiler.lisp is my file and keywords.in is another file to use with sme_RuleCompiler.lisp

as explain here:

--------------------------------------------------------------------------------
Getting Started
--------------------------------------------------------------------------------

While the source code provided should work with any ANSI Common Lisp compatible
compiler/interpreter, for the sake of simplicity, it is assumed the user is
using clisp.

The compiler can accept rules in a number of representations. Examples located
at the bottom of the source code demonstrate multiple methods for inputting
keywords.

To run the compiler over a set of keywords located in a file, the user should
redirect input from a file as follows:

% clisp sme_RuleCompiler.lisp < keywords.in


Where "keywords.in" is the name of an ASCII text file. Each line of the file
represents a keyword to be matched. Every character on the line must be
preceded with a colon (":"). If it is necessary to represent an 8-bit byte
sequence that is not specified by a printable character, a colon can be
followed by two hexadecimal digits in place of a single character.

Re: Trying to compile a program

Posted: Thu May 05, 2011 11:32 am
by ramarren
I am not quite sure what you are asking. If you don't know how to execute programs from the command line, then this is not a Lisp issue and you should look for information specific to your operating system.

Re: Trying to compile a program

Posted: Thu May 05, 2011 12:51 pm
by nuntius
clisp sme_RuleCompiler.lisp < keywords.in is meant to be run on a "command line", meaning a DOS prompt (usually cmd.exe on Microsoft's OS or bash prompt on pretty much everything else).

That syntax will work assuming clisp is found in your system's PATH environment variable.
The text of the file keywords.in should then be available on *standard-input*.

Re: Trying to compile a program

Posted: Fri May 06, 2011 7:58 pm
by ngemb
Thanks, I got it.