20. English Reg.Ex
This is my attempt to write English grammar in the form of regular expression for the purpose of learning English.
This is far from complete or correct. This is just a template for future work.
20.1 Verb Forms
There are about 5 verb forms in English. They are listed below.
Note:
- 3rd person - Conjugation of s/es
to a verb or auxiliary verb happens to the first one verb only.
- He likes # like is first verb
- He does like # do is first ver
Notes:
- Past participle = Perfect Aspect
- Present participle = Progressive Aspect
Base or Raw | Past Simple | Perfect Aspect | Progressive Aspect | 3rd person. Sing. Present. Simple |
---|---|---|---|---|
be | was, were | been | being | am, are, is |
have | had | had | having | has |
do | did | done | doing | does |
lie | lied | lied | lying | lies |
lay | laid | laid | laying | lays |
20.2 Tense
20.2.1 Present Simple
refresh the page if you don't see following images clearly
-
Positive sentence. (subject)(base_form)
-
Negative sentence.
(subject)(auxiliary_verb)?(not)?(base_form)(noun)?
-
Question sentences. (auxiliary_verb)(subject)(not)?(base_form)(noun)?
-
Present Simple with main verb be
- (subject)(base_verb)(not)?(noun)?
- I am / We are
- You are / You are
- He,She,It is / They are
- Negative present Simple with main verb be
- (base_verb)(subject)(not)?(noun)?
- Am I not / Are We
- Are You / Are You
- Is He,She,It / Are They