Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds imports and some dead code cleanup #77

Merged
merged 17 commits into from
Jul 10, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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