----------------------------------------------------------- Note from Julie: The non-terminal in this grammar requires that your program handle the possibility of the empty production- a production with zero words. Your program is supposed to deal with this, it just means that the non-terminal then expands to nothing, this allows for an optional expansion. If you have trouble with grammar and not others, it might be because you didn't handle this case correctly. ------------------------------------------------------------ From: hughescr@leland.Stanford.EDU (Craig R. Hughes) Here's a grammar I essentially transcribed from a nifty Mac GNUware program. I haven't checked it very thoroughly, so it may be that it has a bunch of typos, etc. in it. Anyway, it's GNUware, so I guess maybe I should say that at the top.... This grammar is extracted from the STR# resources of a GNUware program for the Mac called Kant Generator. (source available on info-mac and its mirrors). Feel free as heck to copy/reuse/etc. any or all of this, because that is what it is for. The only condition if you do use it is that this same condition apply to anything you use it in. Check the GNU licence for details. { and ; but ; yet ; } { all of ; some of ; none of ; } { Aristotle ; Hume ; Galileo ; Locke ; } { pure ; practical ; human ; natural ; } { a priori ; a posteriori ; possible ; actual ; } { intelligible ; transcendental ; empirical ; abstract ; } { general ; applied ; pure ; formal ; first order ; transcendental ; } { universal ; necessary ; practical ; contradictory ; sufficient ; } { ; } { ; ; } { hypothetical ; problematic ; analytic ; synthetic ; ampliative ; deductive ; inductive ; speculative ; disjunctive ; ; } { . ; . ; . ; } { , ; ; } { ; ; } { , ; ; } { , , ; ; } { , ; ; } This is the production that requires special handling. It expands to nothingness, so an empty production. This may require a little re-writing of your RSG. { ; } { in all theoretical sciences ; in view of these considerations ; thus ; by means of ; in the study of ; therefore with the sole exception of ; certainly ; still ; as I have elsewhere shown ; on the other hand ; for these reasons ; in the case of ; however ; in natural theology ; consequently ; } { are what first give rise to ; have lying before them ; constitute the whole content for ; would thereby be made to contradict ; can not take account of ; have nothing to do with ; stand in need to ; are the clue to the discovery of ; prove the validity of ; are just as as ; are a representation of ; exclude the possibility of ; } { the Antinomies ; the paralogisms ; the paralogisms of reason ; the Categories ; our sense perceptions ; our faculties ; our judgements ; our judgements ; the objects in space and time ; the things in themselves ; natural causes ; our ideas ; our concepts ; our concepts ; the objects in space and time ; the objects in spacee and time ; the noumena ; the phenomena ; } { ; ( ) ; ; } { ; ; } { ; ; } { ; ; } { (and this is true), ; , , ; ; } { , ; , ; ; } { , , ; , , ; ; } { ; ; ; ; ; ; } { ; ; } { it must not be supposed that ; there can be no doubt that ; we can deduce that ; it is not at all certain that ; tells us ; it remains a mystery why ; I assert that ; to avoid all misapprehension, it is necessary to explain that ; let us suppose that ; it is obvious that ; the reader should be careful to observe that ; what we have alone been able to show is that ; } { in so far as this expounds the rules of ; when treated as ; in other words ; in the full sense of these terms ; insomuch as relies on ; indeed ; then ; that is to say ; even as this relates to ; in respect of the intelligible character ; so regarded ; for example ; irrespective of all empirical conditions ; so far as regards ; so far as regards and ; on the contrary ; in accordance with the principles of ; in reference to ends ; in particular ; so far as I know ; } { because of our necessary ignorance of the conditions ; as is shwon in the writings of ; as is proven in the ontological manuals ; as any dedicated reader can clearly see ; as is evident upon close examination ; as will easily be shown in the next section ; since knowledge of is ; by virtue of reason ; as we have already seen ; since are ; because of the relationship between and ; by means of analysis ; by means of analytic unity ; } { Whence comes , the solution of which involves the relation between and ? ; is it the case that , or is the real question whether ? ; Has it ever been suggested the there is a causal connection between and ? ; In which of our cognitive faculties are and connected together? ; can I entertain in thought, or does it present itself to me? ; } { , , ; ; } { pure ; practical ; } { the transcendental aesthetic ; logic ; the Ideal of reason ; the architectonic of reason ; the discipline of reason ; the employment of ; the Ideal ; the manifold ; the Transcendental Deduction ; our experience ; philosophy ; metaphysics ; the thing in itself ; our understanding ; our knowledge ; reason ; reason ; space ; time ; the transcendental unity of apperception ; necessity ; the never-ending regress in the series of empirical conditions ; } { is what first gives rise to ; can thereby determine in its totality ; has lying before it ; constitutes the whole content for ; may not contradict itself, but it is still possible that it may be in contradiction with ; woudl thereby be made to contradict ; teaches us nothing whatsoever regarding the content of ; can not take account of ; has nothing to do with ; stands in need of ; is the key to understanding ; proves the validity of ; is just as necessary as ; is the clue to the discovery of ; is a representation of ; depends on ; excludes the possibility of ; } { is the mere result of the power of , a blind but indispensable function of the soul ; occupies part of the sphere of concerning the existence of in general ; is by its very nature contradictory ; would be falsified ; abstracts from all content of knowledge ; is a body of demonstrated doctrine, and it must be known ; can never furnish a true and demonstrated science, because, like , it principles ; can be treated like ; shoudl only be used as a canon for ; exists in ; } { are the mere results of the power of , a blind but indispensible function of the soul ; occupy part of the sphere of concerning the existence of in general ; are by their very nature contradictory ; would be falsified ; abstract from all content of knowledge ; constitute a body of demonstrated doctrine, and this body must be known ; can never, as a whole, furnish a true and demonstrated science, because, like , they principles ; can be treated like ; should only be used as a canon for ; exist in ; } { But we have fallen short of the necessary interconnection that we have in mind when we speak of . ; We thus have a pure synthesis of apprehension. ; And similarly with all the others. ; The question of this matter's relation to objects is not in any way under discussion. ; This distinction must have some ground in the nature of . ; The divisions are thus provided, all that is required is to fill them. ; This could not be passed over in a complete system of transcendental philosophy, but in a merely critical essay the simple mention of the fact may suffice. ; This is not something we are in a position to establish. ; This is the sense in which it is to be understood in this work. ; But this need not worry us. ; Let us apply this to . ; But to this matter no answer is possible. ; But the proof of this is a task from which we can here be absolved. ; But at present we shall turn our attention to . ; This may become clear with an example. ; I feel I have sufficiently shown this to be true. ; This is what chiefly concerns us. ; On this matter, what has been said already should in any case suffice by itself. ; In my present remarks I am referring to only in so far as it is founded on principles. ; But this is to be dismissed as random grouping. ; } -------------END CUT HERE----------------- There. The only down-side to this is that the original program was a little cleverer than the one in the assignment, and it did things like capitalise first letters of setences, etc. It also had a more flexible grammar structure, so I've had to approximate the original grammar somewhat, and add a few non-terminals. Also, it is unclear whether the assignment's grammar structure allows for empty productions. I guess they should be OK, so I'll have to rewrite my current program somewhat. sigh. Anyway, if they are/should be allowed, change the production for above accordingly. Craig. /-----------------------------------------------------\ |Craig Hughes Financial Manager, | |PO Box 10496, Rm.201, Hammarskjold,| |Stanford, CA 94309, Stanford, CA 94305, | |USA USA | | Craig Hughes | \-----------------Tel: (415) 497-6991-----------------/