java_cup.runtime.Symbol类的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(11.5k)|赞(0)|评价(0)|浏览(327)

本文整理了Java中java_cup.runtime.Symbol类的一些代码示例,展示了Symbol类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Symbol类的具体详情如下:
包路径:java_cup.runtime.Symbol
类名称:Symbol

Symbol介绍

[英]Defines the Symbol class, which is used to represent all terminals and nonterminals while parsing. The lexer should pass CUP Symbols and CUP returns a Symbol.
[中]定义符号类,用于在解析时表示所有端子和非端子。lexer应该传递CUP符号,CUP返回一个符号。

代码示例

代码示例来源:origin: xalan/xalan

Symbol newSymbol(int ss, String value) {
  last = ss;
  return new Symbol(ss, value);
}
Symbol newSymbol(int ss, Long value) {

代码示例来源:origin: com.vaadin/vaadin-client-compiler-deps

private static String convSymbol(Symbol symbol){
  String result = (symbol.value == null)? "" : " (\""+symbol.value.toString()+"\")";
  Field [] fields = sym.class.getFields();
  for (int i = 0; i < fields.length ; i++){
    if (!Modifier.isPublic(fields[i].getModifiers())) continue;
    try {
      if (fields[i].getInt(null) == symbol.sym) return fields[i].getName()+result;
    }catch (Exception ex) {
    }
  }
  return symbol.toString()+result;
}

代码示例来源:origin: nz.ac.waikato.cms.weka.thirdparty/java-cup-11b

private static String convSymbol(Symbol symbol){
  String result = (symbol.value == null)? "" : " (\""+symbol.value.toString()+"\")";
  Field [] fields = sym.class.getFields();
  for (int i = 0; i < fields.length ; i++){
    if (!Modifier.isPublic(fields[i].getModifiers())) continue;
    try {
      if (fields[i].getInt(null) == symbol.sym) return fields[i].getName()+result;
    }catch (Exception ex) {
    }
  }
  return symbol.toString()+result;
}

代码示例来源:origin: xalan/xalan

Symbol newSymbol(int ss) {
  last = ss;
  return new Symbol(ss);
}
Symbol newSymbol(int ss, String value) {

代码示例来源:origin: alibaba/mdrill

public Symbol newSymbol(String name, int id, int left, int right, Object value){
  return new Symbol(id,left,right,value);
}
public Symbol newSymbol(String name, int id, int left, int right){

代码示例来源:origin: alibaba/mdrill

public Symbol newSymbol(String name, int id){
  return new Symbol(id);
}
public Symbol newSymbol(String name, int id, Object value){

代码示例来源:origin: xalan/xalan

Symbol newSymbol(int ss, Double value) {
    last = ss;
    return new Symbol(ss, value);
  }
private java.io.BufferedReader yy_reader;

代码示例来源:origin: alibaba/mdrill

public Symbol newSymbol(String name ,int id, Symbol left, Symbol right, Object value){
  return new Symbol(id,left,right,value);
}
public Symbol newSymbol(String name, int id, Symbol left, Symbol right){

代码示例来源:origin: alibaba/mdrill

public Symbol newSymbol(String name, int id, Symbol left, Symbol right){
  return new Symbol(id,left,right);
}
public Symbol newSymbol(String name, int id, int left, int right, Object value){

代码示例来源:origin: alibaba/mdrill

public Symbol newSymbol(String name, int id, int left, int right){
  return new Symbol(id,left,right);
}
public Symbol startSymbol(String name, int id, int state){

代码示例来源:origin: xalan/xalan

Symbol newSymbol(int ss, Long value) {
  last = ss;
  return new Symbol(ss, value);
}
Symbol newSymbol(int ss, Double value) {

代码示例来源:origin: alibaba/mdrill

public Symbol startSymbol(String name, int id, int state){
  return new Symbol(id,state);
}
public Symbol newSymbol(String name, int id){

代码示例来源:origin: alibaba/mdrill

public Symbol newSymbol(String name, int id, Object value){
    return new Symbol(id,value);
  }
}

代码示例来源:origin: xalan/xalan

/**
 * If symbol is not followed by '::' or '(', then treat it as a
 * name instead of an axis or function (Jira-1912).
 */ 
Symbol disambiguateAxisOrFunction(int ss) throws Exception {
  // Peek in the input buffer without changing the internal state
  int index = yy_buffer_index;
  // Skip whitespace
  while (index < yy_buffer_read && isWhitespace(yy_buffer[index])) {
    index++;
  }
  // If end of buffer, can't disambiguate :(
  if (index >= yy_buffer_read) {
    // Can't disambiguate, so return as symbol
    return new Symbol(ss);
  }
  // Return symbol if next token is '::' or '('
  return (yy_buffer[index] == ':' && yy_buffer[index+1] == ':' ||
      yy_buffer[index] == '(') ?
      newSymbol(ss) : newSymbol(sym.QNAME, yytext());
}
/**

代码示例来源:origin: xalan/xalan

CUP$XPathParser$result = new java_cup.runtime.Symbol(37/*QName*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
CUP$XPathParser$result = new java_cup.runtime.Symbol(37/*QName*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
CUP$XPathParser$result = new java_cup.runtime.Symbol(37/*QName*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
CUP$XPathParser$result = new java_cup.runtime.Symbol(37/*QName*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
CUP$XPathParser$result = new java_cup.runtime.Symbol(37/*QName*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
CUP$XPathParser$result = new java_cup.runtime.Symbol(37/*QName*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
CUP$XPathParser$result = new java_cup.runtime.Symbol(37/*QName*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
CUP$XPathParser$result = new java_cup.runtime.Symbol(37/*QName*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
CUP$XPathParser$result = new java_cup.runtime.Symbol(37/*QName*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
CUP$XPathParser$result = new java_cup.runtime.Symbol(37/*QName*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
CUP$XPathParser$result = new java_cup.runtime.Symbol(37/*QName*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
CUP$XPathParser$result = new java_cup.runtime.Symbol(37/*QName*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
CUP$XPathParser$result = new java_cup.runtime.Symbol(37/*QName*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
CUP$XPathParser$result = new java_cup.runtime.Symbol(37/*QName*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);
CUP$XPathParser$result = new java_cup.runtime.Symbol(37/*QName*/, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).left, ((java_cup.runtime.Symbol)CUP$XPathParser$stack.elementAt(CUP$XPathParser$top-0)).right, RESULT);

代码示例来源:origin: pentaho/mondrian

private Symbol makeSymbol(int id, Object o) {
  int iPrevPrevChar = iPrevChar;
  this.iPrevChar = iChar;
  this.previousSymbol = id;
  return trace(new Symbol(id, iPrevPrevChar, iChar, o));
}

代码示例来源:origin: pentaho/mondrian

public Symbol next_token() throws java.io.IOException {
  if (i < tokens.length) {
    return new Symbol(tokens[i++], 0, 0, null);
  }
  return parent.next_token();
}

代码示例来源:origin: pentaho/mondrian

CUP$Parser$result = new java_cup.runtime.Symbol(23/*explain_statement*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-3)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT);
CUP$Parser$result = new java_cup.runtime.Symbol(21/*select_or_drillthrough_statement*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT);
CUP$Parser$result = new java_cup.runtime.Symbol(21/*select_or_drillthrough_statement*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT);
CUP$Parser$result = new java_cup.runtime.Symbol(14/*return_item*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT);
CUP$Parser$result = new java_cup.runtime.Symbol(60/*return_item_list*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT);
CUP$Parser$result = new java_cup.runtime.Symbol(60/*return_item_list*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT);
CUP$Parser$result = new java_cup.runtime.Symbol(59/*return_opt*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT);
CUP$Parser$result = new java_cup.runtime.Symbol(59/*return_opt*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT);
CUP$Parser$result = new java_cup.runtime.Symbol(66/*firstrowset_opt*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT);
CUP$Parser$result = new java_cup.runtime.Symbol(66/*firstrowset_opt*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT);
CUP$Parser$result = new java_cup.runtime.Symbol(65/*maxrows_opt*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT);
CUP$Parser$result = new java_cup.runtime.Symbol(65/*maxrows_opt*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT);
CUP$Parser$result = new java_cup.runtime.Symbol(22/*drillthrough_statement*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-4)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT);
CUP$Parser$result = new java_cup.runtime.Symbol(25/*cell_property*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT);
CUP$Parser$result = new java_cup.runtime.Symbol(58/*cell_property_list*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT);

代码示例来源:origin: org.apache.xalan/com.springsource.org.apache.xalan

Symbol newSymbol(int ss, String value) {
  last = ss;
  return new Symbol(ss, value);
}
Symbol newSymbol(int ss, Long value) {

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.xalan

Symbol newSymbol(int ss, Long value) {
  last = ss;
  return new Symbol(ss, value);
}
Symbol newSymbol(int ss, Double value) {

相关文章