Author: coke
Date: Fri Nov 4 09:56:00 2005
New Revision: 9781
Added:
trunk/languages/tcl/lib/commands/regexp.pir
trunk/languages/tcl/t/cmd_regexp.t (contents, props changed)
Modified:
trunk/MANIFEST
trunk/config/gen/makefiles/tcl.in
Log:
Add basic [regexp] command as a placeholder. Will need to add tests
in anticipation of pmi's addition of more perl5-like RE capability.
Modified: trunk/MANIFEST
==============================================================================
--- trunk/MANIFEST (original)
+++ trunk/MANIFEST Fri Nov 4 09:56:00 2005
@@ -1452,6 +1452,7 @@ languages/tcl/lib/commands/parray.pir
languages/tcl/lib/commands/proc.pir [tcl]
languages/tcl/lib/commands/open.pir [tcl]
languages/tcl/lib/commands/puts.pir [tcl]
+languages/tcl/lib/commands/regexp.pir [tcl]
languages/tcl/lib/commands/rename.pir [tcl]
languages/tcl/lib/commands/return.pir [tcl]
languages/tcl/lib/commands/set.pir [tcl]
@@ -1514,6 +1515,7 @@ languages/tcl/t/cmd_namespace.t
languages/tcl/t/cmd_parray.t [tcl]
languages/tcl/t/cmd_proc.t [tcl]
languages/tcl/t/cmd_puts.t [tcl]
+languages/tcl/t/cmd_regexp.t [tcl]
languages/tcl/t/cmd_rename.t [tcl]
languages/tcl/t/cmd_return.t [tcl]
languages/tcl/t/cmd_set.t [tcl]
Modified: trunk/config/gen/makefiles/tcl.in
==============================================================================
--- trunk/config/gen/makefiles/tcl.in (original)
+++ trunk/config/gen/makefiles/tcl.in Fri Nov 4 09:56:00 2005
@@ -56,6 +56,7 @@ lib${slash}commands${slash}open.pir \
lib${slash}commands${slash}parray.pir \
lib${slash}commands${slash}proc.pir \
lib${slash}commands${slash}puts.pir \
+lib${slash}commands${slash}regexp.pir \
lib${slash}commands${slash}rename.pir \
lib${slash}commands${slash}return.pir \
lib${slash}commands${slash}set.pir \
Added: trunk/languages/tcl/lib/commands/regexp.pir
==============================================================================
--- (empty file)
+++ trunk/languages/tcl/lib/commands/regexp.pir Fri Nov 4 09:56:00 2005
@@ -0,0 +1,10 @@
+.namespace [ "Tcl" ]
+
+.sub "®exp"
+ .param pmc argv :slurpy
+
+
+badargs:
+ .throw("wrong # args: should be \"regexp ?switches? exp string ?matchVar?
?subMatchVar subMatchVar ...?\"")
+
+.end
Added: trunk/languages/tcl/t/cmd_regexp.t
==============================================================================
--- (empty file)
+++ trunk/languages/tcl/t/cmd_regexp.t Fri Nov 4 09:56:00 2005
@@ -0,0 +1,12 @@
+#!/usr/bin/perl
+
+use strict;
+use lib qw(tcl/t t . ../lib ../../lib ../../../lib);
+use Parrot::Test tests => 1;
+use Test::More;
+
+language_output_is("tcl",<<TCL,<<'OUT',"regexp no args");
+regexp
+TCL
+wrong # args: should be "regexp ?switches? exp string ?matchVar? ?subMatchVar
subMatchVar ...?"
+OUT