On Tuesday, May 30, 2017 at 10:03:20 AM UTC-5, Edward K. Ream wrote:
Rev aaf8435 completes work on [the lua importer] for now. All .lua files
> in the torch/nn directory tree import correctly. Please report any problems.
>
Actually, all files pass the perfect import test, which is not the same
thing as importing all lines in the expected nodes.
This distinction shows that the new (line-by-line) import framework is much
more robust than the old framework, which did real (if very ugly) parsing
character by character.
The lua importers should be improved as follows:
1. Constructs, including function definitions, that appear on one line
presently confuse the importer.
if scalar then size=1 end
2. The 'local' keyword can precede 'function'.
3. 'local' and 'function' need not be the first thing on a line:
self.updateOutput = function(self, input)
self.output:set(input)
return input
end
A character-by-character rescan of lines will be needed to ensure that
embedded 'local', 'function' or 'end' is not contained in a string or
comment.
4. Tail comments like this are not handled properly:
[[
whatever
]]
At present, the post-pass moves tail lines to the next node. Given the
complexities of scanning, they probably should be moved during stage 1,
which may require over-ridding i.gen_lines.
I'll probably attend to these today, while everything is fresh in my mind.
Edward
--
You received this message because you are subscribed to the Google Groups
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.