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.

Ruby has blocks delimited with '{' and '}', but it also has a bunch of
control structures that go

begin
    lots of other stuff
end

if condition
    and who knows what
end

def function_name
   stuff
end

while condition
   yup, stuff
end

# but we can't just look for an end for every while, since

brief stuff while condition

# ...means that if "while" occurs while we're building an expression,
the
# implicit block precedes the while, and there is no "end"

# same for "if":
short stuff if condition

class class_name
   def method_name
      stuff
  end
end

The other main challenge is dealing with strings, which come in the
multiform varieties similar to perl:

        "this is a string expression\n"
        "concat#{foobar}"
        'concat#{foobar}'
        %q!I said, "You said, 'She said it.'"!
        %!I said, "You said, 'She said it.'"!
        %Q('This is it.'\n)

        `date`
        %x{ date }

       print <<END_OF_STRING
this is an example string
class foo
   fun bar
     no, this isn't a class, it's still the string
  end
end

# yup, still a string
END_OF_STRING
# *that* was the end of the string

regexes are also perlish.  Comments should be relatively easy:

        # this is a comment line

=begin
everything between a line beginning with `=begin' and
that ends with `=end' at the beginning of the line will be skipped by
the interpreter.
=end

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to