From rlpowell@digitalkingdom.org Thu Feb 20 16:55:24 2003 Received: with ECARTIS (v1.0.0; list lojban-list); Thu, 20 Feb 2003 16:55:24 -0800 (PST) Received: from rlpowell by digitalkingdom.org with local (Exim 4.12) id 18m1TC-0004G7-00 for lojban-list@lojban.org; Thu, 20 Feb 2003 16:55:18 -0800 Date: Thu, 20 Feb 2003 16:55:18 -0800 To: lojban-list@lojban.org Subject: [lojban] EBNF from yacc Message-ID: <20030221005518.GG11447@digitalkingdom.org> Mail-Followup-To: lojban-list@lojban.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="liOOAslEiF7prFVr" Content-Disposition: inline User-Agent: Mutt/1.5.3i From: Robin Lee Powell X-archive-position: 4115 X-ecartis-version: Ecartis v1.0.0 Sender: lojban-list-bounce@lojban.org Errors-to: lojban-list-bounce@lojban.org X-original-sender: rlpowell@digitalkingdom.org Precedence: bulk Reply-to: lojban-list@lojban.org X-list: lojban-list --liOOAslEiF7prFVr Content-Type: text/plain; charset=us-ascii Content-Disposition: inline So, someone said recently that it would be nice to get EBNF out of the yacc lojban grammar so we could compare them for the errors and stuff. I happened to randomly find this today: NAME yyextract - extract grammar rules from a yacc grammar SYNOPSIS yyextract [-behyV] [-o file] [-t title] [-w cols] [file ...] DESCRIPTION The yyextract utility extracts the grammar rules from a yacc grammar. The options are as follows: -b Select the Backus-Naur Form (BNF) for the output. -e Select the Extended Backus-Naur Form (EBNF) for the output. The output format looks rather different than our EBNF, though, because our EBNF is amazingly non-standard, and I suspect that the transformations involved are NP-hard anyways. But it's attached in case anyone is interested. -Robin -- http://www.digitalkingdom.org/~rlpowell/ *** I'm a *male* Robin. .i le pamoi velru'e zo'u crepu le plibu taxfu .i le remoi velru'e zo'u mo .i le cimoi velru'e zo'u ba'e prali .uisai http://www.lojban.org/ *** to sa'a cu'u lei pibyta'u cridrnoma toi --liOOAslEiF7prFVr Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="grammar.ebnf" The terminal tokens defined in the grammar: A_501, BAI_502, BAhE_503, BE_504, BEI_505, BEhO_506, BIhI_507, BO_508, BRIVLA_509, BU_511, BY_513, CAhA_514, CAI_515, CEI_516, CEhE_517, CMENE_518, CO_519, COI_520, CU_521, CUhE_522, DAhO_524, DOI_525, DOhU_526, FA_527, FAhA_528, FAhO_529, FEhE_530, FEhU_531, FIhO_532, FOI_533, FUhE_535, FUhO_536, GA_537, GEhU_538, GI_539, GIhA_541, GOI_542, GOhA_543, GUhA_544, I_545, JA_546, JAI_547, JOI_548, KEhE_550, KE_551, KEI_552, KI_554, KOhA_555, KU_556, KUhO_557, LA_558, LAU_559, LAhE_561, LE_562, LEhU_565, LI_566, LIhU_567, LOhO_568, LOhU_569, LU_571, LUhU_573, ME_574, MEhU_575, MOhI_577, NA_578, NAI_581, NAhE_583, NIhO_584, NOI_585, NU_586, NUhI_587, NUhU_588, PEhE_591, PU_592, RAhO_593, ROI_594, SA_595, SE_596, SEI_597, SEhU_598, SI_601, SOI_602, SU_603, TAhE_604, TEI_605, TO_606, TOI_607, TUhE_610, TUhU_611, UI_612, VA_613, VAU_614, VEhA_615, VIhA_616, VUhO_617, XI_618, Y_619, ZAhO_621, ZEhA_622, ZEI_623, ZI_624, ZIhE_625, ZO_626, ZOI_627, ZOhU_628, BIhE_650, BOI_651, FUhA_655, GAhO_656, JOhI_657, KUhE_658, MAI_661, MAhO_662, MOI_663, MOhE_664, NAhU_665, NIhE_666, NUhA_667, PA_672, PEhO_673, TEhU_675, VEI_677, VEhO_678, VUhU_679, any_words_697, any_word_698, anything_699, lexer_A_701, lexer_B_702, lexer_C_703, lexer_D_704, lexer_E_705, lexer_F_706, lexer_G_707, lexer_H_708, lexer_I_709, lexer_J_710, lexer_K_711, lexer_L_712, lexer_M_713, lexer_N_714, lexer_O_715, lexer_P_716, lexer_Q_717, lexer_R_718, lexer_S_719, lexer_T_720, lexer_U_721, lexer_V_722, lexer_W_723 ::= ::= ::= ::= [ ] ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= ::= --liOOAslEiF7prFVr--