display matching rule in petit parser

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

display matching rule in petit parser

NorbertHartl
In the petit ui I can easily see the output of a successful parse as result node tree. Is there a way to show the rules that matched a particular node along with the result?

thanks,

Norbert
_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: display matching rule in petit parser

Lukas Renggli
In the dynamic tab there is a debugger, that shows all tried rules
with normal font and the matched rules in bold.

This feature is described in Section 3.5 in
<http://scg.unibe.ch/archive/papers/Reng10cDynamicGrammars.pdf>.

Lukas

On 20 June 2011 11:45, Norbert Hartl <[hidden email]> wrote:

> In the petit ui I can easily see the output of a successful parse as result node tree. Is there a way to show the rules that matched a particular node along with the result?
>
> thanks,
>
> Norbert
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>



--
Lukas Renggli
www.lukas-renggli.ch
_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: display matching rule in petit parser

NorbertHartl
In the debugger you see every matching attempt. I have a huge set of rules so it is nearly impossible to deduct that information from it. I want to know only the match that actually succeed in context of the match of the whole parse.

Norbert

Am 20.06.2011 um 13:14 schrieb Lukas Renggli:

> In the dynamic tab there is a debugger, that shows all tried rules
> with normal font and the matched rules in bold.
>
> This feature is described in Section 3.5 in
> <http://scg.unibe.ch/archive/papers/Reng10cDynamicGrammars.pdf>.
>
> Lukas
>
> On 20 June 2011 11:45, Norbert Hartl <[hidden email]> wrote:
>> In the petit ui I can easily see the output of a successful parse as result node tree. Is there a way to show the rules that matched a particular node along with the result?
>>
>> thanks,
>>
>> Norbert
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>
>
>
>
> --
> Lukas Renggli
> www.lukas-renggli.ch
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: display matching rule in petit parser

Lukas Renggli
Sure, but should be easy to filter only for matched rules. It must be
somewhere in the huge Glamour script :-)

Lukas

On 20 June 2011 13:19, Norbert Hartl <[hidden email]> wrote:

> In the debugger you see every matching attempt. I have a huge set of rules so it is nearly impossible to deduct that information from it. I want to know only the match that actually succeed in context of the match of the whole parse.
>
> Norbert
>
> Am 20.06.2011 um 13:14 schrieb Lukas Renggli:
>
>> In the dynamic tab there is a debugger, that shows all tried rules
>> with normal font and the matched rules in bold.
>>
>> This feature is described in Section 3.5 in
>> <http://scg.unibe.ch/archive/papers/Reng10cDynamicGrammars.pdf>.
>>
>> Lukas
>>
>> On 20 June 2011 11:45, Norbert Hartl <[hidden email]> wrote:
>>> In the petit ui I can easily see the output of a successful parse as result node tree. Is there a way to show the rules that matched a particular node along with the result?
>>>
>>> thanks,
>>>
>>> Norbert
>>> _______________________________________________
>>> Moose-dev mailing list
>>> [hidden email]
>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>
>>
>>
>>
>> --
>> Lukas Renggli
>> www.lukas-renggli.ch
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>



--
Lukas Renggli
www.lukas-renggli.ch
_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: display matching rule in petit parser

NorbertHartl

Am 20.06.2011 um 13:34 schrieb Lukas Renggli:

> Sure, but should be easy to filter only for matched rules. It must be
> somewhere in the huge Glamour script :-)
>
Right. I don't know what you mean by huge but I tweaked it so I get a better overview about what actually it parses. Attached is the change I did in PPBrowser.

Norbert



> Lukas
>
> On 20 June 2011 13:19, Norbert Hartl <[hidden email]> wrote:
>> In the debugger you see every matching attempt. I have a huge set of rules so it is nearly impossible to deduct that information from it. I want to know only the match that actually succeed in context of the match of the whole parse.
>>
>> Norbert
>>
>> Am 20.06.2011 um 13:14 schrieb Lukas Renggli:
>>
>>> In the dynamic tab there is a debugger, that shows all tried rules
>>> with normal font and the matched rules in bold.
>>>
>>> This feature is described in Section 3.5 in
>>> <http://scg.unibe.ch/archive/papers/Reng10cDynamicGrammars.pdf>.
>>>
>>> Lukas
>>>
>>> On 20 June 2011 11:45, Norbert Hartl <[hidden email]> wrote:
>>>> In the petit ui I can easily see the output of a successful parse as result node tree. Is there a way to show the rules that matched a particular node along with the result?
>>>>
>>>> thanks,
>>>>
>>>> Norbert
>>>> _______________________________________________
>>>> Moose-dev mailing list
>>>> [hidden email]
>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>>
>>>
>>>
>>>
>>> --
>>> Lukas Renggli
>>> www.lukas-renggli.ch
>>> _______________________________________________
>>> Moose-dev mailing list
>>> [hidden email]
>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>
>
>
>
> --
> Lukas Renggli
> www.lukas-renggli.ch
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev

