My algorithm to convert a Regular Expression to a Regular Grammar is based on mostly two online resources.
Other similar online resources on the same topic may be found at:
(defun add_positive_numbers (from to) | |
(/ (* (+ from to) (+ 1 (- to from))) 2)) | |
(add_positive_numbers 20 119) | |
(defun create_seq (seq_generator seq_items iter_count) | |
(loop for i from 0 to iter_count | |
do (let ((nxt_entry (funcall seq_generator seq_items))) | |
(setf seq_items (append seq_items (list nxt_entry))))) | |
seq_items) |
My algorithm to convert a Regular Expression to a Regular Grammar is based on mostly two online resources.
Other similar online resources on the same topic may be found at:
(add-to-list 'load-path "~/.emacs.d/include") | |
(add-to-list 'load-path "~/.emacs.d/ecb") | |
(add-to-list 'load-path "~/.emacs.d/full-ack") | |
(autoload 'ack-same "full-ack" nil t) | |
(autoload 'ack "full-ack" nil t) | |
(autoload 'ack-find-same-file "full-ack" nil t) | |
(autoload 'ack-find-file "full-ack" nil t) | |
(setq cedet-custom-path "~/.emacs.d/cedet-1.0.1") ;; takes care of loading cedet-1.1 | |
(require 'ideframetools) | |
;;(load-file "~/.emacs.d/cedet-1.1/common/cedet.el") |
buildscript { | |
repositories { | |
mavenCentral() | |
maven { url 'http://clojars.org/repo' } | |
} | |
dependencies { | |
classpath 'clojuresque:clojuresque:1.7.0' | |
} | |
} |
(custom-set-variables | |
;; custom-set-variables was added by Custom. | |
;; If you edit it by hand, you could mess it up, so be careful. | |
;; Your init file should contain only one such instance. | |
;; If there is more than one, they won't work right. | |
'(package-selected-packages '(diff-hl magit treemacs project-explorer use-package)) | |
'(pe/cache-enabled nil) | |
'(pe/inline-folders nil) | |
'(pe/width 20) | |
'(treemacs-python-executable "C:/Python310/python.exe")) |
This post also appears on lisper.in.
Reader macros are perhaps not as famous as ordinary macros. While macros are a great way to create your own DSL, reader macros provide even greater flexibility by allowing you to create entirely new syntax on top of Lisp.
Paul Graham explains them very well in [On Lisp][] (Chapter 17, Read-Macros):
The three big moments in a Lisp expression's life are read-time, compile-time, and runtime. Functions are in control at runtime. Macros give us a chance to perform transformations on programs at compile-time. ...read-macros... do their work at read-time.