Re: Looking for a fast C++ parser

Martin Ward <Martin.Ward@durham.ac.uk>
16 Aug 2005 11:13:40 -0400

          From comp.compilers

Related articles
Designing a language for dataflow/parallelism peteg42@gmail.com (Peter Gammie) (2005-06-26)
Looking for a fast C++ parser nscc@c7.org (2005-08-07)
Re: Looking for a fast C++ parser snicol@apk.net (Scott Nicol) (2005-08-10)
Re: Looking for a fast C++ parser vidar.hokstad@gmail.com (Vidar Hokstad) (2005-08-10)
Re: Looking for a fast C++ parser firefly@diku.dk (Peter \Firefly\Lund) (2005-08-13)
Re: Looking for a fast C++ parser snicol@apk.net (Scott Nicol) (2005-08-16)
Re: Looking for a fast C++ parser Martin.Ward@durham.ac.uk (Martin Ward) (2005-08-16)
Re: Looking for a fast C++ parser firefly@diku.dk (Peter \Firefly\Lund) (2005-08-16)
Re: Looking for a fast C++ parser firefly@diku.dk (Peter \Firefly\Lund) (2005-08-16)
Re: Looking for a fast C++ parser snicol@apk.net (Scott Nicol) (2005-08-16)
Re: Looking for a fast C++ parser firefly@diku.dk (Peter \Firefly\Lund) (2005-08-16)
| List of all articles for this month |

From: Martin Ward <Martin.Ward@durham.ac.uk>
Newsgroups: comp.compilers
Date: 16 Aug 2005 11:13:40 -0400
Organization: Compilers Central
References: 05-06-133 05-08-035 05-08-051
Keywords: C++, parse, tools
Posted-Date: 16 Aug 2005 11:13:40 EDT

On Saturday 13 Aug 2005 05:25, you wrote:
> The current fashion in syntax coloring seems to be to use a generic editor
> that attaches font and colour attributes to the text, combined with a
> general regexp engine + a file of regexps per language that is used to
> generate the colour attributes after loading the file into the editor
> widget. This is both slower and more memory-hungry than it really needs to
> be.


A file of regexps is probably a lot easier to maintain than a handcoded state
machine that generates the colouring on the fly. Maintainability is more
important than efficiency for an editor (as long as it is still fast enough
to be usable).


--
Martin


Martin.Ward@durham.ac.uk http://www.cse.dmu.ac.uk/~mward/ Erdos number: 4
G.K.Chesterton web site: http://www.cse.dmu.ac.uk/~mward/gkc/


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.