On Wednesday 23 November 2005 23:51, Angus Leeming wrote:
> Asger Ottar Alstrup wrote:
> > John C. McCabe-Dansted wrote:
> >> I am working on a grammar checker for LyX. It outputs the errors to
> >> LaTeX .log format so it can integrate itself into LyX without need
> >> for any modification to existing LyX binary.
>
> Hi, John. This is really nice and at 722 lines long (including copious
> commentary) is really small. That's great because it means that it'll
> be maintainable in the future.

Thanks, though I expect it will be 1500+ lines of code and 50+ KB of data 
files for the English language when feature complete.

> I'd second Asger's suggestion that you investigate chktex. Most of the
> hooks are there already to able you to get on-screen notification of
> grammar problems, essentially for free.

Yes, at this point I think I should write it as chktex v2, and ignore anything 
LyX specific for the meanwhile, particularly while there is feature freeze.

Ultimately I would want to add hooks to LyX to support new features like "This 
is not a grammatical error, because...", but there is no point in adding 
these hooks until my code is robust.

The final version will be at least 50KB uncompressed including data files for 
the English language. If I don't try to integrate the core into LyX I won't 
have to worry about keeping it small enough to be a patch.

> Interested?

Yes.

> Asger's suggestion that you rewrite this thing in C++ is also worthy
> of serious consideration. We know C++. We don't know Perl. That means

If I was aiming it as a replacement for chktex, I may want to write it as ANSI 
C (as with chktex), but then it probably wouldn't be the LyX programmers I 
would be asking to maintain the code.

> that you'll get little or no help in maintaining your creation ATM,
> for purely practical reasons. Given that the heart of your beast is a
> bunch of regexes, you should have no problems moving to C++.
> (Boost.Regex which we use already provides a drop in replacement for
> your Perl regexes.)

I had a look at Boost.Regex. I am not sure if I need or want regexes in the 
final release anyway.

-- 
John C. McCabe-Dansted
Masters Student

Reply via email to