[pure-lang-svn] SF.net SVN: pure-lang:[705] pure/trunk
Status: Beta
Brought to you by:
agraef
From: <ag...@us...> - 2008-09-04 23:13:40
|
Revision: 705 http://pure-lang.svn.sourceforge.net/pure-lang/?rev=705&view=rev Author: agraef Date: 2008-09-04 23:13:50 +0000 (Thu, 04 Sep 2008) Log Message: ----------- Renamed 'list' command to 'show'. Modified Paths: -------------- pure/trunk/ChangeLog pure/trunk/lexer.ll pure/trunk/pure.cc Modified: pure/trunk/ChangeLog =================================================================== --- pure/trunk/ChangeLog 2008-09-04 23:01:42 UTC (rev 704) +++ pure/trunk/ChangeLog 2008-09-04 23:13:50 UTC (rev 705) @@ -1,3 +1,11 @@ +2008-09-05 Albert Graef <Dr....@t-...> + + * pure.cc, lexer.ll: Renamed the interactive 'list' command to + 'show', as suggested by John Cowan. This hopefully puts an end to + inadvertent execution of that command, since 'show' is no prelude + function and is deemed less likely to be used as a function name + by the programmer. + 2008-09-04 Albert Graef <Dr....@t-...> * lib/prelude.pure: Added the normal order fixed point combinator, Modified: pure/trunk/lexer.ll =================================================================== --- pure/trunk/lexer.ll 2008-09-04 23:01:42 UTC (rev 704) +++ pure/trunk/lexer.ll 2008-09-04 23:13:50 UTC (rev 705) @@ -133,8 +133,9 @@ static const char *commands[] = { "cd", "clear", "const", "def", "extern", "help", "infix", "infixl", - "infixr", "let", "list", "ls", "nullary", "override", "postfix", "prefix", - "private", "pwd", "quit", "run", "save", "stats", "underride", "using", 0 + "infixr", "let", "ls", "nullary", "override", "postfix", "prefix", + "private", "pwd", "quit", "run", "save", "show", "stats", "underride", + "using", 0 }; typedef map<string, symbol> symbol_map; @@ -357,8 +358,8 @@ else if (chdir(args.l.begin()->c_str())) perror("cd"); } -^list.* { - // list command is only permitted in interactive mode +^show.* { + // show command is only permitted in interactive mode if (!interp.interactive) REJECT; uint8_t s_verbose = interpreter::g_verbose; uint8_t tflag = 0; int pflag = -1; @@ -368,7 +369,7 @@ const char *s = yytext+4; if (*s && !isspace(*s)) REJECT; yylloc->step(); - argl args(s, "list"); + argl args(s, "show"); list<string>::iterator arg; if (!args.ok) goto out; // process option arguments @@ -402,8 +403,8 @@ tflag = interp.temp; break; case 'h': - cout << "list command help: list [options ...] [symbol ...]\n\ -Options may be combined, e.g., list -tvl is the same as list -t -v -l.\n\ + cout << "show command help: show [options ...] [symbol ...]\n\ +Options may be combined, e.g., show -tvl is the same as show -t -v -l.\n\ -a Disassembles pattern matching automata. Useful for debugging purposes.\n\ -c Print information about defined constants.\n\ -d Disassembles LLVM IR, showing the generated LLVM assembler code of a\n\ @@ -427,7 +428,7 @@ -v Print information about defined variables.\n"; goto out; default: - cerr << "list: invalid option character '" << *s << "'\n"; + cerr << "show: invalid option character '" << *s << "'\n"; goto out; } } Modified: pure/trunk/pure.cc =================================================================== --- pure/trunk/pure.cc 2008-09-04 23:01:42 UTC (rev 704) +++ pure/trunk/pure.cc 2008-09-04 23:13:50 UTC (rev 705) @@ -48,15 +48,16 @@ PURELIB Directory to search for library scripts and the prelude.\n\ PURE_INCLUDE Path to search for included source files.\n\ PURE_LIBRARY Path to search for dynamic libraries.\n\ -PURE_MORE Shell command for paging through output of the 'list' command.\n\ +PURE_MORE Shell command for paging through output of the 'show' command.\n\ PURE_PS Command prompt to be used in the interactive command loop.\n\ PURE_STACK Maximum stack size in kilobytes (default: 0 = unlimited).\n" #define LICENSE "This program is free software distributed under the GNU Public License\n(GPL V3 or later). Please see the COPYING file for details.\n" static const char *commands[] = { "cd", "clear", "const", "def", "extern", "help", "infix", "infixl", - "infixr", "let", "list", "ls", "nullary", "override", "postfix", "prefix", - "private", "pwd", "quit", "run", "save", "stats", "underride", "using", 0 + "infixr", "let", "ls", "nullary", "override", "postfix", "prefix", + "private", "pwd", "quit", "run", "save", "show", "stats", "underride", + "using", 0 }; /* Generator functions for command completion. */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |