www.digitalmars.com         C & C++   DMDScript  

D - current D grammar

reply "Peter Hercek" <vvp no.post.spam.sk> writes:
Hi all,

where can I find most current D grammar?
It may be a source file or some documentation.
Please, download location and filename.
If the process could be reasonably automated
I would like to put it in an xml format just to test
one xslt I have, which transforms grammar
descriptions to a nice html.
Result would be interesting :) I hope.
I believe result may be available to public then.
I mean: is this allowed from the legal point of
view?

Peter.
Feb 13 2003
parent reply "Walter" <walter digitalmars.com> writes:
"Peter Hercek" <vvp no.post.spam.sk> wrote in message
news:b2hler$64r$1 digitaldaemon.com...
 where can I find most current D grammar?
 It may be a source file or some documentation.
There's both at www.digitalmars.com/d/ Download the compiler, which comes with source for the parser.
 Please, download location and filename.
 If the process could be reasonably automated
 I would like to put it in an xml format just to test
 one xslt I have, which transforms grammar
 descriptions to a nice html.
 Result would be interesting :) I hope.
 I believe result may be available to public then.
 I mean: is this allowed from the legal point of
 view?
Yes.
Feb 14 2003
parent reply "Peter Hercek" <vvp no.post.spam.sk> writes:
Hi Walter,

Thanks for info. Although I was not delighted when I
 found you have completely custom parser implementation.
I wanted to write some small conversion program which
 would select the grammar from sources directly to ensure
 that it is correct and current. I think I would be able to do
 so if you would have used yacc or antlr. I suppose that
 the file parser.c is not generated by some parser generator
 (it was somewhat similar to antlr [http://www.antlr.org/]
 output).
Well, finaly I selected grammar from the web site. I was
 able to automate it only minimaly to get the grammar in a
 text form (see the attached text document). The conversion
 from the text document to the actual html file is automatic.
The grammar has errors: undefined symbols (they apear
 during xml validation); to many top levels (you can see
 them in the resulting html); plus some semantical errors
 probably too. This is mostly because the grammar
 specificiation on the web is not complete and partially
 because of my own errors ... part of  the work was
 manual :(
Please, check the txt file. If you think that there is a way
 to get the text file correct, then the rest is very easy.
 I can provide sw to transform the text file to xml. The
 html form is retrieved using dtd validation and xslt
 transformation. I would be very glad if somebody can
 help me get the text file correct. I would be forced
 to study your custom parser and I do not have enough
 courage for this. One of my reasons to get the D grammar
 correct is to post it to antlr discussion group as example
 - I would like to make them to extend antlr parser
 generator so that it generates the xml file :) I'm not
 successful with this currently :( antlr generates an html
 form of a grammar, but the html file has less features.
The resulting html contains both forward links and also
 backward "multi-links" using popup menus (dhtml). It
 works on win32 IE 6.0 and higher. May be it works
 with something else too, but I never tried so probably
 does not work with different viewers.
Whoever knows, how to make the text file correct, please,
 let me know.


"Walter" <walter digitalmars.com> wrote in message
news:b2idtp$qjf$1 digitaldaemon.com...
 "Peter Hercek" <vvp no.post.spam.sk> wrote in message
 news:b2hler$64r$1 digitaldaemon.com...
 where can I find most current D grammar?
 It may be a source file or some documentation.
There's both at www.digitalmars.com/d/ Download the compiler, which comes with source for the parser.
 Please, download location and filename.
 If the process could be reasonably automated
 I would like to put it in an xml format just to test
 one xslt I have, which transforms grammar
 descriptions to a nice html.
 Result would be interesting :) I hope.
 I believe result may be available to public then.
 I mean: is this allowed from the legal point of
 view?
Yes.
begin 666 d-grammar.zip MV7+<N/&=5?P'RHF/M2W)V;?01TJVI+4J6EM9R?96;&_ F<',H,PA9WE84CSV M*ET`;12487*:6#ZI\&?<M"=_QX67N/ *U:M;O<E>U:L5K3JAUH!<<4;V'Y+L M3OE -46I1I&72_JOON[H3%&51-U/(NBC=EJLZ3G]LZ>5'N>8O&CJ?>+HQM:^ M`WTR4&& B8'F!JH,U!BH,]!7`Q&\+A7JBF2OZ94<9P-8]K?3KB '<>/)$<X^ M4G&L*7RJ5AU=T 9//HV2NC0,W_-^/F=72$X*'-(I6TGA3?:2545S+4'9+ GQ M?.9JQ_BFKOY-F]K:%B-LO]/$=%O(3H V V1KI2#A'M7#I E82%:(AE$27:,) M%C2=0.GO#LH1 M*( _Y-+UX8ECZ^-MTP7-AJ8$T4N2'.NO'D"BAB]L#A=AFN5$LOR37E_6S4R1 MG0&[Z1) 'B8`Y"X0P)+7#G"]6I?TRI0JJZ?F(:;JH889G?0+`\^+ONQ,J:2+ M\V$K,5R"%>=B" !< S':?DT!KOH21"MZ"0Q+VPAFS%G6%5B#P5R!,DRM]I+9 MH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9^=7[UR/72N4*+ MI>\F9 -70<2-6[)3*R0%AR/Z)&=.J8&B!ZP!U?/D6E%/I(I:RNTKV1M%:;:\ M:BQ*N+8TR.JS9C;DFGN*SNRUZHHQZG3 U2>TU/9*3L!D]<0FY0M,ZO,=/KA^ MRE;(I]OZ`8Y9N"9R+8A][4L#YA;T8&-F]51-/'2UM7D*:&N+B#I8AP,)-L:4 M'/6S;E"HV3&#Q4&L=ZEG:[B4 5(0)VXP,3B(JJ \\#VWOB(HUFL/.:+ O9PC MK7$U-VY):-\NLN>OOY3E-L7UG6E>U)]ZNB:6MJ=7I=H*-$MQ*%_ZHCUC';N0 M(5=(AYLQ1 8ZLD1)-_I2F#JNZG4>Q!F4L>0*=+!S(+9&WJ>)9MJ7..'X+SBL M^.'_`5!+`0(4"Q0````(`*FQ3BY$G(N51 P``-(U```-``````````$`( `` M``````!D+6=R86UM87(N='AT4$L!`A0+% ```` `+[5.+BQ^T#D.( ``5IH! M``T``````````0` ````<0P``&0M9W)A;6UA<BYH=&U02P4&``````(`` !V )````JBP````` ` end
Feb 14 2003
parent reply "Walter" <walter digitalmars.com> writes:
"Peter Hercek" <vvp no.post.spam.sk> wrote in message
news:b2kf62$16mh$1 digitaldaemon.com...
 Thanks for info. Although I was not delighted when I
  found you have completely custom parser implementation.
 I wanted to write some small conversion program which
  would select the grammar from sources directly to ensure
  that it is correct and current. I think I would be able to do
  so if you would have used yacc or antlr. I suppose that
  the file parser.c is not generated by some parser generator
  (it was somewhat similar to antlr [http://www.antlr.org/]
  output).
No, it's all written by hand.
 Well, finaly I selected grammar from the web site. I was
  able to automate it only minimaly to get the grammar in a
  text form (see the attached text document). The conversion
  from the text document to the actual html file is automatic.
 The grammar has errors: undefined symbols (they apear
  during xml validation); to many top levels (you can see
  them in the resulting html); plus some semantical errors
  probably too. This is mostly because the grammar
  specificiation on the web is not complete and partially
  because of my own errors ... part of  the work was
  manual :(
I know the documentation incomplete. But it's nice that you've found a way to automatically find those errors.
 Please, check the txt file. If you think that there is a way
  to get the text file correct, then the rest is very easy.
  I can provide sw to transform the text file to xml. The
  html form is retrieved using dtd validation and xslt
  transformation. I would be very glad if somebody can
  help me get the text file correct. I would be forced
  to study your custom parser and I do not have enough
  courage for this. One of my reasons to get the D grammar
  correct is to post it to antlr discussion group as example
The parser isn't too hard to figure out. It's not LALR(1), some of the constructs require arbitrary lookahead. That's the only tricky part, but that stuff yacc should be able to handle in its sleep.
  - I would like to make them to extend antlr parser
  generator so that it generates the xml file :) I'm not
  successful with this currently :( antlr generates an html
  form of a grammar, but the html file has less features.
 The resulting html contains both forward links and also
  backward "multi-links" using popup menus (dhtml). It
  works on win32 IE 6.0 and higher. May be it works
  with something else too, but I never tried so probably
  does not work with different viewers.
 Whoever knows, how to make the text file correct, please,
  let me know.
ok.
Feb 15 2003
parent reply "Peter Hercek" <vvp no.post.spam.sk> writes:
"Walter" <walter digitalmars.com> wrote in message
news:b2l2oh$1o27$2 digitaldaemon.com...

 I know the documentation incomplete. But it's nice that you've found a way
 to automatically find those errors.
It's quite easy to find easy errors of the grammar itself. I do not have any chance to locate errors in semantics :( I think I could also find some more hiden errors, like grammar conflicts (I can update the xslt so that it generates antlr compliant output and then send the output into antlr - it would find more hidden problems).
 The parser isn't too hard to figure out. It's not LALR(1), some of the
 constructs require arbitrary lookahead. That's the only tricky part, but
 that stuff yacc should be able to handle in its sleep.
Looks, just like LL(k) grammar, which is recognized by antlr (it has also syntactic/semantic predicates to handle situations when arbitrary lookahead is required.
 Whoever knows, how to make the text file correct, please,
  let me know.
ok.
I have added list of undefined symbols (the attached text file). Some of the erros are trivial (like symbol physicalEndOfTheFile should be in backticks, so that it is treated as terminal). Some may represent a missing stuff. I can provide you with tools I used, but they are all in c sharp, so they require net framework installed (it is free). To translate it one needs also a complete antlr instalation (free too), which requires java runtime instalation :( ........ again free, but in summary a lot of installing. Anyway if you have net framework already instaled I can send you only executable files and it would work (well first I should make the programs more user friendly - this would take a while). Or if somebody just sends me the updated text file (the one in my previous post, not the error listing in this post) I can check and fix some trivial errors and return back the results. begin 666 d-grammar.zip M;7,;MQ'^WIG^!XIMHL2V1,6?VL2T1V^N-95M-9+CI(G=.9$ B?'QCKD7O;1. M4";C?K<L1GM_ZW;R(DJ&49PFHM]-TNZ+YW_^T[.=O;W.<3J[S^1X4G2>'AP\ M[5R(0F2=5R(;B$]/.H=QW*F(>2<3N<ANQ'"_L[=7U3UY>WSUT\5I9YQ%TVF4 M=2Y_NKPZ?=WI+OZ^/RR&7<VHP>WEQ7TL\HD016>2B5&_.WXZG!33>/\NCXMN M-;(R%ATY[.^>)L.WHY<R%KO/GT5Q\?R9TMDITO[N;'*?:_:*X6HB*I[>\V>] MV?P>AOA^( MQ.8L&EI'FA3U6=$.K"PPQ#F4M/743GCHL?/!W!^W(03OVF*5R M"M^VXW0Z%4GA:D?-8FCM/5IH;,1,HBP:J&Z4:TF:]*C'`^[UG%5]N"L1C[W: M'[>UVXTZ&ZHFR9$4&8V$!45DET64%<!L-A.A*,$:5>XR+&5%.C35AZ/F>1", M>6,,2_\'!]:Y*)3!P^16X+P69)2<R+%TQN9ED:F$?ZZZ8Z;S(>FWBA2+?Y5I MS>YPMB;&4$:KNJ15)K?=JJZG56SME5L%'+9ZTXDD,P7OVKVD*N^"\A> _!=0 M'H'R:U ^`N4)*,] >0'*;T Y<3\S(B]Y[PCS*W'7=':NS*/K[:"(XO68MR8B M3'"YHB%"RV!63 HQ%AE(F0LJ&FV65%)T68Y&\BY +U5X( 9RJG#P"H]D$F7W M %C9%="4):*A4[3!\2H`]Z*!AN=BOA><\\4E7_R.+XX!^SDHCX&<<U!>`O E M0/\.\+]K\S-)?.$#HPXS`:Y]\B9-_BVRE.LKB 7&D8UE$4PFE#J#MN.M$IX3 M`!7_41"_K7H>JHP1[!SAE&.&M2D-95.V$3_ZF9V:7]$^W!* 14^PBRW>5YX( M$2$7&5)5%BE/N9: RG4ZO >43$2?`.F^$#QE$.68`B ,HF+ =."*I)9L *+F MX8 2*Q,!4CJ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MA9,-FTQ$[>]JNY-F876HFW=NLK^O!N%^%99.+ M<\<X?_?93W&6C1BO/H^1`/A""W]PUDAM%;Q(I<4CEI5H&CV<M!JQ..)8PG3W M4"DZ>=]!"IVT]-PY5>=8"GS ;HF$J(0N38Y*`#DGQ5$).<1 4-A:+70':K[> MK(R$)W+Q(RA+=42SJ:!E4G1 T_[W4K7RT8)]NK"(+! R3]%-\TL:E[ `6)*C MO6TJY\,B!(77W:V8RU8V`3!\%^G>+I5>$!& N02MN;?EIR<Z3A6!\BKTJAV" M4?/!$F$YM$J!]S9/ 64)Y P=40B%H]WL9M"[2<.;! [ \66Z$FM5.S$D'AB\ MW$(P28&>;=[6G96L80BM!7UD2SFH'+]%V*\] 3B\`[F%1]53N9]'J=)PL+1 M)DOPH1K6/.(6E9>4^?2;W-RTO2!6ACL'1S/ 4U4G6D\.?JZ"6*9JH2PU83#O M[GK]1YI^!R)R8+]=HELFC(,_.7K3&I'A;*;\" C>S ( )%?VA21HR/_6I&.R M,QXDCG;16VGIY7%G4^ F/<3B:D,$I5Y)\P/A][9!U8'-6H$>"T-)^/7'NW' MY^(<O<L)PD3H,3<$ Y^F5LOM6M6BO=;-_?/34MZHEG N>KB'.SUYD*(!(V/] M\_NK>E;WW:J5X&V[UR:O=_O_`%!+`0(4"Q0````(`,NS3BZQAGLG40\``/5S M```-``````````$`( ````````!D+6=R86UM87(N>&UL4$L!`A0+% ```` ` M]6)/+BXAD+9K`P``Y!\```H``````````0` ````? \``&5R<F]R<RYT>'10 52P4&``````(`` !S````#Q,````` ` end
Feb 15 2003
parent reply "Walter" <walter digitalmars.com> writes:
"Peter Hercek" <vvp no.post.spam.sk> wrote in message
news:b2luu1$2e59$1 digitaldaemon.com...
 I have added list of undefined symbols (the attached text file). Some of
the
  erros are trivial (like symbol physicalEndOfTheFile should be in
backticks,
  so that it is treated as terminal). Some may represent a missing stuff.
 I can provide you with tools I used, but they are all in c sharp, so they
  require net framework installed (it is free). To translate it one needs
also
  a complete antlr instalation (free too), which requires java runtime
  instalation :( ........ again free, but in summary a lot of installing.
 Anyway if you have net framework already instaled I can send you
  only executable files and it would work (well first I should make the
  programs more user friendly - this would take a while).
 Or if somebody just sends me the updated text file (the one in my previous
  post, not the error listing in this post) I can check and fix some
trivial
  errors and return back the results.
One of the great features of D is none of that is required!
Feb 15 2003
parent "Peter Hercek" <vvp no.post.spam.sk> writes:
"Walter" <walter digitalmars.com> wrote in message
news:b2m52q$2k9d$2 digitaldaemon.com...

 One of the great features of D is none of that is required!
I really do understand this :), also I do not consider it important for PC aplications, I like IL virtual machine and it has also good points. 1) no virtual machine 2) pssibility to manualy alocate 3) no dependence on the "erratic" company It has good chances to get videly adopted (at least I hope - one may need quick startup times or something embedded, small disk usage or backup when MS gets crazy again :) ... whatever). Ok, sorry, I should not continue this thread this way, it is supposed to be about the grammar.
Feb 15 2003