bug-gawk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-gawk] inconsistent syntax error with comparison operators


From: Stéphane Campinas
Subject: [bug-gawk] inconsistent syntax error with comparison operators
Date: Thu, 13 Dec 2018 10:10:08 +0100
User-agent: NeoMutt/20180716

Hi,

I have found some inconsistencies regarding syntax errors for comparison
operators.

For example, the following script works:

        { print 1 2 == 2 > 3 }

However, replacing '>' with '<' returns an error (with error code 1):

        { print 1 2 == 2 < 3 }
        gawk: cmd. line:1: { print 1 2 == 2 < 3 }
        gawk: cmd. line:1:                  ^ syntax error

This happens with the version `GNU Awk 4.2.1, API: 2.0 (GNU MPFR 4.0.1, GNU MP 
6.1.2)`.

The script doesn't mean anything but the goal is to know what input are
accepted since I'm trying to create a AWK interpreter and found this
inconsistency while creating the parser.

Cheers,

-- 
Stephane Campinas

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]