From d5666f2a6dcf927de2fdf8f8039b0df49ac538a9 Mon Sep 17 00:00:00 2001 From: Ryszard Glab Date: Tue, 5 Oct 1999 10:37:03 +0000 Subject: [PATCH] ChangeLog 19991005-12:30 GMT+2 --- harbour/ChangeLog | 9 +++++++++ harbour/source/compiler/harbour.y | 17 +++++++++-------- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index da6d1c6b3e..585943c69b 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,12 @@ +19991005-12:30 GMT+2 Ryszard Glab + + *source/compiler/harbour.y + * changed some rules to correctly handle the following syntax: + LOCAL cbVar:={|| cbVar} + (the cbVar inside a codeblock is correctly considered a local + variable instead of memvar variable) + * corrected usage info to print LF at the end of message + 19991005-08:36 GMT+1 Victor Szel * source/vm/main*.c source/vm/Makefile diff --git a/harbour/source/compiler/harbour.y b/harbour/source/compiler/harbour.y index 1e5decb0be..11bd0f7d3a 100644 --- a/harbour/source/compiler/harbour.y +++ b/harbour/source/compiler/harbour.y @@ -1036,14 +1036,14 @@ VarDef : IDENTIFIER { cVarType = ' '; AddV | IDENTIFIER AS_ARRAY { cVarType = 'A'; AddVar( $1 ); } | IDENTIFIER AS_BLOCK { cVarType = 'B'; AddVar( $1 ); } | IDENTIFIER AS_OBJECT { cVarType = 'O'; AddVar( $1 ); } - | IDENTIFIER INASSIGN Expression { cVarType = ' '; AddVar( $1 ); PopId( $1 ); } - | IDENTIFIER AS_NUMERIC INASSIGN Expression { cVarType = 'N'; AddVar( $1 ); PopId( $1 ); } - | IDENTIFIER AS_CHARACTER INASSIGN Expression { cVarType = 'C'; AddVar( $1 ); PopId( $1 ); } - | IDENTIFIER AS_LOGICAL INASSIGN Expression { cVarType = 'L'; AddVar( $1 ); PopId( $1 ); } - | IDENTIFIER AS_DATE INASSIGN Expression { cVarType = 'D'; AddVar( $1 ); PopId( $1 ); } - | IDENTIFIER AS_ARRAY INASSIGN Expression { cVarType = 'A'; AddVar( $1 ); PopId( $1 ); } - | IDENTIFIER AS_BLOCK INASSIGN Expression { cVarType = 'B'; AddVar( $1 ); PopId( $1 ); } - | IDENTIFIER AS_OBJECT INASSIGN Expression { cVarType = 'O'; AddVar( $1 ); PopId( $1 ); } + | IDENTIFIER INASSIGN { cVarType = ' '; AddVar( $1 ); } Expression { PopId( $1 ); } + | IDENTIFIER AS_NUMERIC INASSIGN { cVarType = 'N'; AddVar( $1 ); } Expression { PopId( $1 ); } + | IDENTIFIER AS_CHARACTER INASSIGN { cVarType = 'C'; AddVar( $1 ); } Expression { PopId( $1 ); } + | IDENTIFIER AS_LOGICAL INASSIGN { cVarType = 'L'; AddVar( $1 ); } Expression { PopId( $1 ); } + | IDENTIFIER AS_DATE INASSIGN { cVarType = 'D'; AddVar( $1 ); } Expression { PopId( $1 ); } + | IDENTIFIER AS_ARRAY INASSIGN { cVarType = 'A'; AddVar( $1 ); } Expression { PopId( $1 ); } + | IDENTIFIER AS_BLOCK INASSIGN { cVarType = 'B'; AddVar( $1 ); } Expression { PopId( $1 ); } + | IDENTIFIER AS_OBJECT INASSIGN { cVarType = 'O'; AddVar( $1 ); } Expression { PopId( $1 ); } | IDENTIFIER ArrExpList ']' { cVarType = ' '; AddVar( $1 ); DimArray( $2 ); PopId( $1 ); } | IDENTIFIER ArrExpList ']' AS_ARRAY { cVarType = 'A'; AddVar( $1 ); DimArray( $2 ); PopId( $1 ); } ; @@ -1912,6 +1912,7 @@ void PrintUsage( char * szSelf ) "\n /z suppress shortcutting (.and. & .or.)" "\n /10 restrict symbol length to 10 characters" /* TODO: "\n @ compile list of modules in " */ + "\n" , szSelf ); }