From a559c25918b1466cdb50c9f978a86f01be0bac10 Mon Sep 17 00:00:00 2001 From: Larry Wall Date: Wed, 27 Jan 1988 22:18:25 +0000 Subject: perl 1.0 patch 8: perl needed an eval operator and a symbolic debugger I didn't add an eval operator to the original perl because I hadn't thought of any good uses for it. Recently I thought of some. Along with creating the eval operator, this patch introduces a symbolic debugger for perl scripts, which makes use of eval to interpret some debugging commands. Having eval also lets me emulate awk's FOO=bar command line behavior with a line such as the one a2p now inserts at the beginning of translated scripts. --- perl.y | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'perl.y') diff --git a/perl.y b/perl.y index 16f8a9aa96..b9a7a8e30e 100644 --- a/perl.y +++ b/perl.y @@ -1,6 +1,9 @@ -/* $Header: perl.y,v 1.0 87/12/18 15:48:59 root Exp $ +/* $Header: perl.y,v 1.0.1.1 88/01/28 10:25:31 root Exp $ * * $Log: perl.y,v $ + * Revision 1.0.1.1 88/01/28 10:25:31 root + * patch8: added eval operator. + * * Revision 1.0 87/12/18 15:48:59 root * Initial revision * @@ -97,7 +100,10 @@ char *tokename[] = { %% /* RULES */ prog : lineseq - { main_root = block_head($1); } + { if (in_eval) + eval_root = block_head($1); + else + main_root = block_head($1); } ; compblock: block CONTINUE block -- cgit v1.2.1