What are the grammatically valid sentence structures for Japanese?


This is a hard to explain question, but if someone found this board through
stackoverflow (I guess that happened to many of us) he/she will understand
better what I'm asking (moreover if once you had to make a compiler). Is there
a list with all the valid Japanese syntactic structures? (well, I guess
translators have to work with that, so it has to exist?)

For example, one structure ("rule") would be subject-wa-object-verb . And this
would be useful to check if you are writting or saying rightly any sentence
when you have doubts.

For example, a common question is, where can I add a word that refers to time?
is there only one place? (today, yesterday, tomorrow, etc.). What are the
rules that prevent me from doing so? **I.e. What is the set of syntax rules
that inform me if a particular modification to the sentence is valid?**

I know real languages are more complex than programming languages but yet
maybe all these set of rules can be written and someone did.



[code]

              [programming] tag,  BNF
              fundamental rule(s) of a Japanese sentence
    
[/code]

This (below) seems pretty good. If there's a similar version (rules for Jp
sentence) in English, i'd like to see it.

From <http://www5b.biglobe.ne.jp/~shu-sato/nihonbun.htm>:

> 日本語の文の構造
>
> （１） 文 ＝ （連用句）＋（体言句）＋ 用言句
>
> （２） 用言句 ＝（連用句）＋  
>  ｛動詞 または  
>  形容詞 または  
>  形容動詞 または  
>  ［名詞句 ＋（助詞）＋「だ」等の助動詞］｝  
>  ＋（助動詞）＋（終助詞）
>
> （３） 体言句 ＝ 名詞句 ＋（格助詞）＋（副助詞）
>
> （４） 名詞句 ＝ （連体句）＋  
>  ｛名詞 または  
>  ［文・用言句 ＋（準体助詞）］
>
> （５） 連用句 ＝ ｛副詞 または  
>  用言句（連用形） または  
>  ［文・用言句 ＋（接続助詞）］｝  
>  ＋（副助詞）
>
> （６） 連体句 ＝ ..................

* * *

Knowing these rules immediately helped me parse these sentences:

  1. そのモンスター撃退で経験値は何点来る？ 

  2. そのモンスター撃退で来る経験値は何点？ 
[code]       （１）　文　＝　（連用句）＋（体言句）＋　[用言句]

    
[/code]

    1. （連用句）( そのモンスター撃退で ) ＋ （体言句）(経験値は) ＋（体言句）(何点) ＋ [用言句][来る]？ 

    2. （体言句）( そのモンスター撃退で来る経験値は ) ＋（体言句）(何点)？ -- ( [用言句] [ですか]? is probably omitted)



[code]

              [programming] tag,  BNF
              fundamental rule(s) of a Japanese sentence
    
[/code]

This (below) seems pretty good. If there's a similar version (rules for Jp
sentence) in English, i'd like to see it.

From <http://www5b.biglobe.ne.jp/~shu-sato/nihonbun.htm>:

> 日本語の文の構造
>
> （１） 文 ＝ （連用句）＋（体言句）＋ 用言句
>
> （２） 用言句 ＝（連用句）＋  
>  ｛動詞 または  
>  形容詞 または  
>  形容動詞 または  
>  ［名詞句 ＋（助詞）＋「だ」等の助動詞］｝  
>  ＋（助動詞）＋（終助詞）
>
> （３） 体言句 ＝ 名詞句 ＋（格助詞）＋（副助詞）
>
> （４） 名詞句 ＝ （連体句）＋  
>  ｛名詞 または  
>  ［文・用言句 ＋（準体助詞）］
>
> （５） 連用句 ＝ ｛副詞 または  
>  用言句（連用形） または  
>  ［文・用言句 ＋（接続助詞）］｝  
>  ＋（副助詞）
>
> （６） 連体句 ＝ ..................

* * *

Knowing these rules immediately helped me parse these sentences:

  1. そのモンスター撃退で経験値は何点来る？ 

  2. そのモンスター撃退で来る経験値は何点？ 
[code]       （１）　文　＝　（連用句）＋（体言句）＋　[用言句]

    
[/code]

    1. （連用句）( そのモンスター撃退で ) ＋ （体言句）(経験値は) ＋（体言句）(何点) ＋ [用言句][来る]？ 

    2. （体言句）( そのモンスター撃退で来る経験値は ) ＋（体言句）(何点)？ -- ( [用言句] [ですか]? is probably omitted)