petit-ui-debugger-no-failures.1.cs (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: display matching rule in petit parser

Lukas Renggli
It is definitely huge, anything that has more than 5 lines is huge.
However, I haven't looked at the code for more than a year, so I might
be wrong.

Not sure if the change is generally useful. I mostly used the debugger
to figure out why a rule didn't match, and then you need to see all
productions that were tried. Maybe it is worth to add it to another
tab?

Lukas

On 20 June 2011 15:42, Norbert Hartl <[hidden email]> wrote:

>
> Am 20.06.2011 um 13:34 schrieb Lukas Renggli:
>
>> Sure, but should be easy to filter only for matched rules. It must be
>> somewhere in the huge Glamour script :-)
>>
> Right. I don't know what you mean by huge but I tweaked it so I get a better overview about what actually it parses. Attached is the change I did in PPBrowser.
>
> Norbert
>
>
>
>> Lukas
>>
>> On 20 June 2011 13:19, Norbert Hartl <[hidden email]> wrote:
>>> In the debugger you see every matching attempt. I have a huge set of rules so it is nearly impossible to deduct that information from it. I want to know only the match that actually succeed in context of the match of the whole parse.
>>>
>>> Norbert
>>>
>>> Am 20.06.2011 um 13:14 schrieb Lukas Renggli:
>>>
>>>> In the dynamic tab there is a debugger, that shows all tried rules
>>>> with normal font and the matched rules in bold.
>>>>
>>>> This feature is described in Section 3.5 in
>>>> <http://scg.unibe.ch/archive/papers/Reng10cDynamicGrammars.pdf>.
>>>>
>>>> Lukas
>>>>
>>>> On 20 June 2011 11:45, Norbert Hartl <[hidden email]> wrote:
>>>>> In the petit ui I can easily see the output of a successful parse as result node tree. Is there a way to show the rules that matched a particular node along with the result?
>>>>>
>>>>> thanks,
>>>>>
>>>>> Norbert
>>>>> _______________________________________________
>>>>> Moose-dev mailing list
>>>>> [hidden email]
>>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Lukas Renggli
>>>> www.lukas-renggli.ch
>>>> _______________________________________________
>>>> Moose-dev mailing list
>>>> [hidden email]
>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>
>>>
>>> _______________________________________________
>>> Moose-dev mailing list
>>> [hidden email]
>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>
>>
>>
>>
>> --
>> Lukas Renggli
>> www.lukas-renggli.ch
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
>



--
Lukas Renggli
www.lukas-renggli.ch
_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: display matching rule in petit parser

NorbertHartl

Am 20.06.2011 um 16:01 schrieb Lukas Renggli:

> It is definitely huge, anything that has more than 5 lines is huge.
> However, I haven't looked at the code for more than a year, so I might
> be wrong.
>
> Not sure if the change is generally useful. I mostly used the debugger
> to figure out why a rule didn't match, and then you need to see all
> productions that were tried. Maybe it is worth to add it to another
> tab?
>
Maybe if I rework it a bit. At the moment it doesn't display every rule from the starting rule to the current rule. It just removes the failures. For me as there are all the time several thousands of rules being checked it makes life easier. I maybe come up with something useful and then I will drop you a note.

Norbert
 

> Lukas
>
> On 20 June 2011 15:42, Norbert Hartl <[hidden email]> wrote:
>>
>> Am 20.06.2011 um 13:34 schrieb Lukas Renggli:
>>
>>> Sure, but should be easy to filter only for matched rules. It must be
>>> somewhere in the huge Glamour script :-)
>>>
>> Right. I don't know what you mean by huge but I tweaked it so I get a better overview about what actually it parses. Attached is the change I did in PPBrowser.
>>
>> Norbert
>>
>>
>>
>>> Lukas
>>>
>>> On 20 June 2011 13:19, Norbert Hartl <[hidden email]> wrote:
>>>> In the debugger you see every matching attempt. I have a huge set of rules so it is nearly impossible to deduct that information from it. I want to know only the match that actually succeed in context of the match of the whole parse.
>>>>
>>>> Norbert
>>>>
>>>> Am 20.06.2011 um 13:14 schrieb Lukas Renggli:
>>>>
>>>>> In the dynamic tab there is a debugger, that shows all tried rules
>>>>> with normal font and the matched rules in bold.
>>>>>
>>>>> This feature is described in Section 3.5 in
>>>>> <http://scg.unibe.ch/archive/papers/Reng10cDynamicGrammars.pdf>.
>>>>>
>>>>> Lukas
>>>>>
>>>>> On 20 June 2011 11:45, Norbert Hartl <[hidden email]> wrote:
>>>>>> In the petit ui I can easily see the output of a successful parse as result node tree. Is there a way to show the rules that matched a particular node along with the result?
>>>>>>
>>>>>> thanks,
>>>>>>
>>>>>> Norbert
>>>>>> _______________________________________________
>>>>>> Moose-dev mailing list
>>>>>> [hidden email]
>>>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Lukas Renggli
>>>>> www.lukas-renggli.ch
>>>>> _______________________________________________
>>>>> Moose-dev mailing list
>>>>> [hidden email]
>>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>>
>>>>
>>>> _______________________________________________
>>>> Moose-dev mailing list
>>>> [hidden email]
>>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>>>
>>>
>>>
>>>
>>> --
>>> Lukas Renggli
>>> www.lukas-renggli.ch
>>> _______________________________________________
>>> Moose-dev mailing list
>>> [hidden email]
>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>
>>
>
>
>
> --
> Lukas Renggli
> www.lukas-renggli.ch
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev