/* GRAMMAR 84 Loglan grammar as of Jun97 Trial.84 Apr99 0 conflicts Copyright (C) 1982, 1984, 1986-1997 by The Loglan Institute, Inc. Created in Jan-Feb 82 from JSP's Aug 81 grammar by SWL & JCB, Modified in Mar 82, Dec 83, Mar 84, and Dec 86 - Jun 87 by JCB. and in 1987-99 by RAM. Trial 84a (May 99) is a test for using GO in a different fashion Trial.84 was created in Apr99 to incorporate an extension of GE to permit it to group numbers e.g. to ge tecu mrenu, to add 'hi' which had been inadvertently omitted from mex, and to replace feu in PA with fea, and to restore feu to UI. zeu was added as an allolex of ze for ordered linking of arguments Trial 83 was created in Jan 98 to modify the handling of vocatives as UI and modify the use of HOI as an argument. Trial.82 was created in Jun 97 to incorporate a number of modifications to the grammar since Trial 81 A correction for when ge and go are combined with multiple predicates. The previous parse was not considered to be the appropriate one. A change to allow prenex quantifiers to extend over an afterthought compound sentence (with ICA) instead of a cutoff at the ICA. A change in the relative binding strength of CI and ZE,(ZE1) to permit sentences like Le preda ci prede ze predi ci predo predu to be appropriately grouped. Addition of the new PA words, including the MIA subjunctive and the new trial subjunctive proposed by Emerson and James. Altering of the DA words to handle the new personal pronoun set. Introduction of a MO lexeme, to allow MO to be both DA and NI, and likewise for CU (CA and NI) Putting NIRO into the PREDA lexeme. Allowing NI+UI to be parsed separately as UI. Changing ZE2 to parse as A4. Trial 81 was created in Oct 94 to correct a typo in the utterance category. The preparser was adjusted to handle ciobi and kin, as well as ze linking argmods and je links and other minor corrections. Trial 80 was created in Dec 94, include luo and lou, mea, nuo, fuo, and juo. The preparser was adjusted to allow for the other Keugru-mediated changes. Still in abeyance is whether duo, dui should go to the bi lexeme, whether fio,foi and suo should be included in advance of approval. Trial 79 was created in Nov 93, allow JUE phrases without a corresponding JE phrase( Cancelled), disallow GUU A TERMSET, adjust the word list lexeme to require pauses, and allow prenex quantifiers in LEPO and JIO clauses. Later support for LEE and LAA were added, and A+PA compounds with sheks and keks. Trial 78 was created in Feb 93 to eliminate TEI, split GUUs to allow for argmodding combined connected predicates, add zea, [A] and allowing ze to link PO and PAed PREDAS. Added MA for VMA and NI pair. Trial 77a was created to test different BI and LA structures Trial 77 was created in Jul 92 to add niu, change some other LWs, the parse of GOsents, add listers LAU and LUA, separate the causals and lettorals, and upgrade the preparser on conjoined words. Trial 76a was created in Jul 91 to add the possibility of multiple JIs to indef sentences, already permitted for definite ones and separate causals for preparser. Trial 76 is based on Trial 75. The changes are to accept terms and descpreds after LIO to be interpreted as numbers: e.g. LIO keigei = 1kg. LIO nema dalra = $100. Also predicates after a name which is not followed by a comma are considered part of the name until commaed, and uncommaed descriptns preceding a name absorb the name into the descriptn. If commaed, the name becomes a vocative. Trial 75 is based on Trial 74. The main change is to allow initial kekpreds in a kekpred string and to rationalize the behaviour of desckekpreds and kekpreds. Preds after the ki modify each other until a gu, after which subsequent preds are modified by the entire kekpred. Trial 74 is based on Trial 73. It moves kekpred to barepred, and makes other changes to avoid conflict. This avoids kekpreds from being swallowed as kekpredunits when following predas, and enables the use of ga and 'tenses' with kekpreds. Trial 73 is based on Trial 72. It incorporates the Rice changes, including soi and sue, the register markers rie kae nue fie & die, their negatives,and the PA allolex gau. It differs from Trial 72a in that the register markers are made into argument and vocative modifiers instead of UI words. ICA was once again separated from I for different reasons. Lae and with lue go into the dio lexeme. hue is added to Hoi as an addressor in dialogue text. Ie would be dio unless compounded with NI Trial 72 is based on Trial 71. It has extended the vocative changes to bring all vocatives into the grammar, and allow them to be connected with the standard connectives and CI. It may also incorporate changes suggested by Steven Rice, and approved by the Academy. Trial 71 is based on Trial 70, which was the original distribution version. It is intended to explore variations on vocative use. Trial 70 is based on Trial 69 and incorporates all changes required by the issue of the 1980 edition of Loglan I, including those tested in the various versions of Trial 69. In particular it includes all changed little words and many not previously incorporated, also a new grammar of gi replacing goi, and an altered mex. Trial 69 is based on Trial 68 and incorporates the changes of Nov 88 Trial 69b is a temporary version for testing modifications only. Yet to do is renaming the multiple lexemes such as As etc. as 1,2,and 3, instead of A, A1,A2. Trial 69a is in study and is intended to deal with the Pause and Freemod problem in an improved manner. It is distinct from 69b. Trial 69c is a test for separating ICA from I and making RA and NI essentially identical in all respects. Later ICA was restored to I, and I replaced ICA with no problems. Numbered lexemes were renamed. Mar 89: Removed all free(head)mods from grammar proper in preparation for separate parsing. Feb 89: Allowed for lao + gobbling of Linneans up to a comma. Allowed apostrophes and colons to occur in names. Inserted yet more CVV words Feb 89: Inserted new comma lexemes and separated pause(comma) from gu. These values are now pause, gu, gue, gui, and guo. Feb 89: inserted ZE2 before argsign Feb 89: Corrected to allow prenex modifiers to precede keksentences without GOI. uttD works in the first unit of keksent, but will be removed for now until I find what is wanted (with respect to eesheks and prenex quantifiers inside keks). Subsequently adjusted as needed. Feb 89: Moved gu from termset1 to termset. Hoi redro nu herfa, nenkaa fails without gu. may require a termsetx. Forced PA1 after ji before predsign. PA1 if removed requires some explicit gus not otherwise required. PA1 was not inserted after ji, causing a failure to parse in jcb's Chapter 5. Removal of this requirement had no effect on the corpus. 3Nov88, Added a number of other missing words, and incorporated changes in discursives and modal operators. Allowed ji barepred. Added LIO DA and LE DA in Arg 1 and fixed for new case tags. T68 is based on T67. freemods(freemods) are incorporated into the grammar eliminating gobble. As well parens, me, jo, and hoi expressions, and liŠlu expressions are recursively parsed. Negative arguments have also been incorporated. This grammar does not parse spellings using vowel connectives inside liŠlu expressions. The corpus was changed to incorporate (improved?) parses given by this grammar. T67 is based on T65&T66. Machine lexemes have been replaced by additional lexemes PA2, NO1,NO2 etc. ZO, RA, and HU have been relegated to the preparser. T65 was based on T64 and put the BUA Lexeme into PREDA by putting 'bua/bui'into PREDA, removed all BUA-bearing allograms from the grammar, and removed BUA and M7 from the lexicon. Neither is necessary now that indefinite descriptions, e.g., 'ra bua', are possible, and the grammar of bua and kin is no longer exceptional. A new preparser, PP729, was built to go with this grammar. In addition, M8 through M12 were renamed M7 through M11, in both grammar and preparser, and in the various teaching documents. Later, on 2 June, it was noticed that the GI/GOI distinction is no longer necessary, now that prenex quantifiers do not have to be spotted by the preparser to find embedded BUA's; so GOI was similarly removed from lexicon, grammar and preparser, and from the teaching documents; and 'goi' was put in GI. These are cosmetic changes, not deserving a new Trial number. SOME DEFERRED PROBLEMS for study later or for solution before Turnover:- a) There are some problems with multiple negation of modifiers. Also of some kekked forms still. See "Problem Specimens, 6 Mar 87". b) Study how prenexes interact with sentence-kekking and term-advancing. It's now better but perhaps still not good enough. c) The preparser needs to be changed so that free mods before PAUSE gobble right and not left. At present, Ia no, ui da gudbi' parses as '(ia no ui)(da gudbi)' because the ui is gobbled by the pause, and so becomes part of the neghead 'ia no'. No longer needed. RAM d) Check for redundant M-Lexemes; see comments to T33. Done.RAM e) Study why my efforts to negate arguments have all failed. Why? Negating modifiers, a very similar structure, was successful. Done. RAM f) TAI | mex> are temporary allograms of this grameme only to permit spelling and counting. They can be removed just as soon as a defect in the preparser, which apparently now prevents it from treating sutori strings in [.]-concatenated strings of strings as separate specimens, at least for the purposes of M13-insertion, has been repaired. See blocks .ry and ._fp of the corpus for examples of what it's doing now (13 May 87). PERMANENT COMMENT (do not erase this until SWL has dealt with it): T46x collapsed JIO and JI and yacced with 0 conflicts. So I built a corresponding preparser, PP46x, making only those changes required to accommodate the JIO ->JI and JA -> JO changes made in T46x, and compiled a parser (the 4-tuple is saved in \T46x for you to play with) which behaved anomalously. It will not parse, i.e., refuses every specimen I gave it which had JI in it! Why? What's happening here? This is the first yacced grammar, i.e., conflict-free grammar, I've ever built which did not produce a usable parser. Help. I've restored JIO to the lexicon and moved on. But I would recollapse JIO into JI if this anomaly can be resolved in such a way as reopened that possibility. JCB 3 Mar 87. On 1 Jun 87 I tried again with T65b/PP728; same results. This anomaly has been explained and is not readily resolved. Basically if this change is made JI expressions must have explicit GUs wherever needed. */ %token A1 %{/*: a1 zea */ %} /* used for A when connecting predicates */ %token A2 %{/*: a2 */ %} /* used for A when connecting linkargs or modifiers */ %token A3 %{/*: a3 */ %} /* used for A when connecting argmods */ %token A4 %{/*: ha a e o u */ %} /* also CPDs anoi, apa, noanoi, etc. Used for all other A */ %token ACI %{/*: */ %} /* recognized by CPD-lexer */ %token AGE %{/*: */ %} /* recognized by CPD-lexer. */ %token BI %{/*: bi bia bie cie cio */ %} %token BAD %{/*: */ %} %token CA %{/*: ca ce co cu */ %} /* also CPDs noca, canoi, nocanoi, etc. */ %token CI %{/*: ci */ %} %token CUI %{/*: cui */ %} %token DA %{/*: ba be bo bu da de di do du mi tu mu ti ta tao tio tua mio miu muo muu toa toi too tou tuo tuu suo */ %} %token DIE %{/*: die fie kae nue rie */ %} %token DIO %{/*: beu cau dio foa kao jui neu pou goa sau veu zua zue zui zuo zuu lae lue */ %} %token DJAN %{/*: */ %} /* all C-final words found by lexer */ %{#define END 0 /*: . */ %} %token FI %{/*: fi */ %} %token GA2 %{/*: ga */ %} %token GE %{/*: ge */ %} %token GE2 %{/*: ge2 */ %} %token GEU %{/*: geu */ %} %token GI %{/*: gi goi */ %} %token GO %{/*: go */ %} %token GU %{/*: gu */ %} %token GUE %{/*: gue */ %} %token GUI %{/*: gui */ %} %token GUO %{/*: guo */ %} %token GUU1 %{/*: guu */ %} %token GUU2 %{/*: guu2 */ %} %token HOI %{/*: hoi */ %} %token HU %{/*: hu */ %} /* used only by CPD-lexer to find nahu-CPDs; otherwise with DA */ %token I %{/*: i */ %} /* also CPDs ifa, inusoa, etc. */ %token ICA %{/*: */ %} /* all eeskeks, recognized by lexer */ %token ICI %{/*: */ %} /* ici & icaci-type words, all recognized by CPD-lexer */ %token IE %{/*: ie */ %} %token IGE %{/*: */ %} /* ige & icage-type words, all recognized by CPD-lexer */ %token JE %{/*: je */ %} %token JI %{/*: ji ja jie jae pe */ %} %token JIO %{/*: jio jao */ %} %token JO %{/*: jo */ %} /* also CPDs rajo, tojo, etc. */ %token JUE %{/*: jue */ %} %token KA1 %{/*: ka1 */ %} /* used for KA when connecting linkargs */ %token KA2 %{/*: ka2 */ %} /* used for KA when connecting predicates */ %token KA3 %{/*: ka ke ko ku */ %} /* also CPDs kanoi, nuku, nukunoi, kouki, nukouki,etc. For the rest */ %token KOU %{/*: kou moi rau soa */ %} /* these are pa words separated out for the lexer */ %token KI %{/*: ki */ %} /* also the CPD kinoi */ %token KIE %{/*: kie */ %} %token KIU %{/*: kiu */ %} %token LAO %{/*: lao */ %} %token LAU %{/*: lau lou */ %} %token LE %{/*: le la lo lea leu loe lee laa */ %} %token LEPO %{/*: */ %} /* recognized by CPD-lexer*/ %token LI %{/*: li */ %} %token LIE %{/*: lie */ %} %token LIO %{/*: lio */ %} %token LIU %{/*: liu lii niu */ %} %token LU %{/*: lu */ %} %token LUA %{/*: lua luo */ %} %token SOI %{/*: soi */ %} %token MA %{/*: ma si */ %} /* to recognize initial vowels in acronyms, NI otherwise */ %token ME %{/*: me mea */ %} %token MO %{/*: mo */ %} /* to recognize MO as DA when not following a NI */ %token NI %{/*: ho ni ne to te fo fe vo ve pi re ru sa se so su kua gie giu hi hie hiu kue nea nio pea pio suu sua tia zoa zoi */ %} /* also CPDs neni, nenisei, iesu, ietoni, etc. */ %token NO1 %{/*: no1 */ %} /* used for NO + mod shown by PA */ %token NO2 %{/*: no2 */ %} /* used for NO + markpred shown by PO, ZO or PA1 */ %token NO3 %{/*: no3 */ %} /* used for NO + argument */ %token NO4 %{/*: no */ %} /*For all other no's*/ %token NOI %{/*: noi */ %} %token NU %{/*: nu fu ju nuo fuo juo */ %} /* also CPDs nufu, nufuju, nuto (= nu), nute (=fu), nufo (=ju), nufe, nuso, etc. */ %token PA1 %{/*: pa1 */ %} /* used for PA and GA when inflecting a predicate */ %token PA2 %{/*: va vi vu pa na fa gia gua pia pua nia nua biu fea fia fua via vii viu ciu coi dau dii duo foi fui gau hea kau kii kui lia lui mia mou nui peu roi rui sea sio tie */ %} /* also CPDs pana, pazi, pacenoina, etc. For the rest of PAs*/ %token PAUSE %{/*: , # */ %} %token PO %{/*: po pu */ %} %token PREDA %{/*: he dua dui bua bui */ %} /* all preda-forms words; also all pred-wds found by lexer, CPDs like rari, nenira, sutori, etc.; also acronyms like ebai, baicai, ebaicai, ebaiocai, haitosaiofo, etc., */ %token RA %{/*: ra ri ro */ %} %token HUE %{/*: hue */ %} %token SUE %{/*: sue sao */ %} %token TAI %{/*: gao */ %} /* forms like ama bai cai tai tei are recognized by the lexer; CPDs like baicai, ebaicai, ebaiocai, haitosaiofo, etc., belong to PREDA */ %token UI %{/*: ua ue ui uo uu oa oe oi ou ia ii io iu ea ei eo eu ae ai ao au bea buo cea cia coa dou fae fao feu gea kuo kuu rea nao nie pae piu saa sui taa toe voi zou loi loa sia sii siu cao ceu */ %} /* also CPDs nahu, vihu, kouhu, duohu, nusoahu, etc. */ %token ZE2 %{/*: ze zeu */ %} /* used for ZE + argsign */ %token ZI %{/*: zi za zu */ %} /* used by the preparser to recognize pazi-CPDs and acronymic PREDA's */ %token ZO %{/*: zo */ %} /* used by the preparser to recognize acronymic PREDA's; otherwise zo would be a member of PO */ %start utterance %{ #define YYDEBUG 1 %} %% err : error {yyerrok;} ; guo : GUO {$$=NodeY1 ("guo", &$1);} | GU {$$=NodeY1 ("guo", &$1);} | err {$$=NodeA ("guo",1,LeafI (GUO,"0"));} ; gui : GUI {$$=NodeY1 ("gui", &$1);} | GU {$$=NodeY1 ("gui", &$1);} | err {$$=NodeA ("gui",1, LeafI(GUI,"0"));} ; gue : GUE {$$=NodeY1 ("gue", &$1);} | GU {$$=NodeY1 ("gue", &$1);} | err {$$=NodeA ("gue",1,LeafI (GUE,"0"));} ; guu : GUU1 {$$=NodeY1 ("guu", &$1);} | GU {$$=NodeY1 ("guu", &$1);} | err {$$=NodeA ("guu",1,LeafI (GUU1,"0"));} ; lua : LUA {$$=NodeY1 ("lua", &$1);} | err {$$=NodeA ("lua",1,LeafI (LUA,"0"));} ; geu : GEU {$$=NodeY1 ("geu", &$1);} | err {$$=NodeA ("geu",1,LeafI(GEU,"0"));} ; gap : PAUSE {$$=NodeY1 ("gap", &$1);} | GU {$$=NodeY1 ("gap", &$1);} | err {$$=NodeA("gap",1,LeafI(PAUSE,"0" ));} ; juelink : JUE argument {$$=NodeY2 ("juelink", &$2);} ; links1 : juelink {$$=NodeY1 ("links1", &$1);} | juelink links1 gue {$$=NodeY3 ("links1", &$3);} ; links : links1 {$$=NodeY1 ("links", &$1);} | links A2 links1 {$$=NodeY ("links", 3, &$3);} | KA1 links KI links1 {$$=NodeY ("links", 4, &$4);} ; jelink : JE argument {$$=NodeY2 ("jelink", &$2);} ; linkargs1 : jelink gue {$$=NodeY2 ("linkargs1", &$2);} | jelink links gue {$$=NodeY3 ("linkargs1", &$3);} ; linkargs : linkargs1 {$$=NodeY1 ("linkargs", &$1);} | linkargs A2 linkargs1 {$$=NodeY ("linkargs",3, &$3);} | KA1 linkargs KI linkargs1 {$$=NodeY ("linkargs", 4, &$4);} ; predunit1 : PREDA {$$=NodeY1 ("predunit1", &$1);} | SUE {$$=NodeY1 ("predunit1", &$1);} | NU PREDA {$$=NodeY2 ("predunit1", &$2);} | GE descpred geu {$$=NodeY3 ("predunit1", &$3);} | NU GE despredE geu {$$=NodeY ("predunit1", 4, &$4);} | ME argument gap {$$=NodeY3 ("predunit1", &$3);} ; predunit3 : predunit2 {$$=NodeY1 ("predunit3", &$1);} | predunit2 linkargs {$$=NodeY2 ("predunit3", &$2);} ; predunit2 : predunit1 {$$=NodeY1 ("predunit2", &$1);} | NO4 predunit2 {$$=NodeY2 ("predunit2", &$2);} ; predunit : predunit3 {$$=NodeY1 ("predunit4", &$1);} | PO predunit3 {$$=NodeY2 ("predunit4", &$2);} ; despredA : predunit {$$=NodeY1 ("despredA", &$1);} | kekpredunit {$$=NodeY1 ("despredA", &$1);} | predunit CI despredA {$$=NodeY3 ("despredA", &$3);} ; kekpredunit: NO4 kekpredunit {$$=NodeY2 ("kekpredunit:",&$2);} | KA2 predicate KI predicate {$$=NodeY ("kekpredunit:",4,&$4);} ; despredB : despredA {$$=NodeY1 ("despredB", &$1);} | CUI despredC CA despredB {$$=NodeY ("despredB", 4, &$4);} ; despredC : despredB {$$=NodeY1 ("despredC", &$1);} | despredC despredB {$$=NodeY2 ("despredC", &$2);} ; despredD : despredB {$$=NodeY1 ("despredD", &$1);} | despredD CA despredB {$$=NodeY3 ("despredD", &$3);} ; despredE : despredD {$$=NodeY1 ("despredE", &$1);} | despredE despredD {$$=NodeY2 ("despredE", &$2);} ; descpred : despredE {$$=NodeY1 ("descpred", &$1);} | despredE GO descpred {$$=NodeY3 ("descpred", &$3);} ; senpred1 : predunit {$$=NodeY1 ("senpred1", &$1);} | predunit CI senpred1 {$$=NodeY3 ("senpred1", &$3);} ; senpred2 : senpred1 {$$=NodeY1 ("senpred2", &$1);} | CUI despredC CA despredB {$$=NodeY ("senpred2", 4, &$4);} ; senpred3 : senpred2 {$$=NodeY1 ("senpred3", &$1);} | senpred3 CA despredB {$$=NodeY3 ("senpred3", &$3);} ; senpred4 : senpred3 {$$=NodeY1 ("senpred4", &$1);} | senpred4 despredD {$$=NodeY2 ("senpred4", &$2);} ; sentpred : senpred4 {$$=NodeY1 ("sentpred", &$1);} | senpred4 GO barepred {$$=NodeY3 ("sentpred", &$3);} ; mod1 : PA2 gap {$$=NodeY2 ("mod1", &$2);} | PA2 argument gap {$$=NodeY3 ("mod1", &$3);} ; mod : mod1 {$$=NodeY1 ("mod", &$1);} | NO1 mod1 {$$=NodeY2 ("mod", &$2);} ; kekmod : KA3 modifier KI mod {$$=NodeY ("kekmod", 4, &$4);} | NO3 kekmod {$$=NodeY2 ("kekmod", &$2);} ; modifier : mod {$$=NodeY1 ("modifier", &$1);} | kekmod {$$=NodeY1 ("modifier", &$1);} | modifier A2 mod {$$=NodeY ("modifier", 3, &$3);} ; name : DJAN {$$=NodeY1 ("name", &$1);} | name CI DJAN {$$=NodeY3 ("name", &$3);} | name predunit {$$=NodeY2 ("name", &$2);} | name DJAN {$$=NodeY2 ("name", &$2);} ; mex : NI {$$=NodeY1 ("mex", &$1);} | mex NI {$$=NodeY2 ("mex", &$2);} ; descriptn : LE descpred {$$=NodeY2 ("descriptn", &$2);} | LE mex descpred {$$=NodeY3 ("descriptn", &$3);} | LE arg1 descpred {$$=NodeY3 ("descriptn", &$3);} | LE mex arg1a {$$=NodeY3 ("descriptn", &$3);} | GE2 mex descpred {$$=NodeY3 ("descriptn", &$3);} ; voc : HOI descpred gap {$$=NodeY3 ("voc", &$3);} | HOI argument gap {$$=NodeY3 ("voc", &$3);} /* | HOI argument {$$=NodeY2 ("voc", &$2);}*/ | HOI gap {$$=NodeY2 ("voc", &$2);} /* | name gap {$$=NodeY2 ("voc", &$2);}*/ ; arg1 : LIO mex gap {$$=NodeY3 ("arg1", &$3);} | LIO descpred gap {$$=NodeY3 ("arg1", &$3);} | LIO term gap {$$=NodeY3 ("arg1", &$3);} | LE name gap {$$=NodeY3 ("arg1", &$3);} | descriptn gap {$$=NodeY2 ("arg1", &$2);} | descriptn name gap {$$=NodeY3 ("arg1", &$3);} | LI utterance LU {$$=NodeY3 ("arg1", &$3);} | LI LU {$$=NodeY2 ("arg1", &$2);} | LIU {$$=LexLiu(&$1);} | LIE {$$=LexLie(&$1);} | LAO {$$=LexLao( &$1);} | LEPO uttAx guo {$$=NodeY3 ("arg1",&$3);} | LEPO sentence guo {$$=NodeY3 ("arg1",&$3);} ; arg1a : DA {$$=NodeY1 ("arg1a", &$1);} | TAI {$$=NodeY1 ("arg1a", &$1);} | arg1 {$$=NodeY1 ("arg1a", &$1);} | name gap {$$=NodeY2 ("arg1a", &$2);} | GE2 arg1a {$$=NodeY2 ("arg1a", &$2);} ; argmod1 : JI argument {$$=NodeY2 ("argmod1", &$2);} | JI modifier {$$=NodeY2 ("argmod1", &$2);} | JI predicate gui {$$=NodeY3 ("argmod1", &$3);} | JIO uttAx gui {$$=NodeY3 ("argmod1", &$3);} | JIO sentence gui {$$=NodeY3 ("argmod1", &$3);} ; argmod : argmod1 {$$=NodeY1 ("argmod", &$1);} | argmod A3 argmod1 gap {$$=NodeY ("argmod", 4, &$4);} ; arg2 : arg1a {$$=NodeY1 ("arg2", &$1);} | arg2 argmod gap {$$=NodeY3 ("arg2", &$3);} ; arg3 : arg2 {$$=NodeY1 ("arg3", &$1);} | mex arg2 {$$=NodeY2 ("arg3", &$2);} ; indef1 : mex descpred {$$=NodeY2 ("indef1", &$2);} ; indef2 : indef1 gap {$$=NodeY2 ("indef2", &$2);} | indef2 argmod gap {$$=NodeY3 ("indefinite", &$3);} ; indefinite : indef2 {$$=NodeY1 ("indefinite", &$1);} ; arg4 : arg3 {$$=NodeY1 ("arg4", &$1);} | indefinite {$$=NodeY1 ("arg4", &$1);} /* | arg4 ZE2 arg3 {$$=NodeY3 ("arg4", &$3);} | arg4 ZE2 indefinite {$$=NodeY3 ("arg4", &$3);} */ ; arg5 : arg4 {$$=NodeY1 ("arg5", &$1);} | KA3 argument KI argx {$$=NodeY ("arg5", 4, &$4);} ; arg6 : arg5 {$$=NodeY1 ("arg6", &$1);} | DIO arg6 {$$=NodeY2 ("arg6", &$2);} | IE arg6 {$$=NodeY2 ("arg6", &$2);} ; argx : arg6 {$$=NodeY1 ("argx", &$1);} | NO3 argx {$$=NodeY2 ("argx", &$2);} ; arg7 : argx {$$=NodeY1 ("arg7", &$1);} | argx ACI arg7 {$$=NodeY3 ("arg7", &$3);} ; arg8 : arg7 {$$=NodeY1 ("arg8", &$1);} | arg8 A4 arg7 {$$=NodeY3 ("arg8", &$3);} ; argument : arg8 {$$=NodeY1 ("argument", &$1);} | arg8 AGE arg8 {$$=NodeY3 ("argument", &$3);} | argument GUU2 argmod gap {$$=NodeY ("argument", 4, &$4);} | LAU wordset {$$=NodeY2 ("argument", &$2);} ; term : argument {$$=vocfind($1)?NodeY1 ("vocative", &$1):NodeY1 ("term", &$1);} | modifier {$$=NodeY1 ("term", &$1);} ; terms : term {$$=vocfind($1)?NodeY1 ("vocative", &$1):NodeY1 ("terms", &$1);} | terms term {$$=NodeY2 ("terms", &$2);} ; wordset : words lua {$$=NodeY2 ("wordset", &$2);} | lua {$$=NodeY1 ("wordset", &$1);} ; words : word {$$=NodeY1 ("words", &$1);} | words word {$$=NodeY2 ("words", &$2);} ; word : arg1a gap {$$=NodeY2 ("word", &$2);} | NI gap {$$=NodeY2 ("word", &$2);} | UI gap {$$=NodeY2 ("word", &$2);} | PA2 gap {$$=NodeY2 ("word", &$2);} | DIO gap {$$=NodeY2 ("word", &$2);} | predunit1 gap {$$=NodeY2 ("word", &$2);} | indef2 {$$=NodeY1 ("word", &$1);} ; termset1 : terms guu {$$=NodeY2 ("termset1", &$2);} ; termset2 : termset1 {$$=NodeY1 ("termset2", &$1);} | termset2 A4 termset1 {$$=NodeY3 ("termset2", &$3);} | KA3 termset2 KI termset1{$$=NodeY ("termset2",4,&$4);} ; termset : termset2 {$$=NodeY1 ("termset", &$1);} | terms GO barepred {$$=NodeY3("termset1", &$3);} | guu {$$=NodeY1 ("termset", &$1);} ; barepred : sentpred termset {$$=NodeY2 ("barepred", &$2);} | kekpred termset {$$=NodeY2 ("barepred", &$2);} ; markpred : PA1 barepred {$$=NodeY2("markpred", &$2);} | PO gap sentence gap {$$=NodeY ("markpred", 4, &$4);} | NO4 markpred {$$=NodeY2 ("markpred", &$2);} ; backpred1 : barepred {$$=NodeY1 ("backpred1", &$1);} | markpred {$$=NodeY1 ("backpred1", &$1);} /* | kekpred {$$=NodeY1 ("backpred1", &$1);}*/ | NO2 backpred1 {$$=NodeY2 ("backpred1", &$2);} ; backpred : backpred1 {$$=NodeY1 ("backpred", &$1);} | backpred1 ACI backpred{$$=NodeY ("backpred", 3, &$3);} ; bareekpred: barefront A1 backpred {$$=NodeY ("bareekpred", 3, &$3);} ; barefront : barepred {$$=NodeY1 ("barefront", &$1);} | bareekpred termset {$$=NodeY2 ("barefront", &$2);} ; markekpred: markfront A1 backpred {$$=NodeY ("markekpred", 3, &$3);} ; markfront : markpred {$$=NodeY1 ("markfront", &$1);} | markekpred termset {$$=NodeY2 ("markfront", &$2);} ; predicate2: barefront {$$=NodeY1 ("predicate2", &$1);} | markfront {$$=NodeY1 ("predicate2", &$1);} | NO2 predicate2 {$$=NodeY2 ("predicate2", &$2);} ; predicate1: predicate2 {$$=NodeY1 ("predicate1", &$1);} | predicate2 AGE predicate1{$$=NodeY ("predicate1", 3, &$3);} ; identpred : BI termset {$$=NodeY2 ("identpred", &$2);} | NO4 identpred {$$=NodeY2 ("identpred", &$2);} ; kekpred : kekpredunit {$$=NodeY1 ("kekpred", &$1);} | kekpred despredD {$$=NodeY2 ("kekpred", &$2);} ; predicate : predicate1 {$$=NodeY1 ("predicate", &$1);} | identpred {$$=NodeY1 ("predicate", &$1);} ; gasent : PA1 barepred GA2 terms {$$=NodeY ("gasent", 4, &$4);} | NO2 gasent {$$=NodeY2 ("gasent", &$2);} ; statement : gasent {$$=NodeY1 ("statement", &$1);} | terms gasent {$$=NodeY2 ("statement", &$2);} | terms predicate {$$=NodeY2 ("statement", &$2);} ; keksent : KA3 sentence KI uttA1 {$$=NodeY ("keksent", 4, &$4);} | KA3 gap sentence KI uttA1 {$$=NodeY ("keksent", 5, &$5);} | KA3 headterms sentence KI uttA1{$$=NodeY ("keksent", 5, &$5);} | NO3 keksent {$$=NodeY2 ("keksent", &$2);} ; sen1 : predicate {$$=NodeY1 ("sen1", &$1);} | statement {$$=NodeY1 ("sen1", &$1);} | keksent {$$=NodeY1 ("sen1", &$1);} ; sentence : sen1 {$$=NodeY1 ("sentence", &$1);} | sentence ICA sen1 {$$=NodeY3 ("sentence", &$3);} ; headterms : terms GI {$$=NodeY2 ("headterms", &$2);} | headterms terms GI{$$=NodeY3 ("headterms", &$3);} ; uttA : A4 {$$=NodeY1 ("uttA", &$1);} | IE {$$=NodeY1 ("uttA", &$1);} | mex {$$=NodeY1 ("uttA", &$1);} ; uttAx : headterms sentence gap {$$=NodeY3 ("uttAx", &$3);} ; uttA1 : uttA {$$=NodeY1 ("uttA1", &$1);} | uttAx {$$=NodeY1 ("uttA1", &$1);} | NO4 {$$=NodeY1 ("uttA1", &$1);} | terms {$$=NodeY1 ("uttA1", &$1);} | links {$$=NodeY1 ("uttA1", &$1);} | linkargs {$$=NodeY1 ("uttA1", &$1);} | sen1 {$$=NodeY1 ("uttA1", &$1);} | argmod {$$=NodeY1 ("uttA1", &$1);} | terms keksent {$$=NodeY2 ("uttA1", &$2);} ; freemod : UI {$$=NodeY1 ("freemod", &$1);} | SOI descpred gap {$$=NodeY3 ("freemod", &$3);} | DIE {$$=NodeY1 ("freemod", &$1);} | NO4 DIE {$$=NodeY2 ("freemod", &$2);} | KIE utterance KIU {$$=NodeY3 ("freemod", &$3);} | HUE statement gap {$$=NodeY3 ("freemod", &$3);} | HUE terms gap {$$=NodeY3 ("freemod", &$3);} | voc {$$=NodeY1 ("freemod", &$1);} | JO {$$=NodeY1 ("freemod", &$1);} ; neghead : NO4 gap {$$=NodeY2 ("neghead", &$2);} ; uttC : uttA1 {$$=NodeY1 ("uttC", &$1);} | neghead uttC {$$=NodeY2 ("uttC", &$2);} ; uttD : uttC {$$=NodeY1 ("uttD", &$1);} | uttC ICI uttD {$$=NodeY3 ("uttD", &$3);} ; uttE : uttD {$$=NodeY1 ("uttE", &$1);} | uttE ICA uttD {$$=NodeY3 ("uttE", &$3);} ; uttF : uttE {$$=NodeY1 ("uttF", &$1);} | uttF I uttE {$$=NodeY3 ("uttF", &$3);} utterance : I {$$=NodeY1 ("utterance", &$1);} | freemod {$$=NodeY1 ("utterance", &$1);} | uttF {$$=NodeY1 ("utterance", &$1);} | I uttF {$$=NodeY2 ("utterance", &$2);} | ICA uttF {$$=NodeY2 ("utterance", &$2);} | uttE IGE utterance{$$=NodeY3 ("utterance", &$3);} ; %%