POV-Ray : Newsgroups : povray.general : New SDL: support for lexical scanner generators : New SDL: support for lexical scanner generators Server Time
31 Jul 2024 06:21:37 EDT (-0400)
  New SDL: support for lexical scanner generators  
From: Wolf
Date: 4 Oct 2007 11:35:00
Message: <web.4705077494df8c12edd244720@news.povray.org>
Hi,


Please provide support for lexical scanner generators like ANTLR
(http://www.antlr.org) or Flex (http://flex.sourceforge.net) by providing a
grammar definition for them!

Why is that?

* Example one - PovClipse: PovClipse (http://povclipse.sourceforge.net) is
an Eclipse plugin for SDL file editing. If you use Eclipse for Java
development you probably love the feature that Eclipse marks all your Java
syntax errors and misspellings using a red wiggle mark. The very same
should be true in terms of PovClipse: if the SDL code you write is not


impossible to write a lexer for the 3.6 SDL using a lexer generator due to
the fact that the 3.6 SDL is a grown language. Trust me, I tried really
hard. The only thing I could teach PovClipse is to underline everything
which is not a keyword, a declared variable or macro name.

* Example two: If you want to check whether the SDL code generated by your
tool is valid or not you have to be able to parse it with something else
than POV-Ray.


It would be a real benefit for POV-Ray itself if a complete grammar
definition is used for the SDL parsing. The parsing of the SDL would be a
clean, fast and traceable process, the parser can easly switch between



Bottom line: if the new SDL is a rewrite please consider providing a grammar
definition for a lexical scanner generator like ANTLR or Flex. I personally
would prefer ANTLR 3.0.
If you do a little google research you will find that many peoply have tried

failed due to the fact that there is no programatically useable SDL grammar
definition.

My 2 cents.

- Wolf


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.