Skip to content

Commit

Permalink
Merge pull request #193 from Typee-Language/master
Browse files Browse the repository at this point in the history
#160-Front-End Parser Tests enhancement
  • Loading branch information
schmouk committed Feb 14, 2019
2 parents 7d9ea31 + 43cdf12 commit efaf25b
Show file tree
Hide file tree
Showing 75 changed files with 2,388 additions and 871 deletions.
47 changes: 30 additions & 17 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,48 @@
---
name: Bug report
about: Create a report to help us improve
about: Create a report to help us improve Typee environment

---

**Describe the bug**
A clear and concise description of what the bug is.

[_A clear and concise description of what the bug is._]
[_May deal with translator internal error,
erroneous translated syntax or unexpected behavior
when running translated code._]


**To Reproduce**

Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

[_Ex._
1. _Directory Tree: Xxx/Yyy/Zzz/_
2. _Translated Typee module: mmm.ty_
3. _Command line as typed for translation: typee -opt1 -opt2 ..._
4. ...
5. ...
6. ... _any other valuable information to reproduce the error_]


**Expected behavior**
A clear and concise description of what you expected to happen.

[_A clear and concise description of what you expected to happen._]


**Screenshots**
If applicable, add screenshots to help explain your problem.

[_If applicable, add screenshots to help explain your problem._]


**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
- OS: [_e.g. iOS, MacOS X, Win32, Win64, Linux/Ubuntu, Linux/Fedora, ..._]
- Version [_e.g. 8_]
- Translator: [_e.g. C++17, C#, Java 8.1, Java for Android 9, Python 3.8, ..._]


**Additional context**
Add any other context about the problem here.

[_Add any other context about the problem here._]
[_For instance, you may copy here Typee code and finally erroneous translated code._]
17 changes: 12 additions & 5 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,24 @@
---
name: Feature request
about: Suggest an idea for this project
about: Suggest an idea to enhance Typee project

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

[_A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]_]


**Describe the solution you'd like**
A clear and concise description of what you want to happen.

[_A clear and concise description of what you want to happen._]


**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

