[pure-lang-svn] SF.net SVN: pure-lang:[630] pure/trunk
Status: Beta
Brought to you by:
agraef
|
From: <ag...@us...> - 2008-08-27 09:16:03
|
Revision: 630
http://pure-lang.svn.sourceforge.net/pure-lang/?rev=630&view=rev
Author: agraef
Date: 2008-08-27 09:16:10 +0000 (Wed, 27 Aug 2008)
Log Message:
-----------
Add 'private' keyword.
Modified Paths:
--------------
pure/trunk/etc/pure-mode.el.in
pure/trunk/etc/pure.lang
pure/trunk/etc/pure.vim
pure/trunk/etc/pure.xml
pure/trunk/lexer.ll
pure/trunk/parser.yy
pure/trunk/pure.1.in
pure/trunk/pure.cc
Modified: pure/trunk/etc/pure-mode.el.in
===================================================================
--- pure/trunk/etc/pure-mode.el.in 2008-08-27 09:14:51 UTC (rev 629)
+++ pure/trunk/etc/pure-mode.el.in 2008-08-27 09:16:10 UTC (rev 630)
@@ -165,7 +165,7 @@
(list
(concat "\\<\\("
"const\\|def\\|extern\\|infix[lr]?\\|"
- "let\\|nullary\\|p\\(refix\\|ostfix\\)\\|"
+ "let\\|nullary\\|p\\(r\\(efix\\|ivate\\)\\|ostfix\\)\\|"
"using"
"\\)\\>")
0 'font-lock-keyword-face))
@@ -179,7 +179,7 @@
(list
(concat "\\<\\("
"case\\|const\\|def\\|e\\(lse\\|nd\\|xtern\\)\\|i\\(f\\|nfix[lr]?\\)\\|"
- "let\\|nullary\\|o\\(f\\|therwise\\)\\|p\\(refix\\|ostfix\\)\\|"
+ "let\\|nullary\\|o\\(f\\|therwise\\)\\|p\\(r\\(efix\\|ivate\\)\\|ostfix\\)\\|"
"then\\|using\\|w\\(hen\\|ith\\)"
"\\)\\>")
0 'font-lock-keyword-face))
Modified: pure/trunk/etc/pure.lang
===================================================================
--- pure/trunk/etc/pure.lang 2008-08-27 09:14:51 UTC (rev 629)
+++ pure/trunk/etc/pure.lang 2008-08-27 09:16:10 UTC (rev 630)
@@ -4,8 +4,8 @@
$DESCRIPTION=Pure
# Pure keywords.
-$KW_LIST(kwa)=infix infixl infixr prefix postfix nullary case const def else
-end extern if let of otherwise then using when with
+$KW_LIST(kwa)=infix infixl infixr prefix postfix nullary private
+case const def else end extern if let of otherwise then using when with
# These aren't really keywords but we want them to stick out anyway.
$KW_LIST(kwb)=catch throw
Modified: pure/trunk/etc/pure.vim
===================================================================
--- pure/trunk/etc/pure.vim 2008-08-27 09:14:51 UTC (rev 629)
+++ pure/trunk/etc/pure.vim 2008-08-27 09:16:10 UTC (rev 630)
@@ -32,7 +32,7 @@
syn region pureString start=+"+ skip=+\\"+ end=+"+
" keywords
-syn keyword pureKeyword infix infixl infixr prefix postfix nullary
+syn keyword pureKeyword infix infixl infixr prefix postfix nullary private
syn keyword pureKeyword case const def else end extern if let of otherwise then
syn keyword pureKeyword using when with
syn keyword pureSpecial catch throw
Modified: pure/trunk/etc/pure.xml
===================================================================
--- pure/trunk/etc/pure.xml 2008-08-27 09:14:51 UTC (rev 629)
+++ pure/trunk/etc/pure.xml 2008-08-27 09:16:10 UTC (rev 630)
@@ -23,6 +23,7 @@
<item> nullary </item>
<item> of </item>
<item> otherwise </item>
+ <item> private </item>
<item> prefix </item>
<item> postfix </item>
<item> then </item>
Modified: pure/trunk/lexer.ll
===================================================================
--- pure/trunk/lexer.ll 2008-08-27 09:14:51 UTC (rev 629)
+++ pure/trunk/lexer.ll 2008-08-27 09:16:10 UTC (rev 630)
@@ -134,7 +134,7 @@
static const char *commands[] = {
"cd", "clear", "const", "def", "extern", "help", "infix", "infixl",
"infixr", "let", "list", "ls", "nullary", "override", "postfix", "prefix",
- "pwd", "quit", "run", "save", "stats", "underride", "using", 0
+ "private", "pwd", "quit", "run", "save", "stats", "underride", "using", 0
};
typedef map<string, symbol> symbol_map;
@@ -897,6 +897,7 @@
prefix yylval->fix = prefix; return token::FIX;
postfix yylval->fix = postfix; return token::FIX;
nullary return token::NULLARY;
+private return token::PRIVATE;
const return token::CONST;
def return token::DEF;
let return token::LET;
Modified: pure/trunk/parser.yy
===================================================================
--- pure/trunk/parser.yy 2008-08-27 09:14:51 UTC (rev 629)
+++ pure/trunk/parser.yy 2008-08-27 09:16:10 UTC (rev 630)
@@ -96,6 +96,7 @@
#include "interpreter.hh"
%}
+%token PRIVATE "private"
%token NULLARY "nullary"
%token <fix> FIX "fixity"
Modified: pure/trunk/pure.1.in
===================================================================
--- pure/trunk/pure.1.in 2008-08-27 09:14:51 UTC (rev 629)
+++ pure/trunk/pure.1.in 2008-08-27 09:16:10 UTC (rev 630)
@@ -217,7 +217,7 @@
.PP
There are a few reserved keywords which cannot be used as identifiers. These
are: case const def else end extern if infix infixl infixr let nullary of
-otherwise postfix prefix then using when with.
+otherwise postfix prefix private then using when with.
.PP
Pure is a terse language. You won't see many declarations, and often your
programs will read more like a collection of algebraic specifications (which
Modified: pure/trunk/pure.cc
===================================================================
--- pure/trunk/pure.cc 2008-08-27 09:14:51 UTC (rev 629)
+++ pure/trunk/pure.cc 2008-08-27 09:16:10 UTC (rev 630)
@@ -56,7 +56,7 @@
static const char *commands[] = {
"cd", "clear", "const", "def", "extern", "help", "infix", "infixl",
"infixr", "let", "list", "ls", "nullary", "override", "postfix", "prefix",
- "pwd", "quit", "run", "save", "stats", "underride", "using", 0
+ "private", "pwd", "quit", "run", "save", "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.
|