projects
/
sbp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
fec264a
)
getFieldName() implementations for other classes
author
adam
<adam@megacz.com>
Tue, 4 Mar 2008 05:28:59 +0000
(
00:28
-0500)
committer
adam
<adam@megacz.com>
Tue, 4 Mar 2008 05:28:59 +0000
(
00:28
-0500)
darcs-hash:
20080304052859
-5007d-
d34e81f8e639deb0beabb7649e3405c05a60437c
.gz
src/edu/berkeley/sbp/meta/GrammarAST.java
patch
|
blob
|
history
diff --git
a/src/edu/berkeley/sbp/meta/GrammarAST.java
b/src/edu/berkeley/sbp/meta/GrammarAST.java
index
1c1ef3d
..
66e8323
100644
(file)
--- a/
src/edu/berkeley/sbp/meta/GrammarAST.java
+++ b/
src/edu/berkeley/sbp/meta/GrammarAST.java
@@
-465,6
+465,7
@@
public class GrammarAST {
if (ret == null) throw new RuntimeException("unknown nonterminal \""+nonTerminal+"\"");
return ret;
}
if (ret == null) throw new RuntimeException("unknown nonterminal \""+nonTerminal+"\"");
return ret;
}
+ public String getFieldName() { return StringUtil.uncapitalize(nonTerminal); }
}
/** a literal string */
}
/** a literal string */
@@
-537,6
+538,7
@@
public class GrammarAST {
public boolean isDropped(Context cx) { return _e.isDropped(cx); }
public Atom toAtom(Context cx) { return _e.toAtom(cx); }
public Element build(Context cx, NonTerminalNode cnt, boolean dropall) { return _e.build(cx, cnt, dropall); }
public boolean isDropped(Context cx) { return _e.isDropped(cx); }
public Atom toAtom(Context cx) { return _e.toAtom(cx); }
public Element build(Context cx, NonTerminalNode cnt, boolean dropall) { return _e.build(cx, cnt, dropall); }
+ public String getFieldName() { return _e.getFieldName(); }
}
/** a backtick node indicating that, when building the AST, the node's children should be inserted here */
}
/** a backtick node indicating that, when building the AST, the node's children should be inserted here */
@@
-561,6
+563,7
@@
public class GrammarAST {
private class LabelNode extends ElementNodeWrapper {
public final String label;
public LabelNode(String label, ElementNode e) { super(e); this.label = label; }
private class LabelNode extends ElementNodeWrapper {
public final String label;
public LabelNode(String label, ElementNode e) { super(e); this.label = label; }
+ public String getFieldName() { return label; }
}
//////////////////////////////////////////////////////////////////////////////
}
//////////////////////////////////////////////////////////////////////////////