Re: SLIF style guide / best practices?

2015-11-21 Thread Jeffrey Kegler
I don't think I'll ever write a style guide -- I prefer to see what others
come up with.

My order of productions is (I think) similar to the traditional BNF, that
you still see in standards.  This tries to be top down, but also to keep
similar things together.  Unfortunately the two goals are not always the
same thing, so finding things can be difficult.

My suspicion is that current style is dictated by what's easier to write,
not what is easier to read.

Alphanumeric order is very non-standard, and would be harder to write, but
would have the decided advantage that you could actually find things in a
predictable, systematic way.

I don't think anybody has ever written anything on BNF style.  Now that you
can actually *do* something with your BNF, it may be time for a look at
style issues.


On Sat, Nov 21, 2015 at 11:06 PM, Ruslan Shvedov 
wrote:

> On Sun, Nov 22, 2015 at 8:39 AM, Paul Bennett 
> wrote:
>
>> Is there such a document?
>>
> My specific scenario...
>>
>> I have a grammar broken up into chunks (corresponding more or less
>> with similarity of meaning in the official SGML spec) at
>>
>> https://github.com/PWBENNETT/MarpaX-SGML/tree/master/lib/MarpaX/SGML/Grammar
>>
>> My specific question...
>>
>> Within each file, is it polite to other (human) readers to sort the
>> productions alphanumerically, or to cluster them so that things that
>> refer to each other are near each other, or something else?
>>
> ‘to cluster them so that things that refer to each other are near each
> other’ and even top-down seems to be more or less the current common
> practice according to:
>
>
> https://github.com/jeffreykegler/Marpa--R2/blob/master/cpan/lib/Marpa/R2/meta/metag.bnf
>
>
> https://github.com/jddurand/MarpaX-Languages-C-AST/blob/master/lib/MarpaX/Languages/C/AST/Grammar/ISO_ANSI_C_2011.pm#L183
>
>
> https://github.com/ronsavage/MarpaX-Languages-Lua-Parser/blob/master/lib/MarpaX/Languages/Lua/Parser.pm#L762
>
>
> https://github.com/jddurand/MarpaX-Languages-SQL-AST/blob/master/lib/MarpaX/Languages/SQL/AST/Grammar/ISO_IEC_9075_2_2003.pm#L132
>
>
>>
>>
>> Thanks,
>>
>>
>> --
>> Paul
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "marpa parser" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to marpa-parser+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "marpa parser" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to marpa-parser+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"marpa parser" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to marpa-parser+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: SLIF style guide / best practices?

2015-11-21 Thread Ruslan Shvedov
On Sun, Nov 22, 2015 at 8:39 AM, Paul Bennett 
wrote:

> Is there such a document?
>
My specific scenario...
>
> I have a grammar broken up into chunks (corresponding more or less
> with similarity of meaning in the official SGML spec) at
>
> https://github.com/PWBENNETT/MarpaX-SGML/tree/master/lib/MarpaX/SGML/Grammar
>
> My specific question...
>
> Within each file, is it polite to other (human) readers to sort the
> productions alphanumerically, or to cluster them so that things that
> refer to each other are near each other, or something else?
>
‘to cluster them so that things that refer to each other are near each
other’ and even top-down seems to be more or less the current common
practice according to:

https://github.com/jeffreykegler/Marpa--R2/blob/master/cpan/lib/Marpa/R2/meta/metag.bnf

https://github.com/jddurand/MarpaX-Languages-C-AST/blob/master/lib/MarpaX/Languages/C/AST/Grammar/ISO_ANSI_C_2011.pm#L183

https://github.com/ronsavage/MarpaX-Languages-Lua-Parser/blob/master/lib/MarpaX/Languages/Lua/Parser.pm#L762

https://github.com/jddurand/MarpaX-Languages-SQL-AST/blob/master/lib/MarpaX/Languages/SQL/AST/Grammar/ISO_IEC_9075_2_2003.pm#L132


>
>
> Thanks,
>
>
> --
> Paul
>
> --
> You received this message because you are subscribed to the Google Groups
> "marpa parser" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to marpa-parser+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"marpa parser" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to marpa-parser+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


SLIF style guide / best practices?

2015-11-21 Thread Paul Bennett
Is there such a document?

My specific scenario...

