/usr/share/doc/jflex/examples/interpreter/Tnumber.java is in jflex 1.6.1-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright (C) 2001 Gerwin Klein <lsf@jflex.de> *
* Copyright (C) 2001 Bernhard Rumpe <rumpe@in.tum.de> *
* All rights reserved. *
* *
* License: BSD *
* *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**
* AST node for a number
*/
class Tnumber extends Texp implements AST {
int n; // value of the number
public Tnumber(String s) {
try { n = Integer.parseInt(s); }
catch (NumberFormatException e) { n=-1; };
}
public String toString() {
return(""+n);
}
public void checkcontext(SymTab st) {
}
public void prepInterp(SymTab st) {
}
public int interpret(int[] in, int[] par) {
return(n);
}
}
|