DXR is a code search and navigation tool aimed at making sense of large projects. It supports full-text and regex searches as well as structural queries.

Untracked file

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
(progn
  (defparameter *ltw*
    (generate-world
     "LT"
     '((lexer loop-test-lexer
              :lalr-1
              :main
              ()
              ())
       
       (deftype semantic-exception integer)
       
       (rule :main ((value string))
         (production :main () main-expr
           (value (append (loop-test) (for-each-test)))))
       (%print-actions)
       
       (define (for-each-test) string
         (var s string "<")
         (for-each "abc" x
           (<- s (append s (vector #\- x))))
         (for-each (list-set-of character #\x #\y #\z) x
           (<- s (append s (vector #\- x))))
         (return (append s ">")))
       
       (define (loop-test) string
         (var i integer 7)
         (var s string "<")
         (while (> i 0)
           (<- s (append s (vector (code-to-character (+ 48 i)))))
           (<- i (- i 1)))
         (return (append s ">")))
       )))
  
  (defparameter *ltl* (world-lexer *ltw* 'loop-test-lexer))
  (defparameter *ltg* (lexer-grammar *ltl*)))

#|
(depict-rtf-to-local-file
 "Test/LoopTestSemantics.rtf"
 "Loop Test Semantics"
 #'(lambda (rtf-stream)
     (depict-world-commands rtf-stream *ltw* :heading-offset 1)))

(depict-html-to-local-file
 "Test/LoopTestSemantics.html"
 "Loop Test Semantics"
 t
 #'(lambda (html-stream)
     (depict-world-commands html-stream *ltw* :heading-offset 1))
 :external-link-base "")
|#

(lexer-pparse *ltl* "")