Skip to content

Commit

Permalink
Merge pull request #77 from m-lyons/master
Browse files Browse the repository at this point in the history
Adds imports and some dead code cleanup
  • Loading branch information
mtrberzi authored Jul 10, 2016
2 parents 7c1dc08 + 95e8cae commit 75b1f72
Show file tree
Hide file tree
Showing 47 changed files with 1,378 additions and 1,434 deletions.
441 changes: 182 additions & 259 deletions README.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ checkstyle {
configFile = new File(rootDir, "checkstyle.xml")
ignoreFailures = false
showViolations = true
toolVersion = "5.9"
toolVersion = "6.18"
}

antlr4 {
Expand Down
14 changes: 11 additions & 3 deletions src/main/antlr4/Manifold.g4
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ LINE_COMMENT: '//' ~[\r\n]* -> skip;
INTEGER_VALUE: [0-9]+;
BOOLEAN_VALUE: 'false' | 'true';
TYPE_KEYWORD: 'Type';
STRING_VALUE: '"' ( '\"' | ~["] )*? '"';
VISIBILITY_PUBLIC: 'public';
tupleTypeValueEntry: (IDENTIFIER ':')? typevalue ('=' expression)?;
tupleTypeValue: '(' tupleTypeValueEntry (',' tupleTypeValueEntry)* ')';
Expand Down Expand Up @@ -76,10 +79,11 @@ rvalue:
| INTEGER_VALUE # Integer
| functionValue # Function
| reference rvalue # FunctionInvocationExpression // TODO: function invocation needs to be 'reference arglist'
| reference # RValueExpression
| lvalue '=' rvalue # AssignmentExpression
| reference # ReferenceExpression
| VISIBILITY_PUBLIC? lvalue '=' rvalue # AssignmentExpression
| 'primitive' 'port' typevalue (':' tupleTypeValue)? # PrimitivePortDefinitionExpression
| 'primitive' 'node' functionTypeValue # PrimitiveNodeDefinitionExpression
| 'import' STRING_VALUE #ImportExpr
;
lvalue:
Expand All @@ -89,10 +93,14 @@ lvalue:
;
// TODO: declarations as expressions
expression: /* declaration | */ rvalue;
expression:
rvalue
// | declaration
;
EXPRESSION_TERMINATOR: ';';
////////////////////////////////////////////////////////
// //
// Schematic //
Expand Down
Loading

0 comments on commit 75b1f72

Please sign in to comment.