- Timestamp:
- 05/13/05 22:25:21 (4 years ago)
- svk:copy_cache_prev:
- 4718
- Files:
-
- 1 modified
-
src/pge/run_pge.pir (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/pge/run_pge.pir
r3079 r3183 1 1 .sub _main 2 .local int spi, spc 2 .local int spi, spc, utf8 3 3 .local pmc args, match, add_rule 4 .local string name, rule, input, result 4 5 .include "iglobals.pasm" 6 5 7 load_bytecode "PGE/Hs.pir" 8 utf8 = charset "utf8" 9 add_rule = find_global "PGE::Hs", "add_rule" 6 10 7 11 getinterp args … … 9 13 spi = 3 10 14 spc = elements args 11 add_rule = find_global "PGE::Hs", "add_rule"12 15 13 16 subrules: 14 17 unless spi < spc goto do_match 15 $S1= args[spi]18 name = args[spi] 16 19 inc spi 17 $S2= args[spi]20 rule = args[spi] 18 21 inc spi 19 add_rule($S1, $S2) 22 trans_charset name, utf8 23 trans_charset rule, utf8 24 add_rule(name, rule) 20 25 goto subrules 21 26 do_match: 22 match = find_global "PGE::Hs", "match" 23 $S1 = args[1] 24 $S2 = args[2] 25 $S0 = match($S1, $S2) 26 print $S0 27 match = find_global "PGE::Hs", "match" 28 input = args[1] 29 rule = args[2] 30 trans_charset input, utf8 31 trans_charset rule, utf8 32 result = match(input, rule) 33 print result 27 34 .end
