[Omake] Should we add some sort of "syntax" parser directive?
Jason Hickey
jyh at cs.caltech.edu
Tue Oct 30 17:25:43 PDT 2007
On Oct 30, 2007, at 2:19 PM, Aleksey Nogin wrote:
>
The .SYNTAX seems like a reasonable choice, or maybe .LANGUAGE instead.
Note that in the current implementation, the syntax doesn't change, it
is just how it is interpreted. This means 1) parsing will succeed as
long as you use OMakefile syntax, but 2) errors can occur during
semantic analysis.
A related property is that the language is scoped.
CFILES = $(addsuffix .c, $(FILES))
section
.LANGUAGE: program
OFILES = addsuffix(.o, FILES)
# Back to old syntax
Normally, of course, a file would use a single syntax.
> If we settle on this approach, it would probably be a good idea to
> add it to 0.9.8.x now to ensure that an attempt to use program
> syntax in a any future pre-syntax version of OMake would result in a
> meaningful error message.
I've been thinking it might be better to include syntax on the trunk
also. It seems like it is in the general topic of language
improvements, like keyword arguments. Another very nice thing about
syntax is that whitespace is handled at parse time. Say goodbye to
character-by-character whitespace analysis. There is minor
performance improvement, but large improvement in designer satisfaction.
Jason
--
Jason Hickey http://www.cs.caltech.edu/~jyh
Caltech Computer Science Tel: 626-395-6568 FAX: 626-792-4257
More information about the OMake-Devel
mailing list