Skip to content

Commit

Permalink
Merge pull request #26 from 422404/feature/comments
Browse files Browse the repository at this point in the history
Feature/comments
  • Loading branch information
422404 committed Jun 10, 2021
2 parents 1356a0e + f902e95 commit 499a1d8
Show file tree
Hide file tree
Showing 14 changed files with 391 additions and 326 deletions.
Binary file modified docs/_build/doctrees/environment.pickle
Binary file not shown.
Binary file modified docs/_build/doctrees/syntax.doctree
Binary file not shown.
12 changes: 12 additions & 0 deletions docs/_build/html/_sources/syntax.rst.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
Language syntax
===============

Comments
--------

Comments can be added into code like so::

/* a comment */

/* A
* multi-line
* comment
*/

Basic types
-----------

Expand Down
2 changes: 1 addition & 1 deletion docs/_build/html/searchindex.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions docs/_build/html/syntax.html
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="index.html">Actor Lang</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Language syntax</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#comments">Comments</a></li>
<li class="toctree-l2"><a class="reference internal" href="#basic-types">Basic types</a></li>
<li class="toctree-l2"><a class="reference internal" href="#maths">Maths</a></li>
<li class="toctree-l2"><a class="reference internal" href="#string-concatenation">String concatenation</a></li>
Expand Down Expand Up @@ -178,6 +179,18 @@

<div class="section" id="language-syntax">
<h1>Language syntax<a class="headerlink" href="#language-syntax" title="Permalink to this headline"></a></h1>
<div class="section" id="comments">
<h2>Comments<a class="headerlink" href="#comments" title="Permalink to this headline"></a></h2>
<p>Comments can be added into code like so:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="o">/*</span> <span class="n">a</span> <span class="n">comment</span> <span class="o">*/</span>

<span class="o">/*</span> <span class="n">A</span>
<span class="o">*</span> <span class="n">multi</span><span class="o">-</span><span class="n">line</span>
<span class="o">*</span> <span class="n">comment</span>
<span class="o">*/</span>
</pre></div>
</div>
</div>
<div class="section" id="basic-types">
<h2>Basic types<a class="headerlink" href="#basic-types" title="Permalink to this headline"></a></h2>
<ul class="simple">
Expand Down
12 changes: 12 additions & 0 deletions docs/syntax.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
Language syntax
===============

Comments
--------

Comments can be added into code like so::

/* a comment */

/* A
* multi-line
* comment
*/

Basic types
-----------

Expand Down
2 changes: 2 additions & 0 deletions src/main/antlr/org/actorlang/antlr/gen/ActorLang.g4
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ grammar ActorLang;

WS: [ \r\t\n]+ -> channel(HIDDEN);

COMMENT: '/*' .*? '*/' -> channel(HIDDEN);

fragment Digit: [0-9] ;
IntegerLiteral: Digit+ ;
StringLiteral: '"' (('\\' .) | ~'"')* '"';
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/org/actorlang/antlr/gen/ActorLang.interp

Large diffs are not rendered by default.

141 changes: 71 additions & 70 deletions src/main/java/org/actorlang/antlr/gen/ActorLang.tokens
Original file line number Diff line number Diff line change
@@ -1,73 +1,74 @@
T__0=1
WS=2
IntegerLiteral=3
StringLiteral=4
True=5
False=6
Self=7
Create=8
Become=9
Display=10
Send=11
To=12
If=13
Else=14
For=15
In=16
Put=17
Identifier=18
LParen=19
RParen=20
LBracket=21
RBracket=22
LCurly=23
RCurly=24
Comma=25
Semi=26
Assign=27
Eq=28
Neq=29
Lower=30
Leq=31
Greater=32
Geq=33
And=34
Or=35
Plus=36
Minus=37
Star=38
Slash=39
Percent=40
Not=41
COMMENT=3
IntegerLiteral=4
StringLiteral=5
True=6
False=7
Self=8
Create=9
Become=10
Display=11
Send=12
To=13
If=14
Else=15
For=16
In=17
Put=18
Identifier=19
LParen=20
RParen=21
LBracket=22
RBracket=23
LCurly=24
RCurly=25
Comma=26
Semi=27
Assign=28
Eq=29
Neq=30
Lower=31
Leq=32
Greater=33
Geq=34
And=35
Or=36
Plus=37
Minus=38
Star=39
Slash=40
Percent=41
Not=42
'..'=1
'true'=5
'false'=6
'self'=7
'create'=8
'become'=9
'display'=10
'send'=11
'to'=12
'if'=13
'else'=14
'for'=15
'in'=16
'put'=17
'('=19
')'=20
'['=21
']'=22
'{'=23
'}'=24
','=25
';'=26
'=='=28
'<'=30
'>'=32
'&&'=34
'||'=35
'+'=36
'-'=37
'*'=38
'/'=39
'%'=40
'true'=6
'false'=7
'self'=8
'create'=9
'become'=10
'display'=11
'send'=12
'to'=13
'if'=14
'else'=15
'for'=16
'in'=17
'put'=18
'('=20
')'=21
'['=22
']'=23
'{'=24
'}'=25
','=26
';'=27
'=='=29
'<'=31
'>'=33
'&&'=35
'||'=36
'+'=37
'-'=38
'*'=39
'/'=40
'%'=41
5 changes: 4 additions & 1 deletion src/main/java/org/actorlang/antlr/gen/ActorLangLexer.interp

Large diffs are not rendered by default.

0 comments on commit 499a1d8

Please sign in to comment.