[Top][All Lists]

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

Re: Bison 1.28b

From: Axel Kittenberger
Subject: Re: Bison 1.28b
Date: Sun, 5 Aug 2001 16:41:31 +0200

> If one should follow the practises of other computer languages, it is only
> reasonable to have another extension than .y if the input language is so
> different as to be wholly incompatible with the original Yacc language: For
> example, on my C/C++ compiler, one can choose the output language (object
> code for various CPU's), and choose different language features (like
> strict/non-strict ANSI, etc), but this is not combined with different file
> extensions of the input files. I doubt that GCC is doing that.

However in case of C/C++ the output file names will not be dependant of the 
contents of the file, in example they will always produce .o files, no matter 
if it's compiled for intel x86 or the powerpc or with strict or non-strict 
ANSI. However in the case of bison that's not true, in example a parser 
definition file with C++ actions should produce a .cc file, while a parser 
with C actions only should yield a .c, or for every language the language 
specific extension. I think to be able to write general makefiles, makes 
hould be able to determine the output filenames from bison without having to 
look inside the .y file. Bison .y files are in a view special since they do 
contain two languages, first are the bison definitions. And second are the 
actions, headers and the trailer embedded in the definitions consiting of a 
different language.

reply via email to

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