Re: [NTG-context] BNF grammar for ConTeXt (was: What happened with sectionworld?)

2009-04-30 Thread luigi scarso
R. Bastian:

 CONTEXT_SOURCE ::= PREAMBLE \starttext TEXT \stoptext | CONTEXT_SOURCE
  TEXT ::= STARTSTOPS | SETUPS | DEFINES | OTHERS [ TEXT

 luigi:

   To be general, i think
   MY_CONTEXT_SOURCE ::= MACRO* END


R. Bastian:

 I dont understand the sense of \end\starttext

sense==semantic

\end\starttext is a valid string for a hypothetical  bnf grammar of
ContTeXt
which is not valid for your bnf ;
\end\starttext\stoptext is in your bnf grammar
and has the same semantic of  \end\starttext .

The point is : a bnf for Context can be hard to define


 luigi:

think that a bnf or lpeg grammar is really useful for a sort of
 standard-ConTeXt
 or minimal-ConTeXt or light-ConTeXt
 ie a ConTeXt to use as reference


R. Bastian:

 Exactly what I need : standard, minimal and light


Exactly what can be hard to define and capture in a bnf .

wolfgang


 How could a BNF grammar help to learn ConTeXt,

a bnf can help to build a syntax checker, a highlighter etc.
Actually the only way to say that you have a valid ConTeXt string
is running context on that string .

The semantic is another story.

-- 
luigi
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] BNF grammar for ConTeXt (was: What happened with sectionworld?)

2009-04-30 Thread R. Bastian
On Thu, 30 Apr 2009 09:48:40 +0200
luigi scarso luigi.sca...@gmail.com scribit:

 R. Bastian:
 
  CONTEXT_SOURCE ::= PREAMBLE \starttext TEXT \stoptext | CONTEXT_SOURCE
   TEXT ::= STARTSTOPS | SETUPS | DEFINES | OTHERS [ TEXT
 
  luigi:
 
To be general, i think
MY_CONTEXT_SOURCE ::= MACRO* END
 
 
 R. Bastian:
 
  I dont understand the sense of \end\starttext
 
 sense==semantic
 
 \end\starttext is a valid string for a hypothetical  bnf grammar of
 ContTeXt
 which is not valid for your bnf ;
 \end\starttext\stoptext is in your bnf grammar
 and has the same semantic of  \end\starttext .
 
 The point is : a bnf for Context can be hard to define
 
 
  luigi:
 
 think that a bnf or lpeg grammar is really useful for a sort of
  standard-ConTeXt
  or minimal-ConTeXt or light-ConTeXt
  ie a ConTeXt to use as reference
 
 
 R. Bastian:
 
  Exactly what I need : standard, minimal and light
 
 
 Exactly what can be hard to define and capture in a bnf .
 
 wolfgang
 
 
  How could a BNF grammar help to learn ConTeXt,
 
 a bnf can help to build a syntax checker, a highlighter etc.
 Actually the only way to say that you have a valid ConTeXt string
 is running context on that string .
 
 The semantic is another story.

OK - but isn't it not worth to try it ?
 
 -- 
 luigi

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] BNF grammar for ConTeXt (was: What happened with sectionworld?)

2009-04-30 Thread luigi scarso
On Thu, Apr 30, 2009 at 10:16 AM, R. Bastian rbast...@free.fr wrote:

 On Thu, 30 Apr 2009 09:48:40 +0200
 luigi scarso luigi.sca...@gmail.com scribit:

  R. Bastian:
 
   CONTEXT_SOURCE ::= PREAMBLE \starttext TEXT \stoptext |
 CONTEXT_SOURCE
TEXT ::= STARTSTOPS | SETUPS | DEFINES | OTHERS [ TEXT
  
   luigi:
 
 To be general, i think
 MY_CONTEXT_SOURCE ::= MACRO* END
  
  
  R. Bastian:
 
   I dont understand the sense of \end\starttext
 
  sense==semantic
 
  \end\starttext is a valid string for a hypothetical  bnf grammar of
  ContTeXt
  which is not valid for your bnf ;
  \end\starttext\stoptext is in your bnf grammar
  and has the same semantic of  \end\starttext .
 
  The point is : a bnf for Context can be hard to define
 
 
   luigi:
 
  think that a bnf or lpeg grammar is really useful for a sort of
   standard-ConTeXt
   or minimal-ConTeXt or light-ConTeXt
   ie a ConTeXt to use as reference
  
  
  R. Bastian:
 
   Exactly what I need : standard, minimal and light
  
 
  Exactly what can be hard to define and capture in a bnf .
 
  wolfgang
 
  
   How could a BNF grammar help to learn ConTeXt,
 
  a bnf can help to build a syntax checker, a highlighter etc.
  Actually the only way to say that you have a valid ConTeXt string
  is running context on that string .
 
  The semantic is another story.

 OK - but isn't it not worth to try it ?

sure, and I encourage you to go on and possibly write something x next
eurotex.

My suggestions to start :
1) define a **simple but significative** domain ,ie this grammar is for
subset of ConTeXt language dedicated to variable-data pdf forms
2) make a bnf grammar spec
3) build a parser lex/yacc for 2)
4) make a lpeg grammar
5) user lpeg inside context for 3)

