Skip to content

Commit

Permalink
Merge pull request #199 from Typee-Language/master
Browse files Browse the repository at this point in the history
#150-Modify-Correct Parser code
  • Loading branch information
schmouk committed Feb 14, 2019
2 parents 54e24b2 + b1cd08e commit 07c8c75
Show file tree
Hide file tree
Showing 73 changed files with 2,156 additions and 568 deletions.
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*
12 changes: 11 additions & 1 deletion Language-specifications/typee_specs_LL1-v9-1-EBNF.grm
Original file line number Diff line number Diff line change
Expand Up @@ -343,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
6 changes: 3 additions & 3 deletions Language-specifications/typee_specs_LL1-v9-1.grm
Original file line number Diff line number Diff line change
Expand Up @@ -476,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 07c8c75

Please sign in to comment.