unreachable code;
	symbol(value) not implemented.
master
bill 4 years ago
parent ecb8d23418
commit 2ab3fddc66

@ -39,7 +39,7 @@ import java.util.ArrayList;
/** Return a terminal symbol of syntactic category TYPE and no
* semantic value at the current source location. */
private Symbol symbol(int type) {
return symbol(type);
return symbol(type, null);
}
/** Return a terminal symbol of syntactic category TYPE and semantic
@ -142,8 +142,9 @@ if True:
if(top()< currIndent)
{
/*
If current indentation is more than indents current level should have,
start a new level which will have `currIndent' spaces.
If current indentation is more than the number of indents
current level should have, start a new level which will have
`currIndent' indents.
*/
push(currIndent);
return symbol(ChocoPyTokens.INDENT, currIndent);
@ -153,7 +154,7 @@ if True:
<AFTER> {
/* Delimiters. */
{LineBreak} { return symbol(ChocoPyTokens.NEWLINE); yybegin(YYINITIAL); currIndent = 0;}
{LineBreak} { yybegin(YYINITIAL); currIndent = 0;return symbol(ChocoPyTokens.NEWLINE);}
":" { return symbol(ChocoPyTokens.COLON); }
"," { return symbol(ChocoPyTokens.COMMA); }

Loading…
Cancel
Save