📄 iclastdataq.java
字号:
package com.sri.oaa2.icl;
import antlr_oaa.Token;
import antlr_oaa.RecognitionException;
import java.io.*;
final class IclASTDataQ extends IclAST
{
/**
* Construct a new IclDataQ from a token.
*/
public IclASTDataQ(Token t)
{
try {
System.gc();
byte[] data = t.getText().getBytes("ISO-8859-1");
IclDataQ dq = new IclDataQ(data);
dq.fixQuotes();
this.setIclTerm(dq);
}
catch(UnsupportedEncodingException uee) {
throw new RuntimeException("ISO-8859-1 encoding not supported");
}
}
/**
* Set raw length from a token representing an integer number.
*/
public void setRawLen(Token t) throws RecognitionException
{
try {
((IclDataQ)this.getIclTerm()).setRawLen(Integer.parseInt(t.getText()));
}
catch(Exception e) {
throw new RecognitionException("Error parsing rawlen text: " + t.getText());
}
}
/**
* Set the number of double quotes from a token (from parsing).
*/
public void setNumQuotes(Token t) throws RecognitionException
{
try {
((IclDataQ)(this.getIclTerm())).setNumQuotes(Integer.parseInt(t.getText()));
}
catch(Exception e) {
throw new RecognitionException("Error parsing rawlen text: " + t.getText());
}
}
public void setNumQuotes(int n)
{
((IclDataQ)(this.getIclTerm())).setNumQuotes(n);
}
public void setRawLen(int r)
{
((IclDataQ)(this.getIclTerm())).setRawLen(r);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -