automake
[Top][All Lists]
Advanced

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

Re: 52-yacc-am.patch


From: Tom Tromey
Subject: Re: 52-yacc-am.patch
Date: 07 Apr 2001 16:51:46 -0600

>>>>> "Akim" == Akim Demaille <address@hidden> writes:

Akim>   * automake.in (&condition_negate): New.
Akim>   (&variable_conditions_permutations): Use it.
Akim>   (&read_am_file, &file_contents): Use it on `else' clauses to
Akim>   support `if FALSE'.
Akim>   (&output_yacc_build_rule): Output this...
Akim>   * yacc.am: New file.

This is generally ok, but I have some questions.

Akim> +sub condition_negate ($)
Akim> +{
Akim> +    my ($cond) = @_;
Akim> +
Akim> +    $cond =~ s/TRUE$/TRUEO/;
Akim> +    $cond =~ s/FALSE$/TRUE/;
Akim> +    $cond =~ s/TRUEO$/FALSE/;
Akim> +
Akim> +    return $cond;
Akim> +}

Doesn't this rely on the user not using conditions like `TRUE0'?  What
if we instead use a temporary value that the user can't possibly
specify?

Akim> -    my $c_suffix = $yacc_suffix;
Akim> -    $c_suffix =~ tr/y/c/;
Akim> -    push (@suffixes, $yacc_suffix, $c_suffix);

Deleting this push seems wrong.
How else does this stuff end up on suffixes?

Tom



reply via email to

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