Introduction
This is the solution for the assignment of John, see problem 2 on this page:http://cs.aaue.dk/contribution/courses/spring2006/f6s/ppar/08pp.htm
This is a cute danish to english translator which is built for the purpose of experience the conception of compiler and practising the programming skill of compiler-construction.
Maybe it is not a so nice project, but at least it is a workable gadget. If you are interested in it, you could download it and refine it, but pls don't forget to comment for it, or at least let me know where the shortcoming is: )
Hereby I atteched grammar on below, also you can find on John's website.
sentence -> subject sentence_verb | subject sentence_verb direct_object
subject -> "en" noun | "en" list_of_adjectives noun
sentence_verb -> verb
direct_object -> preposition "en" noun
list_of_adjectives -> adjective | adjective "," list_of_adjectives
adjective -> "pæn" | "tyk" | "umotiveret" | "grøn" | "klog"
noun -> "studerende" | "traktor" | "bolig" | "lærer" | "kompostbeholder" |
"lektion" | "vej"
verb -> "vil" | "underviser" | "sover" | "kører"
preposition -> "under" | "på" | "mellem" | "i"
This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.
A list of licenses authors might use can be found here