[uim-commit] r1946 - branches/r5rs/sigscheme/script
yamaken at freedesktop.org
yamaken at freedesktop.org
Tue Nov 1 17:43:56 PST 2005
Author: yamaken
Date: 2005-11-01 17:43:51 -0800 (Tue, 01 Nov 2005)
New Revision: 1946
Modified:
branches/r5rs/sigscheme/script/build_func_table.rb
Log:
* sigscheme/script/build_func_table.rb
- Make hash-bang portable
- ($SCM2C_FUNCNAME_RULE): Complement some rules
Modified: branches/r5rs/sigscheme/script/build_func_table.rb
===================================================================
--- branches/r5rs/sigscheme/script/build_func_table.rb 2005-11-02 01:17:02 UTC (rev 1945)
+++ branches/r5rs/sigscheme/script/build_func_table.rb 2005-11-02 01:43:51 UTC (rev 1946)
@@ -1,4 +1,4 @@
-#!/usr/bin/ruby
+#!/usr/bin/env ruby
#===========================================================================
# FileName : build_func_table.rb
# About : script to building built-in function table
@@ -39,6 +39,7 @@
$FUNC_TYPE_REDUCTION = 3
$SCM2C_FUNCNAME_RULE = [
+ # prefix
[/^\+/, "add"],
[/^\*/, "multiply"],
[/^-/, "subtract"],
@@ -49,11 +50,18 @@
[/^>/, "greater"],
[/^\=/, "equal"],
- [/\*/, "star"],
+ # suffix
+ [/\?$/, "p"],
+ [/!$/, "d"],
+
+ # suffix or intermediate
+ [/-/, "_"],
[/->/, "2"],
- [/\?/, "p"],
- [/!/, "d"],
- [/-/, "_"]
+ [/\?/, "_"],
+ [/!/, "_"],
+ [/\=/, "equal"],
+ [/\*/, "star"],
+ [/\+/, "plus"],
]
def guess_c_funcname(scm_funcname, type)
More information about the uim-commit
mailing list