[_A clear and concise description of any alternative solutions or features you've considered._]


**Additional context**
Add any other context or screenshots about the feature request here.

[_Add any other context or screenshots about the feature request here._]
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ __pycache__
* - Copie.grm
*-new.grm
* - Copy.grm
UML*
20 changes: 16 additions & 4 deletions Language-specifications/typee_specs_LL1-v9-1-EBNF.grm
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,11 @@ SOFTWARE.
( <dotted name'> | <function call> |
<subscription or slicing> )*

<atom> ::= [<decr>|<incr>] <dotted name> [<decr>|<incr>] |
<enclosure> | <reference> | <scalar> |
<string> | <boolean>
<atom> ::= (<decr>|<incr>) <dotted name> [<decr>|<incr>] |
<dotted name>
[<decr> | <incr> | <for comprehension> ] |
<enclosure> | <reference> | <scalar> |
<string> | <boolean>

<boolean> ::= <TRUE> | <FALSE>

Expand Down Expand Up @@ -341,7 +343,17 @@ SOFTWARE.
<simple statement end> ::= ';'

<statements block> ::= '{' [<statements list>] '}' |
[<nop statement>] <simple statement end>
(<empty statement>)* |
<compound statement> | <simple statement>


<statements block> ::= '{' <statements list> '}'
| <empty statement> <statements block> ###
| <compound statement> ###
| <simple statement> ###
## | <nop statement> <simple statement end> ###
## | <simple statement end> ###


<assert statement> ::= 'assert' <expression> ( ',' <expression>)*

Expand Down
14 changes: 9 additions & 5 deletions Language-specifications/typee_specs_LL1-v9-1.grm
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,14 @@ SOFTWARE.

<atom> ::= <decr> <dotted name> <incr or decr>
| <incr> <dotted name> <incr or decr>
| <dotted name> <incr or decr>
| <dotted name> <atom'>
| <enclosure>
| <reference>
| <scalar>
| <string>
| <boolean>
<atom'> ::= <incr or decr>
| <for comprehension>

<boolean> ::= <TRUE>
| <FALSE>
Expand All @@ -64,7 +66,9 @@ SOFTWARE.

<incr> ::= '++'

<incr or decr> ::= <decr> | <incr> | EPS
<incr or decr> ::= <decr>
| <incr>
| EPS

<is instance of> ::= '->' <dotted name>

Expand Down Expand Up @@ -472,9 +476,9 @@ SOFTWARE.
<simple statement end> ::= ';'

<statements block> ::= '{' <statements list> '}'
| <nop statement> <simple statement end>
| <simple statement end>

| <compound statement>
| <empty statement> <statements block>
| <simple statement>

<assert statement> ::= 'assert' <expression> <assert statement'>
<assert statement'> ::= ',' <expression>
Expand Down
32 changes: 16 additions & 16 deletions Notepad++XML-configs/grammars.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<Keywords name="Numbers, suffix1"></Keywords>
<Keywords name="Numbers, suffix2"></Keywords>
<Keywords name="Numbers, range"></Keywords>
<Keywords name="Operators1"></Keywords>
<Keywords name="Operators1">* +</Keywords>
<Keywords name="Operators2"></Keywords>
<Keywords name="Folders in code1, open"></Keywords>
<Keywords name="Folders in code1, middle"></Keywords>
Expand All @@ -25,39 +25,39 @@
<Keywords name="Folders in comment, middle"></Keywords>
<Keywords name="Folders in comment, close"></Keywords>
<Keywords name="Keywords1">::= | -</Keywords>
<Keywords name="Keywords2">EPS</Keywords>
<Keywords name="Keywords2">EPS EPSILON</Keywords>
<Keywords name="Keywords3"></Keywords>
<Keywords name="Keywords4"></Keywords>
<Keywords name="Keywords5"></Keywords>
<Keywords name="Keywords6"></Keywords>
<Keywords name="Keywords7"></Keywords>
<Keywords name="Keywords8"></Keywords>
<Keywords name="Delimiters">00&lt; 01 02&gt; 03&apos; 04\ 05&apos; 06&quot; 07\ 08&quot; 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23</Keywords>
<Keywords name="Delimiters">00[ 01\ 02] 03( 04\ 05) 06&quot; 07\ 08&quot; 09&apos; 10\ 11&apos; 12&lt; 13\ 14&gt; 15{ 16\ 17} 18$ 19 20; 21 22 23</Keywords>
</KeywordLists>
<Styles>
<WordsStyle name="DEFAULT" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="COMMENTS" fgColor="00A0A0" bgColor="FFFFFF" fontName="Courier New" fontStyle="3" nesting="0" />
<WordsStyle name="LINE COMMENTS" fgColor="000000" bgColor="FFFF00" fontName="Courier New" fontStyle="0" nesting="0" />
<WordsStyle name="DEFAULT" fgColor="000000" bgColor="FFFFFF" fontName="Consolas" fontStyle="0" fontSize="9" nesting="0" />
<WordsStyle name="COMMENTS" fgColor="00A0A0" bgColor="FFFFFF" fontName="" fontStyle="3" nesting="0" />
<WordsStyle name="LINE COMMENTS" fgColor="707070" bgColor="FFFFA8" fontName="" fontStyle="2" nesting="0" />
<WordsStyle name="NUMBERS" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS1" fgColor="008040" bgColor="FFFFFF" fontName="Courier New" fontStyle="1" nesting="0" />
<WordsStyle name="KEYWORDS2" fgColor="008040" bgColor="FFFFFF" fontName="Courier New" fontStyle="3" nesting="0" />
<WordsStyle name="KEYWORDS1" fgColor="008040" bgColor="FFFFFF" fontName="" fontStyle="1" nesting="0" />
<WordsStyle name="KEYWORDS2" fgColor="008040" bgColor="FFFFFF" fontName="" fontStyle="3" nesting="0" />
<WordsStyle name="KEYWORDS3" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS4" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS5" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS6" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS7" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS8" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="OPERATORS" fgColor="000000" bgColor="FFFF00" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="OPERATORS" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="FOLDER IN CODE1" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="FOLDER IN CODE2" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="FOLDER IN COMMENT" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS1" fgColor="0000A0" bgColor="FFFFFF" fontName="Courier New" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS2" fgColor="C86400" bgColor="FFFFFF" fontName="Courier New" fontStyle="1" nesting="0" />
<WordsStyle name="DELIMITERS3" fgColor="C86400" bgColor="FFFFFF" fontName="Courier New" fontStyle="1" nesting="0" />
<WordsStyle name="DELIMITERS4" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS5" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS6" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS7" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS1" fgColor="0000A0" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS2" fgColor="0000A0" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS3" fgColor="C86400" bgColor="FFFFFF" fontName="" fontStyle="1" nesting="0" />
<WordsStyle name="DELIMITERS4" fgColor="C86400" bgColor="FFFFFF" fontName="" fontStyle="1" nesting="0" />
<WordsStyle name="DELIMITERS5" fgColor="0000A0" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS6" fgColor="007979" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS7" fgColor="004040" bgColor="24F4FF" fontName="" fontStyle="2" nesting="0" />
<WordsStyle name="DELIMITERS8" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
</Styles>
</UserLang>
Expand Down
40 changes: 20 additions & 20 deletions Notepad++XML-configs/typee.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<NotepadPlus>
<UserLang name="typee" ext="ty typee" udlVersion="2.1">
<UserLang name="Typee" ext="ty typee TY TYPEE" udlVersion="2.1">
<Settings>
<Global caseIgnored="no" allowFoldOfComments="no" foldCompact="no" forcePureLC="0" decimalSeparator="0" />
<Prefix Keywords1="no" Keywords2="no" Keywords3="no" Keywords4="no" Keywords5="no" Keywords6="no" Keywords7="no" Keywords8="no" />
Expand All @@ -13,7 +13,7 @@
<Keywords name="Numbers, suffix1"></Keywords>
<Keywords name="Numbers, suffix2"></Keywords>
<Keywords name="Numbers, range"></Keywords>
<Keywords name="Operators1">@ &amp; / ^ : . | ! &gt; &lt; - % + * = &lt;= == != &gt;= -- ++ # ** ^^ @= &amp;= /= ^= |= != -= %= += *= ^^= **= &gt;&gt;&gt; &gt;&gt;&gt;= &lt;&lt;&lt; &lt;&lt;&lt;= &gt;&lt; &gt;&lt;= !! !!= :: ::=</Keywords>
<Keywords name="Operators1">@ &amp; / ^ : . | ! &gt; &lt; - % + * = &lt;= == != &gt;= -- ++ # ** ^^ @= &amp;= /= ^= |= != -= %= += *= ^^= **= &gt;&gt;&gt; &gt;&gt;&gt;= &lt;&lt;&lt; &lt;&lt;&lt;= &gt;&lt; &gt;&lt;= !! !!= :: ::= ?? ??= &lt;&lt; &lt;&lt;= &gt;&gt; &gt;&gt;=</Keywords>
<Keywords name="Operators2"></Keywords>
<Keywords name="Folders in code1, open">{</Keywords>
<Keywords name="Folders in code1, middle"></Keywords>
Expand All @@ -24,35 +24,35 @@
<Keywords name="Folders in comment, open"></Keywords>
<Keywords name="Folders in comment, middle"></Keywords>
<Keywords name="Folders in comment, close"></Keywords>
<Keywords name="Keywords1">abstract all and array as assert break case cast class continue const del elif else elseif elsif embed ensure enum except file False false final finally for forever from hidden if import in is lambda list map None none nop not operator or pass private protected public raise repeat require ret return set static switch True true try type unnamed until volatile while with</Keywords>
<Keywords name="Keywords2">? bool char char16 float32 float64 int8 int16 int32 int64 str str16 uint8 uint16 uint32 uint64 </Keywords>
<Keywords name="Keywords1">abstract all and array as assert break case cast class continue const del delete destroy elif else elseif elsif embed ensure enum except exclude exit file False false final finally for forever forward from fwd hidden if import in is lambda list map None none nop not operator or pass private protected public raise repeat require ret return set static switch True true try type unnamed until volatile while with</Keywords>
<Keywords name="Keywords2">? bool char char16 float32 float64 int8 int16 int32 int64 str str16 uint8 uint16 uint32 uint64</Keywords>
<Keywords name="Keywords3">me</Keywords>
<Keywords name="Keywords4"></Keywords>
<Keywords name="Keywords5"></Keywords>
<Keywords name="Keywords6"></Keywords>
<Keywords name="Keywords4">android cpp cs csharp java py python</Keywords>
<Keywords name="Keywords5">catch def define double Double enum extends implements ifdef ifndef include isinstance len none None NULL null object Object ref rethrow string System struct throw typedef typename typeof using void</Keywords>
<Keywords name="Keywords6">base Byte byte Boolean boolean Char complex decimal Decimal float int Int16 Int32 Int64 long SByte sbyte Single short string String uint UInt16 UInt32 UInt64 ulong undef unsigned ushort this</Keywords>
<Keywords name="Keywords7"></Keywords>
<Keywords name="Keywords8"></Keywords>
<Keywords name="Delimiters">00&quot; 01\ 02&quot; 03&apos; 04\ 05&apos; 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23</Keywords>
</KeywordLists>
<Styles>
<WordsStyle name="DEFAULT" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="COMMENTS" fgColor="808080" bgColor="FFFFFF" fontName="Courier New" fontStyle="2" nesting="0" />
<WordsStyle name="LINE COMMENTS" fgColor="808080" bgColor="FFFFFF" fontName="Courier New" fontStyle="2" nesting="0" />
<WordsStyle name="NUMBERS" fgColor="000000" bgColor="FFFFFF" fontName="Courier New" fontStyle="0" fontSize="10" nesting="0" />
<WordsStyle name="KEYWORDS1" fgColor="0000FF" bgColor="FFFFFF" fontName="Courier New" fontStyle="1" nesting="0" />
<WordsStyle name="KEYWORDS2" fgColor="0000C0" bgColor="FFFFFF" fontName="Courier New" fontStyle="3" fontSize="10" nesting="0" />
<WordsStyle name="KEYWORDS3" fgColor="000000" bgColor="FFFFFF" fontName="Courier New" fontStyle="3" fontSize="10" nesting="0" />
<WordsStyle name="KEYWORDS4" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS5" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS6" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="DEFAULT" fgColor="000000" bgColor="FFFFFF" fontName="Consolas" fontStyle="0" fontSize="9" nesting="0" />
<WordsStyle name="COMMENTS" fgColor="B95C00" bgColor="FFFFFF" fontName="" fontStyle="2" nesting="0" />
<WordsStyle name="LINE COMMENTS" fgColor="808080" bgColor="FFFFFF" fontName="" fontStyle="2" nesting="0" />
<WordsStyle name="NUMBERS" fgColor="339944" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS1" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="1" nesting="0" />
<WordsStyle name="KEYWORDS2" fgColor="0000C0" bgColor="FFFFFF" fontName="" fontStyle="3" nesting="0" />
<WordsStyle name="KEYWORDS3" fgColor="0000A0" bgColor="FFFFFF" fontName="" fontStyle="3" nesting="0" />
<WordsStyle name="KEYWORDS4" fgColor="0000A0" bgColor="FFFFFF" fontName="" fontStyle="3" nesting="0" />
<WordsStyle name="KEYWORDS5" fgColor="008080" bgColor="FFFFFF" fontName="" fontStyle="1" nesting="0" />
<WordsStyle name="KEYWORDS6" fgColor="008080" bgColor="FFFFFF" fontName="" fontStyle="3" nesting="0" />
<WordsStyle name="KEYWORDS7" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS8" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="OPERATORS" fgColor="0000C6" bgColor="FFFFFF" fontName="Courier New" fontStyle="0" fontSize="10" nesting="0" />
<WordsStyle name="OPERATORS" fgColor="FF8811" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="FOLDER IN CODE1" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="1" nesting="0" />
<WordsStyle name="FOLDER IN CODE2" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="FOLDER IN COMMENT" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS1" fgColor="008080" bgColor="FFFFFF" fontName="Courier New" fontStyle="2" nesting="0" />
<WordsStyle name="DELIMITERS2" fgColor="008080" bgColor="FFFFFF" fontName="Courier New" fontStyle="2" nesting="0" />
<WordsStyle name="DELIMITERS1" fgColor="008080" bgColor="FFFFFF" fontName="" fontStyle="2" nesting="0" />
<WordsStyle name="DELIMITERS2" fgColor="008080" bgColor="FFFFFF" fontName="" fontStyle="2" nesting="0" />
<WordsStyle name="DELIMITERS3" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS4" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS5" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
Expand Down
Loading

0 comments on commit efaf25b

Please sign in to comment.