Changeset 22052 in project


Ignore:
Timestamp:
12/17/10 14:08:38 (9 years ago)
Author:
Alan Post
Message:

genturfa'i: minor updates to grammar of PEG parser.

I noticed I still had #\space and #\tab hard-coded as space, which
existed because I hadn't yet defined [:space:].

Make some cosmetic changes to end of line and end of file handling.

Location:
release/4/genturfahi/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • release/4/genturfahi/trunk/bootstrap.scm

    r21960 r22052  
    7676    (define (canlubu-33 porsi mapti namapti) (canlubu-71 porsi mapti namapti))
    7777    (define (totoi-34 porsi mapti namapti) (totoi-72 porsi mapti namapti))
    78     (define (CR-35 porsi mapti namapti) (CR-73 porsi mapti namapti))
    79     (define (LF-36 porsi mapti namapti) (LF-74 porsi mapti namapti))
    80     (define (CRLF-37 porsi mapti namapti) (CRLF-75 porsi mapti namapti))
     78    (define (CR-36 porsi mapti namapti) (CR-73 porsi mapti namapti))
     79    (define (LF-37 porsi mapti namapti) (LF-74 porsi mapti namapti))
     80    (define (CRLF-35 porsi mapti namapti) (CRLF-75 porsi mapti namapti))
    8181    (define (FAhO-4 porsi mapti namapti) (FAhO-76 porsi mapti namapti))
    8282    (define cfari-39
     
    8989            canlu-1
    9090            (morji-nunjavni-cmene gerna-3 cmene: "gerna")
    91             FAhO-4))))
     91            (morji-nunjavni-nastura FAhO-4)))))
    9292    (define cfari-samselpla-40
    9393      (nunjavni-morji
     
    645645      (nunjavni-morji
    646646        (morji-nunjavni-jonai
    647           (morji-nunjavni-lerfu #\space)
    648           (morji-nunjavni-lerfu #\tab)
    649           CR-35
    650           LF-36)))
     647          (morji-nunjavni-char-set char-set:whitespace)
     648          CRLF-35)))
    651649    (define totoi-72
    652650      (nunjavni-morji
     
    654652          (morji-nunjavni-lerfu #\;)
    655653          (morji-nunjavni-*
    656             (morji-nunjavni-je (morji-nunjavni-! CRLF-37) (morji-nunjavni-.)))
    657           (morji-nunjavni-jonai CRLF-37 (morji-nunjavni-& FAhO-4)))))
     654            (morji-nunjavni-je (morji-nunjavni-! CRLF-35) (morji-nunjavni-.)))
     655          (morji-nunjavni-jonai CRLF-35 (morji-nunjavni-& FAhO-4)))))
    658656    (define CR-73 (nunjavni-morji (morji-nunjavni-lerfu #\return)))
    659657    (define LF-74 (nunjavni-morji (morji-nunjavni-lerfu #\newline)))
    660658    (define CRLF-75
    661659      (nunjavni-morji
    662         (morji-nunjavni-jonai (morji-nunjavni-je CR-35 LF-36) CR-35 LF-36)))
    663     (define FAhO-76 (nunjavni-morji (morji-nunjavni-fanmo nastura: #t)))
     660        (morji-nunjavni-jonai (morji-nunjavni-je CR-36 LF-37) CR-36 LF-37)))
     661    (define FAhO-76 (nunjavni-morji (morji-nunjavni-fanmo)))
    664662    (tolmohi-nunjavni)
    665663    cfari-39))
  • release/4/genturfahi/trunk/genturfahi.peg

    r21961 r22052  
    6363                   canlu
    6464                   #:gerna gerna
    65                    FAhO
     65                   `FAhO
    6666                -> samselpla-cfari
    6767
     
    260260canlu           <- `(canlubu / totoi)*
    261261
    262 canlubu         <- #\space
    263                  / #\tab
    264                  / CR
    265                  / LF
     262canlubu         <- [[:space:]]
     263                 / CRLF
    266264totoi           <- #\; (!CRLF .)* (CRLF / &FAhO)
    267265
    268266CR              <- #\return
    269267LF              <- #\linefeed
    270 CRLF            <- CR LF
    271                  / CR
    272                  / LF
    273 
    274 FAhO            <- `!.
     268CRLF            <- CR LF / CR / LF
     269
     270FAhO            <- !.
Note: See TracChangeset for help on using the changeset viewer.