Hackaton mars 2013 Bilan

3 views
Skip to first unread message

Lionel Auroux

unread,
Mar 25, 2013, 11:24:57 AM3/25/13
to rathaxes-devel
Time to write what is done this week-end for pyrser:

pascal + lionel : merging/cleaning/renaming of the two branche
pascal : bootstraping a setup.py for packaging and sphinx doc compilation

lionel : finishing the class grammar with correct rule/hook/handling.
Here a working example for you...so you could taste pyrser :P

----
@meta.directive(pyrser.parsing.Parser, "ignore")
        class Ignore(parsing.DirectiveWrapper):
            def begin(self, parser, convention: str):
                if convention == "null":
                    parser.push_ignore(parsing.Parser.ignore_null)
                return True
            def end(self, parser, convention: str):
                parser.pop_ignore()
                return True
        class   WordList(Grammar):
            grammar = """
                wordlist ::= [word:w #add_to(wordlist, w)]+
                ;

                word ::= @ignore("null") ['a'..'z'|'A'..'Z']+
                ;
            """
            entry = "wordlist"

        @meta.hook(parsing.Parser)
        def add_to(self, mylist, word):
            if not hasattr(mylist, 'lst'):
                mylist.lst = [word.value]
            else:
                mylist.lst.append(word.value)
            return True
        res = WordList().parse("ab cd ef gh")
        print("%r" % res.lst)
----

--
Cordialement,
Lionel Auroux

Louis Opter

unread,
Mar 28, 2013, 2:37:45 AM3/28/13
to rathaxe...@googlegroups.com, lionel...@gmail.com
On Mon, 25 Mar 2013 16:24:57 +0100 Lionel Auroux
<lionel...@gmail.com> wrote:

> Time to write what is done this week-end for pyrser:
>
> pascal + lionel : merging/cleaning/renaming of the two branche
> pascal : bootstraping a setup.py for packaging and sphinx doc
> compilation
>
> lionel : finishing the class grammar with correct rule/hook/handling.
> Here a working example for you...so you could taste pyrser :P

And on the Rathaxes side, most of the work was around the type system
with:

- the ref/scalar integration;
- raise my problems about "abstract" types (I have to follow-up in the
other thread).

The ref/scalar integration is not yet in Google code, it's still
in a patch queue shared by David and I. During this week-end we ended
up working both on e1000 and I still need to port stuff I wrote to the
the ref/scalar notation. *Hopefully*, I'll do that next week.

I also went over all our XXX in the e1000 code, and without ref/scalar
here are the (approximate) results:

- CNorm issues (#54): 4
- generation issues: 13
- error handling: 2
- type ref/scalar issue: 9
- abstract type issues: 3
- misc (including design notes for myself): 5
- method call issue (#51): 6

I'll do another pass once all the ref/scalar stuff is on
Google code.

Next steps:

- more refactoring (a lot of code need to be moved in the right
"sub-systems");
- methods calls (#51);
- talk about the CNorm unstrict/std problems;
- think about the unsolved "hw_ctx" (the field inject via a pointcut in
the Ethernet::Device type) problematic;
(- improve the Buildbot to include Pyrser and automated tests on e1000).

We should also start to set some objectives to include people on the
project: Skrat, Newton and Trashboul are interested, I also talked a
little bit to Colona but never followed-up.

Questions?

--
Louis Opter

David Pineau

unread,
Mar 28, 2013, 6:01:22 AM3/28/13
to rathaxe...@googlegroups.com, lionel...@gmail.com
2013/3/28 Louis Opter <kale...@kalessin.fr>:
Yep:

For the issues mentionned:
- ref/scalar issues: Does it mean that those are issued that are to
be fixed soon ?
- error handling: What are those ? Improvements that would have been
possible if we had coded the error handling mecanism integrated within
the chunks ?
- generation issues: As far as I remember, there are multiple kind of
generations issues, did I miss some of them ? :
-> Not using a block around a placeholder makes the said
placeholder unable to be resolved (the placeholders stays a _X instead
of being resolved)
-> Sometimes, changing a variable name makes a whole statement
disappear (not generated when it should be...), probably due to some
kind of identifier conflict within the resolver.

I've been thinking about the cnorm unstrict issue, an we may have to
discusss a bit. I absolutely want a new solution to this before we
start thinking about the python version.


As for the method call issue, I want to take care of it, but I don't
know if i'll have time to fix it before the start of the rewrite of
the compiler.

--
David Pineau,
Developer R&D at Scality

Louis Opter

unread,
Apr 1, 2013, 4:39:36 AM4/1/13
to rathaxe...@googlegroups.com
On Mar 27, 2013, at 23:37, Louis Opter <kale...@kalessin.fr> wrote:

> The ref/scalar integration is not yet in Google code, it's still
> in a patch queue shared by David and I. During this week-end we ended
> up working both on e1000 and I still need to port stuff I wrote to the
> the ref/scalar notation. *Hopefully*, I'll do that next week.

And, I found the time to finish and push that during the week-end.

--
Louis Opter

David Pineau

unread,
Apr 1, 2013, 12:09:48 PM4/1/13
to rathaxe...@googlegroups.com
Nice ! I'll take a look at it as soon as i have some spare time :)


2013/4/1 Louis Opter <kale...@kalessin.fr>

--
Louis Opter

--
--
ML Rathaxes
www.rathaxes.org

---
You received this message because you are subscribed to the Google Groups "Rathaxes Development List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rathaxes-deve...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply all
Reply to author
Forward
0 new messages