From 509800c0df0632679dd3ee854af18afa1addcdab Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Sat, 2 Jul 2011 10:37:53 -0400 Subject: [PATCH] ".ss" -> ".rkt" scan done. original commit: 3157955d40f89d83fb3d5fa7a2f20639cda69579 --- collects/parser-tools/examples/read.rkt | 2 +- collects/parser-tools/lex.rkt | 12 ++++---- collects/parser-tools/private-lex/deriv.rkt | 4 +-- .../parser-tools/private-lex/error-tests.rkt | 2 +- collects/parser-tools/private-lex/front.rkt | 10 +++---- collects/parser-tools/private-lex/re.rkt | 2 +- collects/parser-tools/private-lex/stx.rkt | 4 +-- collects/parser-tools/private-lex/token.rkt | 2 +- .../private-lex/unicode-chars.rkt | 2 +- .../parser-tools/private-yacc/grammar.rkt | 2 +- .../private-yacc/input-file-parser.rkt | 12 ++++---- collects/parser-tools/private-yacc/lalr.rkt | 14 +++++----- collects/parser-tools/private-yacc/lr0.rkt | 12 ++++---- .../private-yacc/parser-actions.rkt | 2 +- .../private-yacc/parser-builder.rkt | 8 +++--- collects/parser-tools/private-yacc/table.rkt | 14 +++++----- .../parser-tools/private-yacc/yacc-helper.rkt | 4 +-- collects/parser-tools/yacc.rkt | 28 +++++++++---------- 18 files changed, 68 insertions(+), 68 deletions(-) diff --git a/collects/parser-tools/examples/read.rkt b/collects/parser-tools/examples/read.rkt index a07d537..842eff7 100644 --- a/collects/parser-tools/examples/read.rkt +++ b/collects/parser-tools/examples/read.rkt @@ -59,7 +59,7 @@ [comment (:: #\; (:* (:~ #\newline)) #\newline)] - ;; See ${PLTHOME}/collects/syntax-color/scheme-lexer.ss for an example of + ;; See ${PLTHOME}/collects/syntax-color/scheme-lexer.rkt for an example of ;; using regexp macros to avoid the cut and paste. ; [numR (:: prefixR complexR)] ; [complexR (:or realR diff --git a/collects/parser-tools/lex.rkt b/collects/parser-tools/lex.rkt index f495f10..e71f634 100644 --- a/collects/parser-tools/lex.rkt +++ b/collects/parser-tools/lex.rkt @@ -2,19 +2,19 @@ ;; Provides the syntax used to create lexers and the functions needed to ;; create and use the buffer that the lexer reads from. See docs. - + (require-for-syntax mzlib/list syntax/stx syntax/define syntax/boundmap - "private-lex/util.ss" - "private-lex/actions.ss" - "private-lex/front.ss" - "private-lex/unicode-chars.ss") + "private-lex/util.rkt" + "private-lex/actions.rkt" + "private-lex/front.rkt" + "private-lex/unicode-chars.rkt") (require mzlib/stxparam syntax/readerr - "private-lex/token.ss") + "private-lex/token.rkt") (provide lexer lexer-src-pos define-lex-abbrev define-lex-abbrevs define-lex-trans diff --git a/collects/parser-tools/private-lex/deriv.rkt b/collects/parser-tools/private-lex/deriv.rkt index e398d4f..28919a3 100644 --- a/collects/parser-tools/private-lex/deriv.rkt +++ b/collects/parser-tools/private-lex/deriv.rkt @@ -2,8 +2,8 @@ (require mzlib/list (prefix is: mzlib/integer-set) - "re.ss" - "util.ss") + "re.rkt" + "util.rkt") (provide build-dfa print-dfa (struct dfa (num-states start-state final-states/actions transitions))) diff --git a/collects/parser-tools/private-lex/error-tests.rkt b/collects/parser-tools/private-lex/error-tests.rkt index 0c97660..c4afaee 100644 --- a/collects/parser-tools/private-lex/error-tests.rkt +++ b/collects/parser-tools/private-lex/error-tests.rkt @@ -1,6 +1,6 @@ #lang scheme/base (require (for-syntax scheme/base) - "../lex.ss" + "../lex.rkt" rackunit) (define-syntax (catch-syn-error stx) diff --git a/collects/parser-tools/private-lex/front.rkt b/collects/parser-tools/private-lex/front.rkt index da190e1..f74c003 100644 --- a/collects/parser-tools/private-lex/front.rkt +++ b/collects/parser-tools/private-lex/front.rkt @@ -1,11 +1,11 @@ (module front mzscheme (require (prefix is: mzlib/integer-set) mzlib/list - syntax/stx - "util.ss" - "stx.ss" - "re.ss" - "deriv.ss") + syntax/stx + "util.rkt" + "stx.rkt" + "re.rkt" + "deriv.rkt") (provide build-lexer) diff --git a/collects/parser-tools/private-lex/re.rkt b/collects/parser-tools/private-lex/re.rkt index 3eaf3a7..9da62de 100644 --- a/collects/parser-tools/private-lex/re.rkt +++ b/collects/parser-tools/private-lex/re.rkt @@ -2,7 +2,7 @@ (require mzlib/list scheme/match (prefix is: mzlib/integer-set) - "util.ss") + "util.rkt") (provide ->re build-epsilon build-zero build-char-set build-concat build-repeat build-or build-and build-neg diff --git a/collects/parser-tools/private-lex/stx.rkt b/collects/parser-tools/private-lex/stx.rkt index 37c6bc5..83d610a 100644 --- a/collects/parser-tools/private-lex/stx.rkt +++ b/collects/parser-tools/private-lex/stx.rkt @@ -1,6 +1,6 @@ (module stx mzscheme (require syntax/boundmap - "util.ss") + "util.rkt") (provide parse) @@ -32,7 +32,7 @@ (define (disarm stx) (syntax-disarm stx orig-insp)) - ;; parse : syntax-object (box (list-of syntax-object)) -> s-re (see re.ss) + ;; parse : syntax-object (box (list-of syntax-object)) -> s-re (see re.rkt) ;; checks for errors and generates the plain s-exp form for s ;; Expands lex-abbrevs and applies lex-trans. (define (parse stx disappeared-uses) diff --git a/collects/parser-tools/private-lex/token.rkt b/collects/parser-tools/private-lex/token.rkt index e78467a..1d2dc0d 100644 --- a/collects/parser-tools/private-lex/token.rkt +++ b/collects/parser-tools/private-lex/token.rkt @@ -1,6 +1,6 @@ (module token mzscheme - (require-for-syntax "token-syntax.ss") + (require-for-syntax "token-syntax.rkt") ;; Defining tokens diff --git a/collects/parser-tools/private-lex/unicode-chars.rkt b/collects/parser-tools/private-lex/unicode-chars.rkt index fb4a134..3177bb5 100644 --- a/collects/parser-tools/private-lex/unicode-chars.rkt +++ b/collects/parser-tools/private-lex/unicode-chars.rkt @@ -1,5 +1,5 @@ (module unicode-chars mzscheme - (require "util.ss") + (require "util.rkt") (provide (all-defined)) diff --git a/collects/parser-tools/private-yacc/grammar.rkt b/collects/parser-tools/private-yacc/grammar.rkt index fe20c5a..5b27699 100644 --- a/collects/parser-tools/private-yacc/grammar.rkt +++ b/collects/parser-tools/private-yacc/grammar.rkt @@ -5,7 +5,7 @@ (require mzlib/class mzlib/list - "yacc-helper.ss" + "yacc-helper.rkt" mzlib/contract) ;; Each production has a unique index 0 <= index <= number of productions diff --git a/collects/parser-tools/private-yacc/input-file-parser.rkt b/collects/parser-tools/private-yacc/input-file-parser.rkt index 5c6771c..68accf4 100644 --- a/collects/parser-tools/private-yacc/input-file-parser.rkt +++ b/collects/parser-tools/private-yacc/input-file-parser.rkt @@ -1,11 +1,11 @@ (module input-file-parser mzscheme ;; routines for parsing the input to the parser generator and producing a - ;; grammar (See grammar.ss) + ;; grammar (See grammar.rkt) - (require "yacc-helper.ss" - "../private-lex/token-syntax.ss" - "grammar.ss" + (require "yacc-helper.rkt" + "../private-lex/token-syntax.rkt" + "grammar.rkt" mzlib/class mzlib/contract) (require-for-template mzscheme) @@ -57,7 +57,7 @@ (values args biggest-pos)))) ;; Given the list of terminal symbols and the precedence/associativity definitions, - ;; builds terminal structures (See grammar.ss) + ;; builds terminal structures (See grammar.rkt) ;; build-terms: symbol list * symbol list list -> term list (define (build-terms term-list precs) (let ((counter 0) @@ -87,7 +87,7 @@ (hash-table-get prec-table term-sym (lambda () #f)))) term-list))) - ;; Retrieves the terminal symbols from a terminals-def (See terminal-syntax.ss) + ;; Retrieves the terminal symbols from a terminals-def (See terminal-syntax.rkt) ;; get-terms-from-def: identifier? -> (listof identifier?) (define (get-terms-from-def term-syn) (let ((t (syntax-local-value term-syn (lambda () #f)))) diff --git a/collects/parser-tools/private-yacc/lalr.rkt b/collects/parser-tools/private-yacc/lalr.rkt index 4585c56..3fb1953 100644 --- a/collects/parser-tools/private-yacc/lalr.rkt +++ b/collects/parser-tools/private-yacc/lalr.rkt @@ -1,11 +1,11 @@ (module lalr mzscheme - + ;; Compute LALR lookaheads from DeRemer and Pennello 1982 - - (require "lr0.ss" - "grammar.ss" - mzlib/list - mzlib/class) + + (require "lr0.rkt" + "grammar.rkt" + mzlib/list + mzlib/class) (provide compute-LA) @@ -228,7 +228,7 @@ ;; -> (trans-key -> term list) ;; DeRemer and Pennello 1982 ;; Computes (f x) = (f- x) union Union{(f y) | y in (edges x)} - ;; A specialization of digraph in the file graph.ss + ;; A specialization of digraph in the file graph.rkt (define (digraph-tk->terml nodes edges f- num-states) (letrec ( ;; Will map elements of trans-key to term sets represented as bit vectors diff --git a/collects/parser-tools/private-yacc/lr0.rkt b/collects/parser-tools/private-yacc/lr0.rkt index 6cc5460..ac359ac 100644 --- a/collects/parser-tools/private-yacc/lr0.rkt +++ b/collects/parser-tools/private-yacc/lr0.rkt @@ -2,14 +2,14 @@ ;; Handle the LR0 automaton - (require "grammar.ss" - "graph.ss" - mzlib/list - mzlib/class) + (require "grammar.rkt" + "graph.rkt" + mzlib/list + mzlib/class) (provide build-lr0-automaton lr0% - (struct trans-key (st gs)) trans-key-list-remove-dups - kernel-items kernel-index) + (struct trans-key (st gs)) trans-key-list-remove-dups + kernel-items kernel-index) ;; kernel = (make-kernel (LR1-item list) index) ;; the list must be kept sorted according to item . diff --git a/collects/parser-tools/private-yacc/yacc-helper.rkt b/collects/parser-tools/private-yacc/yacc-helper.rkt index 128968e..31b3cc6 100644 --- a/collects/parser-tools/private-yacc/yacc-helper.rkt +++ b/collects/parser-tools/private-yacc/yacc-helper.rkt @@ -1,8 +1,8 @@ (module yacc-helper mzscheme (require mzlib/list - "../private-lex/token-syntax.ss") - + "../private-lex/token-syntax.rkt") + ;; General helper routines (provide duplicate-list? remove-duplicates overlap? vector-andmap display-yacc) diff --git a/collects/parser-tools/yacc.rkt b/collects/parser-tools/yacc.rkt index b26c711..9a3cc3c 100644 --- a/collects/parser-tools/yacc.rkt +++ b/collects/parser-tools/yacc.rkt @@ -1,19 +1,19 @@ #lang scheme/base (require (for-syntax scheme/base - "private-yacc/parser-builder.ss" - "private-yacc/grammar.ss" - "private-yacc/yacc-helper.ss" - "private-yacc/parser-actions.ss")) - (require "private-lex/token.ss" - "private-yacc/parser-actions.ss" - mzlib/etc - mzlib/pretty - syntax/readerr) - - (provide parser) - - + "private-yacc/parser-builder.rkt" + "private-yacc/grammar.rkt" + "private-yacc/yacc-helper.rkt" + "private-yacc/parser-actions.rkt")) +(require "private-lex/token.rkt" + "private-yacc/parser-actions.rkt" + mzlib/etc + mzlib/pretty + syntax/readerr) + +(provide parser) + + ;; convert-parse-table : (vectorof (listof (cons/c gram-sym? action?))) -> ;; (vectorof (symbol runtime-action hashtable)) (define-for-syntax (convert-parse-table table) @@ -255,7 +255,7 @@ ;; The table is a vector that maps each state to a hash-table that maps a ;; terminal symbol to either an accept, shift, reduce, or goto structure. ; We encode the structures according to the runtime-action data definition in - ;; parser-actions.ss + ;; parser-actions.rkt (define (parser-body debug? err starts ends table all-term-syms actions src-pos) (local ((define extract (if src-pos