Changeset 21776 in project


Ignore:
Timestamp:
12/02/10 17:56:31 (9 years ago)
Author:
Alan Post
Message:

jbogenturfa'i: add tamgau.peg for parser configuration.

It sets toplevel and a custom definition name.

Location:
release/4/jbogenturfahi/trunk
Files:
3 edited
1 copied

Legend:

Unmodified
Added
Removed
  • release/4/jbogenturfahi/trunk/chicken-egg.scm

    r21775 r21776  
    2525   
    2626   jbogenturfahi
    27    gerna)
     27   jbogerna)
    2828
    2929(import chicken)
  • release/4/jbogenturfahi/trunk/jbogenturfahi.scm

    r21775 r21776  
    1818;;;;
    1919
    20 (define jbogenturfahi (genturfahi gerna))
     20(define jbogenturfahi (genturfahi jbogerna))
  • release/4/jbogenturfahi/trunk/jbogenturfahi.setup

    r21697 r21776  
    7575       ("jbogerna.scm" ("gerna.peg"
    7676                        "rafske_gumgau.peg"
    77                         "rafske.peg")
     77                        "rafske.peg"
     78                        "tamgau.peg"
     79                        "jbogenturfahi.meta"
     80                        "jbogenturfahi.setup")
    7881        (call-with-output-file "jbogerna.scm"
    7982          (lambda (port)
    80             (let ((lefpoi (string-append (read-all "gerna.peg")
     83            (let ((lefpoi (string-append (read-all "tamgau.peg")
     84                                         (read-all "gerna.peg")
    8185                                         (read-all "rafske_gumgau.peg")
    8286                                         (read-all "rafske.peg")))
    83                   (gerna (string->symbol (secuxna-definition-name))))
     87                  (tamgau (string->symbol (secuxna-define-name)))
     88                  (text*  (string->symbol "text*")))
    8489              (call-with-input-string
    8590                lefpoi
    8691                (lambda (peg)
    87                   (pretty-print `(define ,gerna ,(genturfahi-peg peg))
     92                  (for-each (lambda (form) (pretty-print form port))
     93                            (genturfahi-peg peg))
     94                  (pretty-print `(define ,tamgau ,text*)
    8895                                port))))))))
    8996
  • release/4/jbogenturfahi/trunk/tamgau.peg

    r21775 r21776  
    11;;;;
    22;;;; jbogenturfahi - lo lojbo ke pe'a jajgau ratcu ke'e genturfa'i
    3 ;;;;               `-> A Lojban grammar parser
     3;;;;            `-> A Scheme packrat parser.
    44;;;;
    55;;;; Copyright (c) 2010 ".alyn.post." <alyn.post@lodockikumazvati.org>
     
    1818;;;;
    1919
    20 (define jbogenturfahi (genturfahi gerna))
     20;; The name of the
     21;;
     22{(define-name "jbogerna")}
     23
     24;; The Chicken Scheme compiler generates better code if I define all
     25;; of the grammar rules at the top-level, rather than in a let.
     26;;
     27{(define-toplevel #t)}
Note: See TracChangeset for help on using the changeset viewer.