Changeset 14685 in project


Ignore:
Timestamp:
05/18/09 03:03:15 (10 years ago)
Author:
Ivan Raikov
Message:

lexgen ported to Chicken 4

Location:
release/4/lexgen
Files:
4 edited
1 copied

Legend:

Unmodified
Added
Removed
  • release/4/lexgen/trunk/lexgen.meta

    r13954 r14685  
    55 ; List here all the files that should be bundled as part of your egg. 
    66
    7  (files "lexgen.setup" "lexgen.scm" "tests/run.scm" "lexgen.html" )
     7 (files "lexgen.setup" "lexgen.scm" "tests" "lexgen.html" )
    88
    99 ; Your egg's license:
     
    1818 ; A list of eggs lexgen depends on.
    1919
    20  (needs syntax-case matchable )
     20 (needs matchable )
     21
    2122 (test-depends test)
    2223
  • release/4/lexgen/trunk/lexgen.scm

    r13290 r14685  
    3939;;
    4040
    41 (define-extension lexgen)
     41(module lexgen
    4242
    43 (declare
    44  (not usual-integrations)
    45  (fixnum)
    46  (inline)
    47  (lambda-lift)
    48  (export tok seq star bar
    49          try pos opt char
    50          set range lit
    51          longest lex))
     43  ( tok seq star bar
     44    try pos opt char
     45    set range lit
     46    longest lex )
    5247
    5348
    54 (require-extension syntax-case)
    55 (require-extension matchable)
    56 (require-extension srfi-1)
    57 (require-extension srfi-14)
     49   (import scheme chicken data-structures srfi-1 srfi-14)
     50   (require-extension matchable)
    5851
    5952;;
     
    187180         (res    (longest (pat `((() ,stream))))))
    188181    (and res (list (reverse (first res)) (second res)))))
     182
     183)
  • release/4/lexgen/trunk/lexgen.setup

    r13993 r14685  
    11;; -*- Hen -*-
    2 
    3 (define has-exports? (string>=? (chicken-version) "2.310"))
    42
    53(define (dynld-name fn)         
    64  (make-pathname #f fn ##sys#load-dynamic-extension))   
    75
    8 (compile -O2 -d0 -s
    9          ,@(if has-exports? '(-check-imports -emit-exports lexgen.exports) '())
    10          lexgen.scm)
     6(compile -O2 -d0 -s lexgen.scm -j lexgen)
     7(compile -O2 -d0 -s lexgen.import.scm)
    118
    129(install-extension
     
    1613
    1714  ;; Files to install for your extension:
    18   `(,(dynld-name "lexgen")
    19     ,@(if has-exports? '("lexgen.exports") (list)) )
     15  `(,(dynld-name "lexgen") ,(dynld-name "lexgen.import") )
    2016 
    2117
    2218  ;; Assoc list with properties for your extension:
    23   '((version 1.3)
     19  '((version 1.4)
    2420    (documentation "lexgen.html")
    25     ,@(if has-exports? `((exports "lexgen.exports")) (list)) ))
     21    ))
  • release/4/lexgen/trunk/tests/run.scm

    r13288 r14685  
    11
    2 (require-extension srfi-1)
    3 
    4 (load "../lexgen.scm")
    5 
    6 (require-extension test)
     2(require-extension lexgen srfi-1 srfi-14 test)
    73
    84
Note: See TracChangeset for help on using the changeset viewer.