#lang racket/base

(provide rule/racket
         add-rule)

(require racket/list)

(define (add-rule rules)
  (for/hash ([r rules])
    (values (symbol->string (first r)) (second r))))

(define rule/racket
  3.1 Modules
    (module 2)
    (module* 2)
    (module+ 1)
  3.8 Procedure Expressions
    (lambda 1)
    (λ 1)
    (#%plain-lambda 1)
  3.9 Local Binding
    (let 1)
  ignore ( let 2 ) , at that case , we expect procedure name and arguments at the same line
    (let* 1)
    (letrec 1)
    (let-values 1)
    (let*-values 1)
    (letrec-values 1)
    (let-syntax 1)
    (letrec-syntax 1)
    (let-syntaxes 1)
    (letrec-syntaxes 1)
    (letrec-syntaxes+values 2)
  3.10 Local Definitions
    (local 1)
  3.11 Constructing Graphs
    (shared 1)
  3.13 Dispatch
    (case 1)
  3.14 Definitions
    (define 1)
    (define-values 1)
    (define-syntax 1)
    (define-syntaxes 1)
    (define-for-syntax 1)
    (define-values-for-syntax 1)
    (define-require-syntax 1)
    (define-provide-syntax 1)
  3.16 Guarded Evaluation
    (when 1)
    (unless 1)
  3.18 Iterations and 
    (for 1)
    (for/list 1)
    (for/vector 1)
    (for/hash 1)
    (for/hasheq 1)
    (for/hasheqv 1)
    (for/hashalw 1)
    (for/and 1)
    (for/or 1)
    (for/sum 1)
    (for/product 1)
    (for/lists 2)
    (for/first 1)
    (for/last 1)
    (for/fold 2)
    (for/foldr 2)

    (for* 1)
    (for*/list 1)
    (for*/lists 2)
    (for*/vector 1)
    (for*/hash 1)
    (for*/hasheq 1)
    (for*/hasheqv 1)
    (for*/hashalw 1)
    (for*/and 1)
    (for*/or 1)
    (for*/sum 1)
    (for*/product 1)
    (for*/first 1)
    (for*/last 1)
    (for*/fold 2)
    (for*/foldr 2)

    (for/fold/derived 3)
    (for*/fold/derived 3)
    (for/foldr/derived 3)
    (for*/foldr/derived 3)
    (define-splicing-for-clause-syntax 1)
    (do 2)
  3.25 Performance Hints
    (define-inline 1)
  4.16.2 Streams
    (for/stream 1)
    (for*/stream 1)
  4.16.3 Generators
    (generator 1)
  4.18 Sets
    (for/set 1)
    (for/seteq 1)
    (for/seteqv 1)
    (for/setalw 1)
    (for*/set 1)
    (for*/seteq 1)
    (for*/seteqv 1)
    (for*/setalw 1)
    (for/mutable-set 1)
    (for/mutable-seteq 1)
    (for/mutable-seteqv 1)
    (for/mutable-setalw 1)
    (for*/mutable-set 1)
    (for*/mutable-seteq 1)
    (for*/mutable-seteqv 1)
    (for*/mutable-setalw 1)
    (for/weak-set 1)
    (for/weak-seteq 1)
    (for/weak-seteqv 1)
    (for/weak-setalw 1)
    (for*/weak-set 1)
    (for*/weak-seteq 1)
    (for*/weak-seteqv 1)
    (for*/weak-setalw 1)
  5 Structures
    (struct 1)
    (define-struct 1)
    (struct/derived 1)
    (define-struct/derived 1)
    (define-generics 1)
    (generic-instance/c 1)
    (impersonate-generics 2)
    (chaperone-generics 2)
    (redirect-generics 3)
  6 Classes and Objects
    (interface 1)
    (interface* 2)
    (class* 1)
    (class 1)
    (define/public 1)
    (define/pubment 1)
    (define/public-final 1)
    (define/override 1)
    (define/overment 1)
    (define/override-final 1)
    (define/augment 1)
    (define/augride 1)
    (define/augment-final 1)
    (define/private 1)
    (class/derived 1)

    (with-method 1)
    (define-serializable-class* 1)
    (define-serializable-class 1)

  7 Units
    (define-signature 1)
    (define-values/invoke-unit 1)
    (define-unit 1)
    (define-compound-unit 1)
    (define-compound-unit/infer 1)
    (define-unit-binding 1)
    (define-unit/new-import-export 1)
    (define-signature-form 1)
    (struct/ctc 1)
    (define-unit/contract 1)

  8 Contracts
    (for/async 1)
    (struct/c 1)
    (struct/dc 1)
    (flat-rec-contract 1)
    (flat-murec-contract 1)
    (contract-struct 1)
    (define-contract-struct 1)
    (with-contract 2)
    (define/contract 1)
    (struct/contract 1)
    (define-struct/contract 1)
    (with-contract-continuation-mark 1)
    (define/final-prop 1)
    (define/subexpression-pos-prop 1)
    (define-opt/c 1)

    ;; 9 Pattern Matching
    (match 1)
    (match* 1)
    (match/values 1)
    (define/match 1)
    (match-let 1)
    (match-let* 1)
    (match-let-values 1)
    (match-let*-values 1)
    (match-letrec 1)
    (match-letrec-values 1)
    (define-match-expander 1)
    (match-derived 2)
    (match*/derived 2)
    (struct* 1)

  10 Control Flow
    (with-handlers 1)
    (with-handlers* 1)
    (for/list/concurrent 1)
    (for*/list/concurrent 1)
    (let/ec 1)
    (parameterize-break 1)

  11 Concurrency and Parallelism
    (parameterize 1)
    (parameterize* 1)
    (for/async 1)
    (for*/async 1)
    (place 1)
    (place/context 1)

  12 Macros
    (syntax-case 2)
    (syntax-case* 3)
    (with-syntax 1)
    (syntax/loc 1)
    (quasisyntax/loc 1)
    (syntax-rules 1)
    (syntax-id-rules 1)
    (define-syntax-rule 1)
    (define-syntax-parameter 1)
    (syntax-parameterize 1)
    (define-rename-transformer-parameter 1)
    (define/with-syntax 1)
    (with-syntax* 1)

    ;; 13 Input and Output
    (call-with-input-file 1)
    (call-with-input-file* 1)
    (call-with-output-file 1)
    (call-with-output-file* 1)
    (with-input-from-file 1)
    (with-output-to-file 1)

    (call-with-input-string 1)
    (call-with-input-bytes 1)
    (with-input-from-string 1)
    (with-input-from-bytes 1)

  15 Operating System
    (define-runtime-path 1)
    (define-runtime-paths 1)
    (define-runtime-path-list 1)
    (define-runtime-module-path-index 1)
    (with-logging-to-port 1)
    ))


 9 Pattern Matching
 13 Input and Output
