Re: Where are the compilers (e.g. gcc, python, javac, etc) coded?

From: Noli Sicad <nsi....at.gmail.com>
Date: Fri, 19 Feb 2010 21:45:13 +1100

OK. I found it. It is in modules/textadept/run.lua

run_commands = {
  c = '%(filedir)%(filename_noext)',
  cpp = '%(filedir)%(filename_noext)',
  java = function()
      local buffer = buffer
      local text = buffer:get_text()
      local s, e, package
      repeat
        s, e, package = text:find('package%s+([^;]+)', e or 1)
      until not s or buffer:get_style_name(buffer.style_at[s]) ~= 'comment'
      if package then
        local classpath = ''
        for dot in package:gmatch('%.') do classpath = classpath..'../' end
        return 'java -cp '..(WIN32 and '%CLASSPATH%;' or '$CLASSPATH:')..
          classpath..'../ '..package..'.%(filename_noext)'
      else
        return 'java %(filename_noext)'
      end
    end,
  lua = 'lua %(filename)',
  pl = 'perl %(filename)',
  php = 'php -f %(filename)',
  py = 'python %(filename)',
  rb = 'ruby %(filename)',
  mod = 'glpsol --math %(filename)',
  mps = 'glpsol --mps %(filename)',
  lp = 'glpsol --lp %(filename)',
}

Now, I am really suprise why this does not work while in terminal it works.

In TextAdept, not working

> glpsol -m assign.mod
sh: glpsol: command not found

Terminal -----working

toto:~ root# glpsol --help
Usage: glpsol [options...] filename

General options:
   --mps read LP/MIP problem in fixed MPS format
   --freemps read LP/MIP problem in free MPS format (default)
   --lp read LP/MIP problem in CPLEX LP format
   --glp read LP/MIP problem in GLPK format
   --math read LP/MIP model written in GNU MathProg modeling
                     language
   -m filename, --model filename

How do I fix these commands below?

  mod = 'glpsol --math %(filename)',
  mps = 'glpsol --mps %(filename)',
  lp = 'glpsol --lp %(filename)',

I am hacking in Mac OS X 10.5.8.

Noli

On 2/19/10, Noli Sicad <nsi....at.gmail.com> wrote:
> Hi,
>
> I am trying to create new lexer - gmpl (mathprog) for GLPK. I am
> looking where are the compilers coded (e.g. gcc, python, javac, php,
> ruby, etc.) coded, what is the name of the file or files? What is the
> equivalent file to the scite.properties file in scite-tools?
>
> Thank you.
>
> Noli
>
Received on Fri 19 Feb 2010 - 05:45:13 EST

This archive was generated by hypermail 2.2.0 : Thu 08 Mar 2012 - 11:39:21 EST