You are viewing dmalcolm

 
 
30 September 2011 @ 02:15 pm
LWN recently posted an interesting article on writing GCC plugins, showing how to add a spellchecking pass to the compiler.

I thought this was a neat example, so I had a go at porting it from C to use my Python plugin for GCC

The result is about 35 lines of Python code (including comments), which you can see here

I hope the code is easy to read.  One other thing this demonstrates is how by extending the compiler in Python you have access to the whole of the Python packaging ecosystem - I was able to use the "enchant" spellchecking library (originally from the AbiWord project) with about 4 lines of code.
Tags: , ,
 
 
Post a comment in response:

No HTML allowed in subject

  
 
   
 

Notice! This user has turned on the option that logs your IP address when posting.