I have a grammar broken up into chunks (corresponding more or less
with similarity of meaning in the official SGML spec) at
https://github.com/PWBENNETT/MarpaX-SGML/tree/master/lib/MarpaX/SGML/Grammar

My specific question...

Within each file, is it polite to other (human) readers to sort the
productions alphanumerically, or to cluster them so that things that
refer to each other are near each other, or something else?


Thanks,


--
Paul

-- 
You received this message because you are subscribed to the Google Groups 
"marpa parser" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to marpa-parser+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Emacs marpa-mode

2015-11-21 Thread Jeffrey Kegler
No need to apologize.  Much of the traffic has moved over to IRC, so this
group has gone for a while with basically just announcements and no
discussions.

But your emails are on-topic, and discussions have always been within the
charter of this group.

I am against generating traffic just for the sake of ramping up traffic
numbers.  But nobody should be reluctant or hesitant to make any on-topic
comment or post here.

On Sat, Nov 21, 2015 at 12:52 PM, Paul Bennett 
wrote:

> On Sat, Nov 21, 2015 at 3:42 PM, Paul Bennett 
> wrote:
>
> > https://github.com/PWBENNETT/MarpaX-SGML/blob/master/Marpa.tmLanguage
>
> And here it is in action:
>
>
> https://drive.google.com/file/d/0B21ee_I1WzbwNFlVdXE5T2dMQnM/view?usp=sharing
>
> Apologies for the many emails. I'm growing too accustomed to modern
> social media, where you can edit and comment and edit your comments,
> and so on.
>
>
> --
> Paul
>
> --
> You received this message because you are subscribed to the Google Groups
> "marpa parser" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to marpa-parser+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"marpa parser" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to marpa-parser+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Emacs marpa-mode

2015-11-21 Thread Paul Bennett
On Sat, Nov 21, 2015 at 3:42 PM, Paul Bennett  wrote:

> https://github.com/PWBENNETT/MarpaX-SGML/blob/master/Marpa.tmLanguage

And here it is in action:

https://drive.google.com/file/d/0B21ee_I1WzbwNFlVdXE5T2dMQnM/view?usp=sharing

Apologies for the many emails. I'm growing too accustomed to modern
social media, where you can edit and comment and edit your comments,
and so on.


--
Paul

-- 
You received this message because you are subscribed to the Google Groups 
"marpa parser" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to marpa-parser+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Emacs marpa-mode

2015-11-21 Thread Paul Bennett
On Sat, Nov 21, 2015 at 3:35 PM, Paul Bennett  wrote:
>
> Ooh, I don't support comments with that. Working on it.
>

Here, and in its semi-proper location instead of as a gist ...

https://github.com/PWBENNETT/MarpaX-SGML/blob/master/Marpa.tmLanguage


--
Paul

-- 
You received this message because you are subscribed to the Google Groups 
"marpa parser" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to marpa-parser+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Emacs marpa-mode

2015-11-21 Thread Paul Bennett
On Sat, Nov 21, 2015 at 3:17 PM, Paul Bennett  wrote:

> https://gist.github.com/PWBENNETT/0e860d907fc59554f1ce

Ooh, I don't support comments with that. Working on it.


--
Paul

-- 
You received this message because you are subscribed to the Google Groups 
"marpa parser" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to marpa-parser+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Emacs marpa-mode

2015-11-21 Thread Paul Bennett
On Sat, Nov 21, 2015 at 2:09 PM, Paul Bennett  wrote:

> I'm looking at implementing the exact same thing right now.

https://gist.github.com/PWBENNETT/0e860d907fc59554f1ce

--
Paul

-- 
You received this message because you are subscribed to the Google Groups 
"marpa parser" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to marpa-parser+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Emacs marpa-mode

2015-11-21 Thread Paul Bennett
On Fri, Nov 20, 2015 at 4:33 PM, Jeffrey Kegler
 wrote:

> Kind of nice the way that the colors distinguish G1 and L0 rules.

I haven't played with my TextMate / SublimeText highligher for Marpa
in a long time. I agree it's a nice touch. I'm looking at implementing
the exact same thing right now. Please stand by, as .tmLanguage files
are not entirely for the uninitiated (and it's been a while since I
was initiated).


--
Paul

-- 
You received this message because you are subscribed to the Google Groups 
"marpa parser" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to marpa-parser+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.