Subversion Repositories Projects

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
255 ligi 1
require 'rubygems'
2
require 'rio'
3
 
4
last_i=0
5
puts `rm -v langpacks/l`
6
langpack=rio("langpacks/l")
7
 
8
langdef=rio("../../shared/src/DUBwiseLangDefs.java")
9
 
10
langdef < "package org.ligi.ufo;\npublic interface DUBwiseLangDefs \n { \n"
11
 
12
rio("lang_base").read.split("\n").each_with_index { |l,i|
13
  langdef << " public final static int STRINGID_" + l.split(";").first+"="+i.to_s+";\n"
14
 
15
  l=l.split(";")[1..-1].join(";")+"\n"
16
  langpack<<l
17
 
18
  last_i=i
19
}
20
 
21
langdef <<  " public final static int STRING_COUNT=" + (last_i+1).to_s+";"
22
langdef << "\n}\n"