[e-cvs] cvs commit: e/src/jsrc/org/quasiliteral/term Functor.java SimpleTermBuilder.java Term.java Term.updoc TermLexer.java TermParser.java term.y
markm@eros.cs.jhu.edu
markm@eros.cs.jhu.edu
Tue, 6 Nov 2001 01:27:33 -0500
markm 01/11/06 01:27:33
Modified: src Makefile
src/csrc/setup eprops-template.txt
src/esrc/scripts setup.e
src/jsrc/org/erights/e/elang/syntax EBuilder.java
ELexer.java EParser.java e.y
src/jsrc/org/quasiliteral/astro AstroToken.java
src/jsrc/org/quasiliteral/term Functor.java
SimpleTermBuilder.java Term.java Term.updoc
TermLexer.java TermParser.java term.y
Log:
Fixed feRunner reporting bug. Term tree improvements
Revision Changes Path
1.120 +2 -2 e/src/Makefile
Index: Makefile
===================================================================
RCS file: /cvs/e/src/Makefile,v
retrieving revision 1.119
retrieving revision 1.120
diff -u -r1.119 -r1.120
--- Makefile 2001/09/23 05:14:48 1.119
+++ Makefile 2001/11/06 06:27:32 1.120
@@ -7,8 +7,8 @@
# Prefix tagging this release's attributes
PREFIX=E
-DOTVER=0.8.10alpha2
-TAGVER=0_8_10alpha2
+DOTVER=0.8.10beta1
+TAGVER=0_8_10beta1
RELEASE=working
TOP=..
1.23 +9 -0 e/src/csrc/setup/eprops-template.txt
Index: eprops-template.txt
===================================================================
RCS file: /cvs/e/src/csrc/setup/eprops-template.txt,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- eprops-template.txt 2001/10/27 17:27:41 1.22
+++ eprops-template.txt 2001/11/06 06:27:32 1.23
@@ -107,6 +107,15 @@
# TraceLog_causality=debug
+# If this property is set, JDK1.3's EventDispatchThread's
+# handleException(Throwable) will delegate exception reporting
+# to a newly made instance of this class name.
+#
+# For example: "org.erights.e.elib.prim.FEProblemHandler"
+
+sun.awt.exception.handler=${{sun.awt.exception.handler}}
+
+
# Where are copies of the "e" bash script placed? Since *.e scripts
# normally begin with the line "#!/usr/bin/env e", a *.e file won't be
# considered an executable file unless /usr/bin/env can find "e" on
1.19 +2 -1 e/src/esrc/scripts/setup.e
Index: setup.e
===================================================================
RCS file: /cvs/e/src/esrc/scripts/setup.e,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- setup.e 2001/10/27 17:27:42 1.18
+++ setup.e 2001/11/06 06:27:32 1.19
@@ -32,7 +32,8 @@
"e.enable.typedef" => "allow",
"e.enable.when-clauses" => "allow",
"e.enable.notabs" => "allow",
- "e.enable.lambda-args" => "allow"
+ "e.enable.lambda-args" => "allow",
+ "sun.awt.exception.handler" => "org.erights.e.elib.prim.FEProblemHandler"
] diverge()
# 'false' means overwrite rather than complain
1.82 +12 -12 e/src/jsrc/org/erights/e/elang/syntax/EBuilder.java
Index: EBuilder.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/syntax/EBuilder.java,v
retrieving revision 1.81
retrieving revision 1.82
diff -u -r1.81 -r1.82
--- EBuilder.java 2001/11/04 21:26:33 1.81
+++ EBuilder.java 2001/11/06 06:27:32 1.82
@@ -234,7 +234,7 @@
String verbName;
if (verb instanceof AstroToken) {
- verbName = (String)((AstroToken)verb).getOptValue();
+ verbName = (String)((AstroToken)verb).getValue();
} else {
verbName = (String)verb;
}
@@ -597,7 +597,7 @@
* When an at-hole is '@<ident>' or '@_'
*/
/*package*/ Pattern atNoun(Object token) {
- String str = (String)((AstroToken)token).getOptValue();
+ String str = (String)((AstroToken)token).getValue();
str = hilbert(str);
if ("_".equals(str)) {
return ignore();
@@ -649,7 +649,7 @@
* When a dollar-hole is '$<ident>'
*/
/*package*/ EExpr dollarNoun(Object token) {
- String str = (String)((AstroToken)token).getOptValue();
+ String str = (String)((AstroToken)token).getValue();
str = hilbert(str);
return noun(str);
}
@@ -947,7 +947,7 @@
*/
/*package*/ LiteralExpr literal(Object token) {
AstroToken tokn = (AstroToken)token;
- return new LiteralExpr(tokn.getOptValue());
+ return new LiteralExpr(tokn.getValue());
}
/**
@@ -1121,7 +1121,7 @@
eScript);
} else if (isLiteralToken(optOName)) {
return object(docComment,
- ((AstroToken)optOName).getOptValue(),
+ ((AstroToken)optOName).getValue(),
auditors,
eScript);
@@ -1183,7 +1183,7 @@
for (int i = 0; i < qList.length; i++) {
if (isQuasiPart(qList[i])) {
- buf.append(((AstroToken)qList[i]).getOptValue());
+ buf.append(((AstroToken)qList[i]).getValue());
} else {
EExpr eExpr = (EExpr)qList[i];
@@ -1209,7 +1209,7 @@
*/
/*package*/ QuasiLiteralExpr quasiLiteralExpr(Object litIndex) {
AstroToken lit = (AstroToken)litIndex;
- int index = ((Number)lit.getOptValue()).intValue();
+ int index = ((Number)lit.getValue()).intValue();
return new QuasiLiteralExpr(index);
}
@@ -1218,7 +1218,7 @@
*/
/*package*/ QuasiLiteralPatt quasiLiteralPatt(Object litIndex) {
AstroToken lit = (AstroToken)litIndex;
- int index = ((Number)lit.getOptValue()).intValue();
+ int index = ((Number)lit.getValue()).intValue();
return new QuasiLiteralPatt(index);
}
@@ -1238,7 +1238,7 @@
for (int i = 0; i < qList.length; i++) {
if (isQuasiPart(qList[i])) {
- buf.append(((AstroToken)qList[i]).getOptValue());
+ buf.append(((AstroToken)qList[i]).getValue());
} else if (qList[i] instanceof EExpr) {
EExpr eExpr = (EExpr)qList[i];
@@ -1267,7 +1267,7 @@
*/
/*package*/ QuasiPatternExpr quasiPatternExpr(Object litIndex) {
AstroToken lit = (AstroToken)litIndex;
- int index = ((Number)lit.getOptValue()).intValue();
+ int index = ((Number)lit.getValue()).intValue();
return new QuasiPatternExpr(index);
}
@@ -1276,7 +1276,7 @@
*/
/*package*/ QuasiPatternPatt quasiPatternPatt(Object litIndex) {
AstroToken lit = (AstroToken)litIndex;
- int index = ((Number)lit.getOptValue()).intValue();
+ int index = ((Number)lit.getValue()).intValue();
return new QuasiPatternPatt(index);
}
@@ -1739,7 +1739,7 @@
} else if (isLiteralToken(optOName)) {
return oType(docComment,
- ((AstroToken)optOName).getOptValue(),
+ ((AstroToken)optOName).getValue(),
auditors,
mTypes);
1.63 +10 -6 e/src/jsrc/org/erights/e/elang/syntax/ELexer.java
Index: ELexer.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/syntax/ELexer.java,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -r1.62 -r1.63
--- ELexer.java 2001/11/05 03:15:51 1.62
+++ ELexer.java 2001/11/06 06:27:32 1.63
@@ -441,8 +441,8 @@
} while (myChar != EOFCHAR &&
isIdentifierPart((char)myChar));
Twine name = endToken();
- String key = name.bare().toLowerCase().substring(1);
- int tt = EParser.tokenType(key);
+ String key = name.bare().substring(1);
+ int tt = EParser.optKeywordType(key);
if (tt != -1) {
syntaxError(key + " is a keyword");
}
@@ -473,8 +473,8 @@
} while (myChar != EOFCHAR &&
isIdentifierPart((char)myChar));
Twine name = endToken();
- String key = name.bare().toLowerCase().substring(1);
- int tt = EParser.tokenType(key);
+ String key = name.bare().substring(1);
+ int tt = EParser.optKeywordType(key);
if (tt != -1) {
syntaxError(key + " is a keyword");
}
@@ -879,11 +879,15 @@
nextChar();
Twine source = endToken();
String name = source.bare().substring(0, source.size() -1);
- return new AstroToken(EParser.VerbAss, source, name);
+ int tt = EParser.optKeywordType(name);
+ if (tt != -1) {
+ syntaxError(name + " is a keyword");
+ }
+ return new AstroToken(EParser.VerbAssign, source, name);
}
}
Twine source = endToken();
- int ttype = EParser.tokenType(source.bare().toLowerCase());
+ int ttype = EParser.optKeywordType(source.bare());
if (-1 == ttype) {
return new AstroToken(EParser.Identifier, source, source.bare());
} else {
1.99 +102 -90 e/src/jsrc/org/erights/e/elang/syntax/EParser.java
Index: EParser.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/syntax/EParser.java,v
retrieving revision 1.98
retrieving revision 1.99
diff -u -r1.98 -r1.99
--- EParser.java 2001/11/04 21:26:33 1.98
+++ EParser.java 2001/11/06 06:27:32 1.99
@@ -166,7 +166,7 @@
public final static short LiteralString=260;
public final static short LiteralTwine=261;
public final static short Identifier=262;
-public final static short VerbAss=263;
+public final static short VerbAssign=263;
public final static short QuasiOpen=264;
public final static short QuasiClose=265;
public final static short DollarIdent=266;
@@ -708,24 +708,24 @@
null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,
null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,
null,null,null,null,null,null,null,null,null,"LiteralInteger","LiteralFloat64",
-"LiteralChar","LiteralString","LiteralTwine","Identifier","VerbAss","QuasiOpen",
-"QuasiClose","DollarIdent","AtIdent","DollarOpen","AtOpen","URI","URIStart",
-"BodyStartWord","BodyNextWord","VTableStartWord","VTableNextWord","BIND",
-"CATCH","CLASS","DEF","DELEGATE","ELSE","ESCAPE","FINALLY","FOR","IF","IN",
-"MATCH","META","PRAGMA","SWITCH","THUNK","TO","TRY","VAR","WHEN","WHILE","_",
-"DEFINE","ON","SELECT","TYPEDEF","ABSTRACT","AN","AS","ATTRIBUTE","BE","BEGIN",
-"BEHALF","BELIEF","BELIEVE","BELIEVES","CASE","CONST","CONSTRUCTOR","CONTEXT",
-"DECLARE","DEFAULT","DEFMACRO","DEPRECATED","DISPATCH","DO","ENCAPSULATE",
-"ENCAPSULATED","ENCAPSULATES","END","ENSURE","ENUM","EVENTUAL","EVENTUALLY",
-"EXPORT","EXTENDS","FACET","FORALL","FUNCTION","GIVEN","HIDDEN","HIDES",
-"IMPLEMENTS","INTERFACE","IS","KNOW","KNOWS","LAMBDA","LET","METHOD","METHODS",
-"MODULE","NAMESPACE","NATIVE","OBEYS","OCTET","ONEWAY","PACKAGE","PRIVATE",
-"PROTECTED","PUBLIC","RAISES","RELIANCE","RELIANT","RELIES","RELY","REVEAL",
-"SAKE","SIGNED","STATIC","STRUCT","SUCHTHAT","SUPPORTS","SUSPECT","SUSPECTS",
-"SYNCHRONIZED","THIS","THROWS","TRANSIENT","TRUNCATABLE","UNSIGNED","UNUM",
-"USES","USING","UTF8","UTF16","VALUETYPE","VIRTUAL","VOLATILE","WSTRING","EOL",
-"OpLAnd","OpLOr","OpSame","OpNSame","OpButNot","OpLeq","OpABA","OpGeq","OpThru",
-"OpTill","OpAsl","OpAsr","OpFlrDiv","OpMod","OpPow","OpAss","OpAssAdd",
+"LiteralChar","LiteralString","LiteralTwine","Identifier","VerbAssign",
+"QuasiOpen","QuasiClose","DollarIdent","AtIdent","DollarOpen","AtOpen","URI",
+"URIStart","BodyStartWord","BodyNextWord","VTableStartWord","VTableNextWord",
+"BIND","CATCH","CLASS","DEF","DELEGATE","ELSE","ESCAPE","FINALLY","FOR","IF",
+"IN","MATCH","META","PRAGMA","SWITCH","THUNK","TO","TRY","VAR","WHEN","WHILE",
+"_","DEFINE","ON","SELECT","TYPEDEF","ABSTRACT","AN","AS","ATTRIBUTE","BE",
+"BEGIN","BEHALF","BELIEF","BELIEVE","BELIEVES","CASE","CONST","CONSTRUCTOR",
+"CONTEXT","DECLARE","DEFAULT","DEFMACRO","DEPRECATED","DISPATCH","DO",
+"ENCAPSULATE","ENCAPSULATED","ENCAPSULATES","END","ENSURE","ENUM","EVENTUAL",
+"EVENTUALLY","EXPORT","EXTENDS","FACET","FORALL","FUNCTION","GIVEN","HIDDEN",
+"HIDES","IMPLEMENTS","INTERFACE","IS","KNOW","KNOWS","LAMBDA","LET","METHOD",
+"METHODS","MODULE","NAMESPACE","NATIVE","OBEYS","OCTET","ONEWAY","PACKAGE",
+"PRIVATE","PROTECTED","PUBLIC","RAISES","RELIANCE","RELIANT","RELIES","RELY",
+"REVEAL","SAKE","SIGNED","STATIC","STRUCT","SUCHTHAT","SUPPORTS","SUSPECT",
+"SUSPECTS","SYNCHRONIZED","THIS","THROWS","TRANSIENT","TRUNCATABLE","UNSIGNED",
+"UNUM","USES","USING","UTF8","UTF16","VALUETYPE","VIRTUAL","VOLATILE","WSTRING",
+"EOL","OpLAnd","OpLOr","OpSame","OpNSame","OpButNot","OpLeq","OpABA","OpGeq",
+"OpThru","OpTill","OpAsl","OpAsr","OpFlrDiv","OpMod","OpPow","OpAss","OpAssAdd",
"OpAssAnd","OpAssAprxDiv","OpAssFlrDiv","OpAssAsl","OpAssAsr","OpAssRemdr",
"OpAssMod","OpAssMul","OpAssOr","OpAssPow","OpAssSub","OpAssXor","Send",
"OpWhen","MapsTo","MatchBind","MisMatch","Audit",
@@ -755,7 +755,7 @@
"assign : cond OpAss assign",
"assign : cond assignop nAssign",
"assign : cond OpAssAsr assign",
-"assign : cond VerbAss parenArgs",
+"assign : cond VerbAssign parenArgs",
"assign : define pattern OpAss assign",
"assign : binder OpAss assign",
"assign : varNamer OpAss assign",
@@ -1403,35 +1403,38 @@
/** Not provided for us */
static /*package*/ final short EOFTOK = 0;
+/**
+ * For all the names below, if the name == name.toLowerCase(), then
+ * the name must be a keyword. Else it must not be a keyword. The
+ * names themselves must be legal Functor identifiers.
+ */
static {
System.arraycopy(yyname, 0, TheTokens, 0, yyname.length);
-
- /* printrep must not be a token */
- TheTokens[EOFTOK] = "end-of-file";
+ TheTokens[EOFTOK] = "EOFTOK";
/* The magical end-of-line token, not considered whitespace */
- TheTokens[EOL] = "end-of-line";
+ TheTokens[EOL] = "EOL";
- TheTokens[LiteralInteger] = "literal-integer";
- TheTokens[LiteralFloat64] = "literal-float64";
- TheTokens[LiteralChar] = "literal-char";
- TheTokens[LiteralString] = "literal-string";
- TheTokens[LiteralTwine] = "literal-twine";
-
- TheTokens[Identifier] = "non-keyword-identifier";
- TheTokens[VerbAss] = "verb-assign";
- TheTokens[QuasiOpen] = "quasi-open";
- TheTokens[QuasiClose] = "quasi-close";
- TheTokens[DollarIdent] = "dollar-identifier-hole";
- TheTokens[AtIdent] = "at-identifier-hole";
- TheTokens[DollarOpen] = "dollar-open-hole";
- TheTokens[AtOpen] = "at-open-hole";
- TheTokens[URI] = "uniform-resource-identifier";
- TheTokens[URIStart] = "uri-protocol-with-colon";
- TheTokens[BodyStartWord] = "body-start-word";
- TheTokens[BodyNextWord] = "body-next-word";
- TheTokens[VTableStartWord] = "vtable-start-word";
- TheTokens[VTableNextWord] = "vtable-next-word";
+ TheTokens[LiteralInteger] = "LiteralInteger";
+ TheTokens[LiteralFloat64] = "LiteralFloat64";
+ TheTokens[LiteralChar] = "LiteralChar";
+ TheTokens[LiteralString] = "LiteralString";
+ TheTokens[LiteralTwine] = "LiteralTwine";
+
+ TheTokens[Identifier] = "Identifier";
+ TheTokens[VerbAssign] = "VerbAssign";
+ TheTokens[QuasiOpen] = "QuasiOpen";
+ TheTokens[QuasiClose] = "QuasiClose";
+ TheTokens[DollarIdent] = "DollarIdent";
+ TheTokens[AtIdent] = "AtIdent";
+ TheTokens[DollarOpen] = "DollarOpen";
+ TheTokens[AtOpen] = "AtOpen";
+ TheTokens[URI] = "URI";
+ TheTokens[URIStart] = "URIStart";
+ TheTokens[BodyStartWord] = "BodyStartWord";
+ TheTokens[BodyNextWord] = "BodyNextWord";
+ TheTokens[VTableStartWord] = "VTableStartWord";
+ TheTokens[VTableNextWord] = "VTableNextWord";
/* Keywords */
TheTokens[BIND] = "bind";
@@ -1550,49 +1553,49 @@
TheTokens[WSTRING] = "wstring";
/* Multi-Character Operators */
- TheTokens[OpLAnd] = "&&";
- TheTokens[OpLOr] = "||";
- TheTokens[OpSame] = "==";
- TheTokens[OpNSame] = "!=";
- TheTokens[OpButNot] = "&!";
- TheTokens[OpLeq] = "<=";
- TheTokens[OpABA] = "<=>";
- TheTokens[OpGeq] = ">=";
- TheTokens[OpThru] = "..";
- TheTokens[OpTill] = "..!";
- TheTokens[OpAsl] = "<<";
- TheTokens[OpAsr] = ">>";
- TheTokens[OpFlrDiv] = "_/";
- TheTokens[OpMod] = "%%";
- TheTokens[OpPow] = "**";
-
- TheTokens[OpAss] = ":=";
- TheTokens[OpAssAdd] = "+=";
- TheTokens[OpAssAnd] = "&=";
- TheTokens[OpAssAprxDiv] = "/=";
- TheTokens[OpAssFlrDiv] = "_/=";
- TheTokens[OpAssAsl] = "<<=";
- TheTokens[OpAssAsr] = ">>=";
- TheTokens[OpAssRemdr] = "%=";
- TheTokens[OpAssMod] = "%%=";
- TheTokens[OpAssMul] = "*=";
- TheTokens[OpAssOr] = "|=";
- TheTokens[OpAssPow] = "**=";
- TheTokens[OpAssSub] = "-=";
- TheTokens[OpAssXor] = "^=";
+ TheTokens[OpLAnd] = "OpLAnd";
+ TheTokens[OpLOr] = "OpLOr";
+ TheTokens[OpSame] = "OpSame";
+ TheTokens[OpNSame] = "OpNSame";
+ TheTokens[OpButNot] = "OpButNot";
+ TheTokens[OpLeq] = "OpLeq";
+ TheTokens[OpABA] = "OpABA";
+ TheTokens[OpGeq] = "OpGeq";
+ TheTokens[OpThru] = "OpThru";
+ TheTokens[OpTill] = "OpTill";
+ TheTokens[OpAsl] = "OpAsl";
+ TheTokens[OpAsr] = "OpAsr";
+ TheTokens[OpFlrDiv] = "OpFlrDiv";
+ TheTokens[OpMod] = "OpMod";
+ TheTokens[OpPow] = "OpPow";
+
+ TheTokens[OpAss] = "OpAss";
+ TheTokens[OpAssAdd] = "OpAssAdd";
+ TheTokens[OpAssAnd] = "OpAssAnd";
+ TheTokens[OpAssAprxDiv] = "OpAssAprxDiv";
+ TheTokens[OpAssFlrDiv] = "OpAssFlrDiv";
+ TheTokens[OpAssAsl] = "OpAssAsl";
+ TheTokens[OpAssAsr] = "OpAssAsr";
+ TheTokens[OpAssRemdr] = "OpAssRemdr";
+ TheTokens[OpAssMod] = "OpAssMod";
+ TheTokens[OpAssMul] = "OpAssMul";
+ TheTokens[OpAssOr] = "OpAssOr";
+ TheTokens[OpAssPow] = "OpAssPow";
+ TheTokens[OpAssSub] = "OpAssSub";
+ TheTokens[OpAssXor] = "OpAssXor";
/* Other funky tokens */
- TheTokens[Send] = "<-";
- TheTokens[MapsTo] = "=>";
- TheTokens[MatchBind] = "=~";
- TheTokens[MisMatch] = "!~";
- TheTokens[Audit] = "::";
+ TheTokens[Send] = "Send";
+ TheTokens[MapsTo] = "MapsTo";
+ TheTokens[MatchBind] = "MatchBind";
+ TheTokens[MisMatch] = "MisMatch";
+ TheTokens[Audit] = "Audit";
}
/**
*
*/
-static /*package*/ ConstList getTokenNames() {
+static public ConstList getTokenNames() {
return ConstList.fromArray(TheTokens);
}
@@ -1602,11 +1605,9 @@
static private IntTable TheTokenTable = null;
/**
- * What's the token type for this literal tokenName? If this tokenName isn't
- * in the table, this method returns -1. It's up to the caller to
- * determine the types of other tokens (like Identifier).
+ *
*/
-static public int tokenType(String tokenName) {
+static private IntTable getTokenTable() {
if (null == TheTokenTable) {
TheTokenTable = new IntTable(String.class);
for (int i = 0; i < TheTokens.length; i++) {
@@ -1615,14 +1616,25 @@
}
}
}
- return TheTokenTable.getInt(tokenName, -1);
+ return TheTokenTable;
+}
+
+/**
+ * If 'name' is a keyword, return it's token type code, else -1.
+ * <p>
+ * Note that E keywords are case insensitive, so 'name' is first
+ * toLowerCase()d.
+ */
+static public int optKeywordType(String name) {
+ name = name.toLowerCase();
+ return getTokenTable().getInt(name, -1);
}
/**
*
*/
-static public String tokenName(int tokenType) {
- return TheTokens[tokenType];
+static public ConstMap getTokenMap() {
+ return getTokenTable().snapshot();
}
/**
@@ -1706,7 +1718,7 @@
static public boolean isContinuer(int tokenType) {
return TheContinuers[tokenType];
}
-//#line 5625 "EParser.java"
+//#line 5637 "EParser.java"
//###############################################################
// method: yylexdebug : check lexer state
//###############################################################
@@ -2683,7 +2695,7 @@
break;
case 260:
//#line 973 "e.y"
-{ yyval = ((AstroToken)val_peek(0)).getOptValue(); }
+{ yyval = ((AstroToken)val_peek(0)).getValue(); }
break;
case 261:
//#line 974 "e.y"
@@ -2873,7 +2885,7 @@
//#line 1155 "e.y"
{ end(); }
break;
-//#line 6789 "EParser.java"
+//#line 6801 "EParser.java"
//########## END OF USER-SUPPLIED ACTIONS ##########
}//switch
//#### Now let's reduce... ####
1.93 +85 -73 e/src/jsrc/org/erights/e/elang/syntax/e.y
Index: e.y
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/syntax/e.y,v
retrieving revision 1.92
retrieving revision 1.93
diff -u -r1.92 -r1.93
--- e.y 2001/11/04 21:26:34 1.92
+++ e.y 2001/11/06 06:27:32 1.93
@@ -56,7 +56,7 @@
%token LiteralTwine /* quasi-quoted without holes. Not yet used */
%token Identifier /* like Java, but no "$"s, and not keyword */
-%token VerbAss /* Identifier "=" */
+%token VerbAssign /* Identifier "=" */
%token QuasiOpen /* ("`" char*) | (char*), up to hole */
%token QuasiClose /* QuasiOpen "`" */
%token DollarIdent /* "$" Identifier */
@@ -236,10 +236,10 @@
;
assign:
cond
- | cond OpAss assign { $$ = assign($1, $3); }
- | cond assignop nAssign { $$ = update($1, $2, $3); }
- | cond OpAssAsr assign { $$ = assAsr($1, $3); }
- | cond VerbAss parenArgs { $$ = update($1, $2, $3); }
+ | cond OpAss assign { $$ = assign($1, $3); }
+ | cond assignop nAssign { $$ = update($1, $2, $3); }
+ | cond OpAssAsr assign { $$ = assAsr($1, $3); }
+ | cond VerbAssign parenArgs { $$ = update($1, $2, $3); }
| define pattern OpAss assign { $$ = define($2, $4); }
| binder OpAss assign { $$ = define($1, $3); }
@@ -970,7 +970,7 @@
* A non-reserved Identifier (as a String)
*/
ident:
- Identifier { $$ = ((AstroToken)$1).getOptValue(); }
+ Identifier { $$ = ((AstroToken)$1).getValue(); }
| reserved { reserved("keyword \"" +
((AstroToken)$1).getText() +
"\""); }
@@ -1448,35 +1448,38 @@
/** Not provided for us */
static /*package*/ final short EOFTOK = 0;
+/**
+ * For all the names below, if the name == name.toLowerCase(), then
+ * the name must be a keyword. Else it must not be a keyword. The
+ * names themselves must be legal Functor identifiers.
+ */
static {
System.arraycopy(yyname, 0, TheTokens, 0, yyname.length);
-
- /* printrep must not be a token */
- TheTokens[EOFTOK] = "end-of-file";
+ TheTokens[EOFTOK] = "EOFTOK";
/* The magical end-of-line token, not considered whitespace */
- TheTokens[EOL] = "end-of-line";
+ TheTokens[EOL] = "EOL";
- TheTokens[LiteralInteger] = "literal-integer";
- TheTokens[LiteralFloat64] = "literal-float64";
- TheTokens[LiteralChar] = "literal-char";
- TheTokens[LiteralString] = "literal-string";
- TheTokens[LiteralTwine] = "literal-twine";
-
- TheTokens[Identifier] = "non-keyword-identifier";
- TheTokens[VerbAss] = "verb-assign";
- TheTokens[QuasiOpen] = "quasi-open";
- TheTokens[QuasiClose] = "quasi-close";
- TheTokens[DollarIdent] = "dollar-identifier-hole";
- TheTokens[AtIdent] = "at-identifier-hole";
- TheTokens[DollarOpen] = "dollar-open-hole";
- TheTokens[AtOpen] = "at-open-hole";
- TheTokens[URI] = "uniform-resource-identifier";
- TheTokens[URIStart] = "uri-protocol-with-colon";
- TheTokens[BodyStartWord] = "body-start-word";
- TheTokens[BodyNextWord] = "body-next-word";
- TheTokens[VTableStartWord] = "vtable-start-word";
- TheTokens[VTableNextWord] = "vtable-next-word";
+ TheTokens[LiteralInteger] = "LiteralInteger";
+ TheTokens[LiteralFloat64] = "LiteralFloat64";
+ TheTokens[LiteralChar] = "LiteralChar";
+ TheTokens[LiteralString] = "LiteralString";
+ TheTokens[LiteralTwine] = "LiteralTwine";
+
+ TheTokens[Identifier] = "Identifier";
+ TheTokens[VerbAssign] = "VerbAssign";
+ TheTokens[QuasiOpen] = "QuasiOpen";
+ TheTokens[QuasiClose] = "QuasiClose";
+ TheTokens[DollarIdent] = "DollarIdent";
+ TheTokens[AtIdent] = "AtIdent";
+ TheTokens[DollarOpen] = "DollarOpen";
+ TheTokens[AtOpen] = "AtOpen";
+ TheTokens[URI] = "URI";
+ TheTokens[URIStart] = "URIStart";
+ TheTokens[BodyStartWord] = "BodyStartWord";
+ TheTokens[BodyNextWord] = "BodyNextWord";
+ TheTokens[VTableStartWord] = "VTableStartWord";
+ TheTokens[VTableNextWord] = "VTableNextWord";
/* Keywords */
TheTokens[BIND] = "bind";
@@ -1595,49 +1598,49 @@
TheTokens[WSTRING] = "wstring";
/* Multi-Character Operators */
- TheTokens[OpLAnd] = "&&";
- TheTokens[OpLOr] = "||";
- TheTokens[OpSame] = "==";
- TheTokens[OpNSame] = "!=";
- TheTokens[OpButNot] = "&!";
- TheTokens[OpLeq] = "<=";
- TheTokens[OpABA] = "<=>";
- TheTokens[OpGeq] = ">=";
- TheTokens[OpThru] = "..";
- TheTokens[OpTill] = "..!";
- TheTokens[OpAsl] = "<<";
- TheTokens[OpAsr] = ">>";
- TheTokens[OpFlrDiv] = "_/";
- TheTokens[OpMod] = "%%";
- TheTokens[OpPow] = "**";
-
- TheTokens[OpAss] = ":=";
- TheTokens[OpAssAdd] = "+=";
- TheTokens[OpAssAnd] = "&=";
- TheTokens[OpAssAprxDiv] = "/=";
- TheTokens[OpAssFlrDiv] = "_/=";
- TheTokens[OpAssAsl] = "<<=";
- TheTokens[OpAssAsr] = ">>=";
- TheTokens[OpAssRemdr] = "%=";
- TheTokens[OpAssMod] = "%%=";
- TheTokens[OpAssMul] = "*=";
- TheTokens[OpAssOr] = "|=";
- TheTokens[OpAssPow] = "**=";
- TheTokens[OpAssSub] = "-=";
- TheTokens[OpAssXor] = "^=";
+ TheTokens[OpLAnd] = "OpLAnd";
+ TheTokens[OpLOr] = "OpLOr";
+ TheTokens[OpSame] = "OpSame";
+ TheTokens[OpNSame] = "OpNSame";
+ TheTokens[OpButNot] = "OpButNot";
+ TheTokens[OpLeq] = "OpLeq";
+ TheTokens[OpABA] = "OpABA";
+ TheTokens[OpGeq] = "OpGeq";
+ TheTokens[OpThru] = "OpThru";
+ TheTokens[OpTill] = "OpTill";
+ TheTokens[OpAsl] = "OpAsl";
+ TheTokens[OpAsr] = "OpAsr";
+ TheTokens[OpFlrDiv] = "OpFlrDiv";
+ TheTokens[OpMod] = "OpMod";
+ TheTokens[OpPow] = "OpPow";
+
+ TheTokens[OpAss] = "OpAss";
+ TheTokens[OpAssAdd] = "OpAssAdd";
+ TheTokens[OpAssAnd] = "OpAssAnd";
+ TheTokens[OpAssAprxDiv] = "OpAssAprxDiv";
+ TheTokens[OpAssFlrDiv] = "OpAssFlrDiv";
+ TheTokens[OpAssAsl] = "OpAssAsl";
+ TheTokens[OpAssAsr] = "OpAssAsr";
+ TheTokens[OpAssRemdr] = "OpAssRemdr";
+ TheTokens[OpAssMod] = "OpAssMod";
+ TheTokens[OpAssMul] = "OpAssMul";
+ TheTokens[OpAssOr] = "OpAssOr";
+ TheTokens[OpAssPow] = "OpAssPow";
+ TheTokens[OpAssSub] = "OpAssSub";
+ TheTokens[OpAssXor] = "OpAssXor";
/* Other funky tokens */
- TheTokens[Send] = "<-";
- TheTokens[MapsTo] = "=>";
- TheTokens[MatchBind] = "=~";
- TheTokens[MisMatch] = "!~";
- TheTokens[Audit] = "::";
+ TheTokens[Send] = "Send";
+ TheTokens[MapsTo] = "MapsTo";
+ TheTokens[MatchBind] = "MatchBind";
+ TheTokens[MisMatch] = "MisMatch";
+ TheTokens[Audit] = "Audit";
}
/**
*
*/
-static /*package*/ ConstList getTokenNames() {
+static public ConstList getTokenNames() {
return ConstList.fromArray(TheTokens);
}
@@ -1647,11 +1650,9 @@
static private IntTable TheTokenTable = null;
/**
- * What's the token type for this literal tokenName? If this tokenName isn't
- * in the table, this method returns -1. It's up to the caller to
- * determine the types of other tokens (like Identifier).
+ *
*/
-static public int tokenType(String tokenName) {
+static private IntTable getTokenTable() {
if (null == TheTokenTable) {
TheTokenTable = new IntTable(String.class);
for (int i = 0; i < TheTokens.length; i++) {
@@ -1660,14 +1661,25 @@
}
}
}
- return TheTokenTable.getInt(tokenName, -1);
+ return TheTokenTable;
+}
+
+/**
+ * If 'name' is a keyword, return it's token type code, else -1.
+ * <p>
+ * Note that E keywords are case insensitive, so 'name' is first
+ * toLowerCase()d.
+ */
+static public int optKeywordType(String name) {
+ name = name.toLowerCase();
+ return getTokenTable().getInt(name, -1);
}
/**
*
*/
-static public String tokenName(int tokenType) {
- return TheTokens[tokenType];
+static public ConstMap getTokenMap() {
+ return getTokenTable().snapshot();
}
/**
1.3 +14 -13 e/src/jsrc/org/quasiliteral/astro/AstroToken.java
Index: AstroToken.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/quasiliteral/astro/AstroToken.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- AstroToken.java 2001/11/04 00:38:12 1.2
+++ AstroToken.java 2001/11/06 06:27:33 1.3
@@ -25,10 +25,10 @@
private Twine mySource;
/**
- * If present, this must be a {@link Character},
- * {@link BigInteger}, {@link Double}, {@link String}, or {@link Twine}.
+ * Must be a null, {@link Character}, {@link BigInteger}, {@link Double},
+ * {@link String}, or {@link Twine}.
*/
- private Object myOptValue;
+ private Object myValue;
/**
* Construct an instance. The instance will be of type {@link
@@ -57,24 +57,25 @@
/**
* @param ttype Identifies a token type in a particular grammar or set
* of related grammars.
- * @param source The source text this token was extracted from.
- * @param optValue An optional {@link Character},
+ * @param source The source text this token was extracted from. To
+ * provide no info, use "" rather than null.
+ * @param value null, {@link Character},
* {@link BigInteger}, {@link Double},
* {@link String}, or {@link Twine} calculated from
* lexing this token
*/
- public AstroToken(int ttype, Twine source, Object optValue) {
+ public AstroToken(int ttype, Twine source, Object value) {
super(ttype, source.bare());
setSource(source);
- myOptValue = optValue;
+ myValue = value;
}
/**
*
*/
public Functor asFunctor(ConstList typeNames) {
- String tokenType = (String)typeNames.get(getType());
- return new Functor(tokenType, mySource, myOptValue);
+ String name = (String)typeNames.get(getType());
+ return new Functor(name, mySource, myValue);
}
/**
@@ -100,14 +101,14 @@
/**
*
*/
- public Object getOptValue() {
- return myOptValue;
+ public Object getValue() {
+ return myValue;
}
/**
*
*/
- public void setOptValue(Object optValue) {
- myOptValue = optValue;
+ public void setValue(Object value) {
+ myValue = value;
}
}
1.5 +80 -48 e/src/jsrc/org/quasiliteral/term/Functor.java
Index: Functor.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/quasiliteral/term/Functor.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- Functor.java 2001/11/04 21:26:34 1.4
+++ Functor.java 2001/11/06 06:27:33 1.5
@@ -51,7 +51,7 @@
/**
* @serial The name of an Antlr token type int in a particular grammar.
*/
- private final String myTokenType;
+ private final String myName;
/**
* @serial The source text corresponding to the original source of the
@@ -60,42 +60,70 @@
private final Twine mySource;
/**
- * @serial an optional {@link Character},
- * {@link BigInteger}, {@link Double},
+ * Indicates the type of myValue.
+ * <pre>
+ * If myValue is myValueType is
+ * null -1
+ * a Character LiteralChar
+ * a BigInteger LiteralInteger
+ * a Double LiteralFloat64
+ * a String LiteralString
+ * a Twine LiteralString
+ * </pre>
+ */
+ private int myValueType;
+
+ /**
+ * @serial null, {@link Character}, {@link BigInteger}, {@link Double},
* {@link String}, or {@link Twine} calculated from lexing the token
*/
- private Object myOptValue;
+ private Object myValue;
/**
- * @param tokenType The name of an Antlr token type int in a particular
- * grammar. Printed only if not implied by optValue.
+ * @param name The name of an Antlr token type int in a particular
+ * grammar. Must be an identifier. Printed only if not
+ * implied by value.
* @param source The source text corresponding to the original source of
* the token, although it isn't necessarily the same as the
* original source text. In any case, its source span
* information says what positions in the original source
- * it corresponds to. This is not part
- * of the normal printed form.
- * @param optValue An optional {@link Character},
+ * it corresponds to. This is not part of the normal
+ * printed form.
+ * @param value null, {@link Character},
* {@link BigInteger}, {@link Double},
- * {@link String}, or {@link Twine} calculated from the
- * source text. If present, is always part of the
- * normal printed form.
- */
- public Functor(String tokenType, Twine source, Object optValue) {
- myTokenType = tokenType;
+ * {@link String}, or {@link Twine}
+ * If non-null, is always part of the normal printed
+ * form.
+ */
+ public Functor(String name, Twine source, Object value) {
+ if (! TermLexer.isIdentifier(name)) {
+ throw new RuntimeException("Must be an identifier: " + name);
+ }
+ myName = name;
mySource = source;
- if (null == optValue ||
- optValue instanceof Character ||
- optValue instanceof BigInteger ||
- optValue instanceof Double ||
- optValue instanceof String ||
- optValue instanceof Twine)
- {
- myOptValue = optValue;
+ if (null == value) {
+ myValueType = -1;
+ } else if (value instanceof Character) {
+ myValueType = TermParser.LiteralChar;
+ } else if (value instanceof Number) {
+ if (value instanceof BigInteger) {
+ myValueType = TermParser.LiteralInteger;
+ } else if (value instanceof Double) {
+ myValueType = TermParser.LiteralFloat64;
+ } else {
+ throw new RuntimeException
+ ("XXX Functor value coercion not yet implemented");
+ }
+ } else if (value instanceof String) {
+ myValueType = TermParser.LiteralString;
+ //XXX consider coercing value to Twine
+ } else if (value instanceof Twine) {
+ myValueType = TermParser.LiteralString;
} else {
- throw new RuntimeException(optValue.getClass().getName() +
+ throw new RuntimeException(value.getClass().getName() +
" not a literal type");
}
+ myValue = value;
}
/**
@@ -125,8 +153,8 @@
*
*/
public AstroToken asToken(ConstMap typeNums) {
- int tokenTypeInt = E.asInt(typeNums.get(myTokenType));
- return new AstroToken(tokenTypeInt, mySource, myOptValue);
+ int tokenTypeInt = E.asInt(typeNums.get(myName));
+ return new AstroToken(tokenTypeInt, mySource, myValue);
}
/**
@@ -134,8 +162,7 @@
*/
public Object[] getCanonicalState() {
Object[] result = {
- FunctorMaker, "new",
- myTokenType, mySource, myOptValue
+ FunctorMaker, "new", myName, mySource, myValue
};
return result;
}
@@ -143,8 +170,8 @@
/**
*
*/
- public String getTokenType() {
- return myTokenType;
+ public String getName() {
+ return myName;
}
/**
@@ -156,9 +183,24 @@
/**
*
+ */
+ public Object getValue() {
+ return myValue;
+ }
+
+ /**
+ *
*/
- public Object getOptValue() {
- return myOptValue;
+ public double compareTo(Functor other) {
+ double result = myName.compareTo(other.myName);
+ if (0.0 != result) {
+ return result;
+ }
+ result = myValueType - other.myValueType;
+ if (0.0 != result) {
+ return result;
+ }
+ return E.asFloat64(E.call(myValue, "compareTo", other.myValue));
}
/**
@@ -169,31 +211,21 @@
}
/**
- * XXX doesn't yet deal with LiteralTwine
+ *
*/
public String toString(boolean quasiFlag) {
- if (null == myOptValue) {
- return myTokenType;
+ if (null == myValue) {
+ return myName;
}
- String valueStr = E.toQuote(myOptValue).bare();
+ String valueStr = E.toQuote(myValue).bare();
if (quasiFlag) {
valueStr = StringHelper.replaceAll(valueStr, "$", "$$");
valueStr = StringHelper.replaceAll(valueStr, "@", "@@");
valueStr = StringHelper.replaceAll(valueStr, "`", "``");
}
- if ((myOptValue instanceof Character &&
- "LiteralChar".equals(myTokenType)) ||
- (myOptValue instanceof BigInteger &&
- "LiteralInteger".equals(myTokenType)) ||
- (myOptValue instanceof Double &&
- "LiteralFloat64".equals(myTokenType)) ||
- (myOptValue instanceof String &&
- "LiteralString".equals(myTokenType)) ||
- (myOptValue instanceof Twine &&
- "LiteralString".equals(myTokenType))) {
-
+ if (TermParser.getTokenNames().get(myValueType).equals(myName)) {
return valueStr;
}
- return myTokenType + ":" + valueStr;
+ return myName + ":" + valueStr;
}
}
1.4 +3 -3 e/src/jsrc/org/quasiliteral/term/SimpleTermBuilder.java
Index: SimpleTermBuilder.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/quasiliteral/term/SimpleTermBuilder.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- SimpleTermBuilder.java 2001/11/05 03:15:51 1.3
+++ SimpleTermBuilder.java 2001/11/06 06:27:33 1.4
@@ -75,7 +75,7 @@
if (TermParser.Identifier != tok.getType()) {
throw new RuntimeException("Must be Identifier: " + ident);
}
- String name = (String)tok.getOptValue();
+ String name = (String)tok.getValue();
if (null == name) {
throw new RuntimeException("Must have value: " + ident);
}
@@ -106,14 +106,14 @@
if (TermParser.Identifier != idTok.getType()) {
throw new RuntimeException("Must be Identifier: " + ident);
}
- String name = (String)idTok.getOptValue();
+ String name = (String)idTok.getValue();
if (null == name) {
throw new RuntimeException("Must have value: " + ident);
}
Twine source = (Twine)idTok.getSource()
.add(colonTok.getSource())
.add(litTok.getSource());
- return new Functor(name, source, litTok.getOptValue());
+ return new Functor(name, source, litTok.getValue());
}
/**
1.2 +20 -0 e/src/jsrc/org/quasiliteral/term/Term.java
Index: Term.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/quasiliteral/term/Term.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Term.java 2001/11/03 13:32:51 1.1
+++ Term.java 2001/11/06 06:27:33 1.2
@@ -130,6 +130,26 @@
}
/**
+ *
+ */
+ public double compareTo(Term other) {
+ double result = myFunctor.compareTo(other.myFunctor);
+ if (0.0 != result) {
+ return result;
+ }
+ int len = Math.min(myArgs.size(), other.myArgs.size());
+ for (int i = 0; i < len; i++) {
+ Functor f1 = ((Functor)myArgs.get(i));
+ Functor f2 = ((Functor)other.myArgs.get(i));
+ result = f1.compareTo(f2);
+ if (0.0 != result) {
+ return result;
+ }
+ }
+ return myArgs.size() - other.myArgs.size();
+ }
+
+ /**
* What's the longest distance to the bottom?
* <p>
* A leaf node is height 1. All other nodes are one more than the height
1.5 +2 -3 e/src/jsrc/org/quasiliteral/term/Term.updoc
Index: Term.updoc
===================================================================
RCS file: /cvs/e/src/jsrc/org/quasiliteral/term/Term.updoc,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- Term.updoc 2001/11/05 03:15:51 1.4
+++ Term.updoc 2001/11/06 06:27:33 1.5
@@ -6,17 +6,16 @@
? def term := TermParserMaker(<file:~/Desktop/termtest.txt> getText())
# value: term`foo(3,
- # x:"bar\tbaz"(3, 'x'),
+ # x(3, 'x'),
# zip)`
? term getFunctor()
# value: foo
? term getArgs()
- # value: [term`3`, term`x:"bar\tbaz"(3, 'x')`, term`zip`]
+ # value: [term`3`, term`x(3, 'x')`, term`zip`]
?
-
1.4 +21 -2 e/src/jsrc/org/quasiliteral/term/TermLexer.java
Index: TermLexer.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/quasiliteral/term/TermLexer.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- TermLexer.java 2001/11/05 03:15:51 1.3
+++ TermLexer.java 2001/11/06 06:27:33 1.4
@@ -511,6 +511,25 @@
}
/**
+ * Is 'str' a legal E identifier?
+ */
+ static public boolean isIdentifier(String str) {
+ int len = str.length();
+ if (len <= 0) {
+ return false;
+ }
+ if (! isIdentifierStart(str.charAt(0))) {
+ return false;
+ }
+ for (int i = 1; i < len; i++) {
+ if (! isIdentifierPart(str.charAt(i))) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ /**
*
*/
private AstroToken numberLiteral()
@@ -668,8 +687,8 @@
Twine closer = endToken();
myIndenter.pop('"', closer);
return new AstroToken(TermParser.LiteralString,
- closer,
- value.toString());
+ closer,
+ value.toString());
}
/**
1.4 +16 -16 e/src/jsrc/org/quasiliteral/term/TermParser.java
Index: TermParser.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/quasiliteral/term/TermParser.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- TermParser.java 2001/11/05 03:15:51 1.3
+++ TermParser.java 2001/11/06 06:27:33 1.4
@@ -298,7 +298,7 @@
"literal : LiteralString",
};
-//#line 93 "term.y"
+//#line 92 "term.y"
/**
* contains all the tokens after yylval
@@ -560,63 +560,63 @@
{
//########## USER-SUPPLIED ACTIONS ##########
case 1:
-//#line 28 "term.y"
+//#line 27 "term.y"
{ myOptResult = val_peek(0); }
break;
case 2:
-//#line 32 "term.y"
+//#line 31 "term.y"
{ yyval = b.term(val_peek(0), b.terms()); }
break;
case 3:
-//#line 33 "term.y"
+//#line 32 "term.y"
{ yyval = b.term(val_peek(3), val_peek(1)); }
break;
case 4:
-//#line 37 "term.y"
+//#line 36 "term.y"
{ yyval = b.terms(); }
break;
case 7:
-//#line 43 "term.y"
+//#line 42 "term.y"
{ yyval = b.atRepr(b.terms(), val_peek(1), val_peek(0)); }
break;
case 8:
-//#line 44 "term.y"
+//#line 43 "term.y"
{ yyval = b.atRepr(val_peek(3), val_peek(1), val_peek(0)); }
break;
case 9:
-//#line 48 "term.y"
+//#line 47 "term.y"
{ yyval = b.terms(val_peek(0)); }
break;
case 10:
-//#line 49 "term.y"
+//#line 48 "term.y"
{ yyval = b.terms(val_peek(2), val_peek(0)); }
break;
case 12:
-//#line 52 "term.y"
+//#line 51 "term.y"
{ yyval = b.terms(val_peek(2), val_peek(0)); }
break;
case 13:
-//#line 56 "term.y"
+//#line 55 "term.y"
{ yyval = b.dollarRepr(val_peek(1), val_peek(0)); }
break;
case 14:
-//#line 60 "term.y"
+//#line 59 "term.y"
{ yyval = b.tag(val_peek(0)); }
break;
case 15:
-//#line 61 "term.y"
+//#line 60 "term.y"
{ yyval = b.literal(val_peek(0)); }
break;
case 16:
-//#line 62 "term.y"
+//#line 61 "term.y"
{ yyval = b.compound(val_peek(2), val_peek(1), val_peek(0)); }
break;
case 20:
-//#line 72 "term.y"
+//#line 71 "term.y"
{ yyval = b.dollarHole(val_peek(1)); }
break;
case 21:
-//#line 76 "term.y"
+//#line 75 "term.y"
{ yyval = b.atHole(val_peek(1)); }
break;
//#line 568 "TermParser.java"
1.4 +0 -1 e/src/jsrc/org/quasiliteral/term/term.y
Index: term.y
===================================================================
RCS file: /cvs/e/src/jsrc/org/quasiliteral/term/term.y,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- term.y 2001/11/05 03:15:51 1.3
+++ term.y 2001/11/06 06:27:33 1.4
@@ -20,7 +20,6 @@
%token LiteralInteger //like Java & E: precision unlimited
%token LiteralFloat64 //like Java & E: IEEE double precision
%token LiteralString //like Java & E: double quoted
-//XXX doesn't yet deal with LiteralTwine
%%