#lang racket/base

(provide rule/racket
         add-rule)

(require racket/list)

(define (add-rule rules)
  (for/hash ([r rules])
    (values (symbol->string (first r)) (second r))))

(define rule/racket
  3.1 Modules
    (module 2)
    (module* 2)
    (module+ 1)
  3.8 Procedure Expressions
    (lambda 1)
    (λ 1)
    (#%plain-lambda 1)
  3.9 Local Binding
    (let 1)
  ignore ( let 2 ) , at that case , we expect procedure name and arguments at the same line
    (let* 1)
    (letrec 1)
    (let-values 1)
    (let*-values 1)
    (letrec-values 1)
    (let-syntax 1)
    (letrec-syntax 1)
    (let-syntaxes 1)
    (letrec-syntaxes 1)
    (letrec-syntaxes+values 2)
  3.10 Local Definitions
    (local 1)
  3.11 Constructing Graphs
    (shared 1)
  3.13 Dispatch
    (case 1)
  3.14 Definitions
    (define 1)
    (define-values 1)
    (define-syntax 1)
    (define-syntaxes 1)
    (define-for-syntax 1)
    (define-values-for-syntax 1)
    (define-require-syntax 1)
    (define-provide-syntax 1)
  3.16 Guarded Evaluation
    (when 1)
    (unless 1)
  3.18 Iterations and 
    (for 1)
    (for/list 1)
    (for/vector 1)
    (for/hash 1)
    (for/hasheq 1)
    (for/hasheqv 1)
    (for/hashalw 1)
    (for/and 1)
    (for/or 1)
    (for/sum 1)
    (for/product 1)
    (for/lists 2)
    (for/first 1)
    (for/last 1)
    (for/fold 2)
    (for/foldr 2)

    (for* 1)
    (for*/list 1)
    (for*/lists 2)
    (for*/vector 1)
    (for*/hash 1)
    (for*/hasheq 1)
    (for*/hasheqv 1)
    (for*/hashalw 1)
    (for*/and 1)
    (for*/or 1)
    (for*/sum 1)
    (for*/product 1)
    (for*/first 1)
    (for*/last 1)
    (for*/fold 2)
    (for*/foldr 2)

    (for/fold/derived 3)
    (for*/fold/derived 3)
    (for/foldr/derived 3)
    (for*/foldr/derived 3)
    (define-splicing-for-clause-syntax 1)
    (do 2)
  3.25 Performance Hints
    (define-inline 1)
  4.16.2 Streams
    (for/stream 1)
    (for*/stream 1)
  4.16.3 Generators
    (generator 1)
  4.18 Sets
    (for/set 1)
    (for/seteq 1)
    (for/seteqv 1)
    (for/setalw 1)
    (for*/set 1)
    (for*/seteq 1)
    (for*/seteqv 1)
    (for*/setalw 1)
    (for/mutable-set 1)
    (for/mutable-seteq 1)
    (for/mutable-seteqv 1)
    (for/mutable-setalw 1)
    (for*/mutable-set 1)
    (for*/mutable-seteq 1)
    (for*/mutable-seteqv 1)
    (for*/mutable-setalw 1)
    (for/weak-set 1)
    (for/weak-seteq 1)
    (for/weak-seteqv 1)
    (for/weak-setalw 1)
    (for*/weak-set 1)
    (for*/weak-seteq 1)
    (for*/weak-seteqv 1)
    (for*/weak-setalw 1)
  5 Structures
    (struct 1)
    (define-struct 1)
    (struct/derived 1)
    (define-struct/derived 1)
    (define-generics 1)
    (generic-instance/c 1)
    (impersonate-generics 2)
    (chaperone-generics 2)
    (redirect-generics 3)
  6 Classes and Objects
    (interface 1)
    (interface* 2)
    (class* 1)
    (class 1)
    (define/public 1)
    (define/pubment 1)
    (define/public-final 1)
    (define/override 1)
    (define/overment 1)
    (define/override-final 1)
    (define/augment 1)
    (define/augride 1)
    (define/augment-final 1)
    (define/private 1)
    (class/derived 1)

    (with-method 1)
    (define-serializable-class* 1)
    (define-serializable-class 1)

  7 Units
    (define-signature 1)
    (define-values/invoke-unit 1)
    (define-unit 1)
    (define-compound-unit 1)
    (define-compound-unit/infer 1)
    (define-unit-binding 1)
    (define-unit/new-import-export 1)
    (define-signature-form 1)
    (struct/ctc 1)
    (define-unit/contract 1)

  8 Contracts
    (for/async 1)
    (struct/c 1)
    (struct/dc 1)
    (flat-rec-contract 1)
    (flat-murec-contract 1)
    (contract-struct 1)
    (define-contract-struct 1)
    (with-contract 2)
    (define/contract 1)
    (struct/contract 1)
    (define-struct/contract 1)
    (with-contract-continuation-mark 1)
    (define/final-prop 1)
    (define/subexpression-pos-prop 1)
    (define-opt/c 1)

    (match 1)
    (match* 1)
    (match/values 1)
    (define/match 1)
    (match-let 1)
    (match-let* 1)
    (match-let-values 1)
    (match-let*-values 1)
    (match-letrec 1)
    (match-letrec-values 1)
    (define-match-expander 1)
    (match-derived 2)
    (match*/derived 2)
    (struct* 1)

  10 Control Flow
    (with-handlers 1)
    (with-handlers* 1)
    (for/list/concurrent 1)
    (for*/list/concurrent 1)
    (let/ec 1)
    (parameterize-break 1)

  11 Concurrency and Parallelism
    (parameterize 1)
    (parameterize* 1)
    (for/async 1)
    (for*/async 1)
    (place 1)
    (place/context 1)

  12 Macros
    (syntax-case 2)
    (syntax-case* 3)
    (with-syntax 1)
    (syntax/loc 1)
    (quasisyntax/loc 1)
    (syntax-rules 1)
    (syntax-id-rules 1)
    (define-syntax-rule 1)
    (define-syntax-parameter 1)
    (syntax-parameterize 1)
    (define-rename-transformer-parameter 1)
    (define/with-syntax 1)
    (with-syntax* 1)

    (call-with-input-file 1)
    (call-with-input-file* 1)
    (call-with-output-file 1)
    (call-with-output-file* 1)
    (with-input-from-file 1)
    (with-output-to-file 1)

    (call-with-input-string 1)
    (call-with-input-bytes 1)
    (with-input-from-string 1)
    (with-input-from-bytes 1)

  15 Operating System
    (define-runtime-path 1)
    (define-runtime-paths 1)
    (define-runtime-path-list 1)
    (define-runtime-module-path-index 1)
    (with-logging-to-port 1)
    ))

