Sergej Chodarev
Sergej Chodarev
for (var element: stateMachine.getElements()) {
    if (element.isState()) {
        printState(element);
    } else if (element.isTransition()) {
        printTransition(element);
    }
}
for (var state: stateMachine.getStates()) {
    printState(state);
}
for (var trans: stateMachine.getTransitions()) {
    printTransition(trans);
}

 
O'Reilly → 'O''Reilly' alebo 'O\'Reilly'SELECT FROM, TO FROM RENAMESELECT "FROM", "TO" FROM "RENAME"SELECT FROM_, TO_ FROM RENAME_
#define SWAP(a, b, type)  type t = a; a = b; b = t
int x = 1, y = 2;
SWAP(x, y, int);
printf("x=%d, y=%d\n", x, y);
#define SWAP(a, b, type)  type t = a; a = b; b = t
int x = 1, y = 2;
int t = x; x = y; y = t;
printf("x=%d, y=%d\n", x, y);
#define SWAP(a, b, type)  type t = a; a = b; b = t
int x = 1, y = 2, t = 3;
SWAP(x, y, int);
printf("x=%d, y=%d\n", x, y);
redefinition of ‘t’
#define SWAP(a, b, type)  type t = a; a = b; b = t
int x = 1, y = 2;
if (x > y)
    SWAP(x, y, int);
printf("x=%d, y=%d\n", x, y);
#define SWAP(a, b, type)  type t = a; a = b; b = t
int x = 1, y = 2;
if (x > y)
    int t = x;
x = y;
y = t;
printf("x=%d, y=%d\n", x, y);
#define SWAP(a,b,type) {type t543178 = a; a = b; b = t543178;}
(define (fib n)
    (cond ((= n 0) 0)
          ((= n 1) 1)
          (else (+ (fib (- n 1))
                   (fib (- n 2))))))
S. Krishnamurthi, “Educational Pearl: Automata via Macros,” Journal of Functional Programming, vol. 16, no. 3, 2006.
; An automaton that recognizes the language c(ad)*r
(define m
  (automaton init
             (init :
                   (c -> more))
             (more :
                   (a -> more)
                   (d -> more)
                   (r -> end))
             (end : accept)))
let m = automaton!(
      init,
      init: {'c' => more},
      more: {
          'a' => more,
          'd' => more,
          'r' => end
      },
      end: {} accept);
 
     
    