PS
it was just a coincidence , but for other reasons I have found this link
http://martinfowler.com/dslwip/

-- 
luigi
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] BNF grammar for ConTeXt (was: What happened with sectionworld?)

2009-04-30 Thread R. Bastian
On Thu, 30 Apr 2009 10:57:04 +0200
luigi scarso luigi.sca...@gmail.com scribit:

 On Thu, Apr 30, 2009 at 10:16 AM, R. Bastian rbast...@free.fr wrote:
 
  On Thu, 30 Apr 2009 09:48:40 +0200
  luigi scarso luigi.sca...@gmail.com scribit:
 
   R. Bastian:
  
CONTEXT_SOURCE ::= PREAMBLE \starttext TEXT \stoptext |
  CONTEXT_SOURCE
 TEXT ::= STARTSTOPS | SETUPS | DEFINES | OTHERS [ TEXT
   
luigi:
  
  To be general, i think
  MY_CONTEXT_SOURCE ::= MACRO* END
   
   
   R. Bastian:
  
I dont understand the sense of \end\starttext
  
   sense==semantic
  
   \end\starttext is a valid string for a hypothetical  bnf grammar of
   ContTeXt
   which is not valid for your bnf ;
   \end\starttext\stoptext is in your bnf grammar
   and has the same semantic of  \end\starttext .
  
   The point is : a bnf for Context can be hard to define
  
  
luigi:
  
   think that a bnf or lpeg grammar is really useful for a sort of
standard-ConTeXt
or minimal-ConTeXt or light-ConTeXt
ie a ConTeXt to use as reference
   
   
   R. Bastian:
  
Exactly what I need : standard, minimal and light
   
  
   Exactly what can be hard to define and capture in a bnf .
  
   wolfgang
  
   
How could a BNF grammar help to learn ConTeXt,
  
   a bnf can help to build a syntax checker, a highlighter etc.
   Actually the only way to say that you have a valid ConTeXt string
   is running context on that string .
  
   The semantic is another story.
 
  OK - but isn't it not worth to try it ?
 
 sure, and I encourage you to go on and possibly write something x next
 eurotex.
 
 My suggestions to start :
 1) define a **simple but significative** domain ,ie this grammar is for
 subset of ConTeXt language dedicated to variable-data pdf forms

yes

 2) make a bnf grammar spec

yes

 3) build a parser lex/yacc for 2)

later 

 4) make a lpeg grammar
 5) user lpeg inside context for 3)
 
 PS
 it was just a coincidence , but for other reasons I have found this link
 http://martinfowler.com/dslwip/
 
 -- 
 luigi

I think a wiki would be a better forum than this mailing-list ?


___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] BNF grammar for ConTeXt (was: What happened with sectionworld?)

2009-04-30 Thread luigi scarso


  My suggestions to start :
  1) define a **simple but significative** domain ,ie this grammar is for
  subset of ConTeXt language dedicated to variable-data pdf forms

 yes

  2) make a bnf grammar spec

 yes

  3) build a parser lex/yacc for 2)

 later

why ?  There is no difference between 2 and 3

I think a wiki would be a better forum than this mailing-list ?

hmm
this mailing-list is ok for this kind of discussions
a wiki is wiki.contextgarden.net
and you should put  your results in your personal page


-- 
luigi
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] BNF grammar for ConTeXt (was: What happened with sectionworld?)

2009-04-30 Thread R. Bastian
On Thu, 30 Apr 2009 12:12:10 +0200
luigi scarso luigi.sca...@gmail.com scribit:

 
 
   My suggestions to start :
   1) define a **simple but significative** domain ,ie this grammar is for
   subset of ConTeXt language dedicated to variable-data pdf forms
 
  yes
 
   2) make a bnf grammar spec
 
  yes
 
   3) build a parser lex/yacc for 2)
 
  later
 
 why ?  There is no difference between 2 and 3

True, but I think that the aim of such a BNF-grammar
is to help in a concise way the newbie and tell him _what_ can be
made and _when_ {\it in quel tempo}. 

(In fact, I dont like lex/yacc because it seems not a good idea to 
intervene on the generated code).


 
 I think a wiki would be a better forum than this mailing-list ?
 
 hmm
 this mailing-list is ok for this kind of discussions
 a wiki is wiki.contextgarden.net
 and you should put  your results in your personal page
 
 
 -- 
 luigi

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] BNF grammar for ConTeXt (was: What happened with sectionworld?)

2009-04-29 Thread Wolfgang Schuster


Am 29.04.2009 um 23:16 schrieb R. Bastian:


I think that a bnf or lpeg grammar is really useful for a sort of
standard-ConTeXt
or minimal-ConTeXt or light-ConTeXt
ie a ConTeXt to use as reference


Exactly what I need : standard, minimal and light


How could a BNF grammar help to learn ConTeXt, it did not explain
what a environment do and where is the advantage to ConTeXt's own
command explanations with the information which arguments are
optional and what keys and values a command takes.

In a recent MkIV you even have the option to enable
a key-val-checkers which mention invalid keys on the terminal.

I have no problems to be corrected when I'm wrong or missing something.

Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___