On Fri, Mar 6, 2009 at 5:47 AM, Ville M. Vainio <[email protected]> wrote:
> > On Thu, Mar 5, 2009 at 10:49 PM, thyrsus <[email protected]> wrote: > > > Is there someone not preoccupied with bug fixing who could give me a > > conceptual guide to class baseScannerClass in leoImport.py? I've got > > a bunch of ruby code to study, and I've got python envy - I'd like all > > the ruby classes and methods in their own nodes. All several thousand > > of them. > > Perhaps you could try giving the file to pygments (have it do the > tokenization), and then just parse the token stream. Possible, but there will be complications. For a one-off project, using startsHelper will be far easier. For example, Leo's beautifier command uses Python's own tokenizer, but the code must jump through hoops to preserve whitespace. In any case, the non-scanner parts of baseScannerClass, especially the code generators (the parts that "generate" nodes), will still be needed. Edward --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "leo-editor" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en -~----------~----~----~----~------~----~------~--~---
