% Autor: Hans Leiß, LMU, CIS, Syntax natürlicher Sprachen, WS 2016/17

% Aus Metaregeln DCG-Satzregeln erzeugen und in saetze.pl schreiben:
:- [saetze-meta].
:- ersetze_metaregeln.

% DCG-Regeln in Prolog-Klauseln übersetzen, Baumdarstellung
:- ['DCGparser/parser.pl'].   

% Grammatiken laden:
:- [nominalphrasen, koordinationen, saetze].

% Startsymbole:
startsymbol(np([_Pers,_Gen,_Num,_Fig],[_Kas])). % einf+koord. NPs
startsymbol(s([_Art,_Fig],[_Temp,_Mod,_Vst])).  % einf+koord. Sätze
startsymbol(advp([_Art],[])).                   % einf.Adverbiale

% Lexikon laden: die Wörter der Beispiellexika, gesammelt
:- ['syntax16.wrd'].
word(W,Cat) :- syntax16:word(W,Cat).

pron(Art,Form) --> [W], { word(W,pron(Art,Form)) }.
pn(Art,Form) --> [W], { word(W,pn(Art,Form)) }.
cn(Art,Form) --> [W], { word(W,cn(Art,Form)) }.
mn(Art,Form) --> [W], { word(W,mn(Art,Form)) }.
na(Art,Form) --> [W], { word(W,na(Art,Form)) }.
nv(Art,Form) --> [W], { word(W,nv(Art,Form)) }.
n(Art,Form) --> [W], { word(W,n(Art,Form)) }.
art(Art,Form) --> [W], { word(W,art(Art,Form)) }.
qnt(Art,Form) --> [W], { word(W,qnt(Art,Form)) }.
poss(Art,Form) --> [W], { word(W,poss(Art,Form)) }.
a(Art,Form) --> [W], { word(W,a(Art,Form)) }.
v(Art,Form) --> [W], { word(W,v(Art,Form)) }.
adv(Art,Form) --> [W], { word(W,adv(Art,Form)) }.
prep(Art,Form) --> [W], { word(W,prep(Art,Form)) }.
subj(Art,Form) --> [W], { word(W,subj(Art,Form)) }.
kor(Art,Form) --> [W], { word(W,kor(Art,Form)) }.

