#+TITLE: Org Babel EBNF Sample #+AUTHOR: Michael Gauland #+EMAIL: address@hidden #+DATE: {{{time(%Y-%m-%d %H:%M)}}} #+LaTeX_CLASS: article #+LaTeX_CLASS_OPTIONS: [a4paper] #+LaTeX_HEADER: \usepackage{epstopdf} #+LATEX_HEADER: \definecolor{mygray}{gray}{0.8} #+LATEX_HEADER: \lstset{rulesepcolor=\color{mygray}} #+LaTeX_HEADER: \lstdefinelanguage{ebnf}{rulesepcolor=\color{cyan},frameround=tttt,backgroundcolor=\color{mygray}} #+PROPERTY: exports both * EBNF #+HEADER: :file (org-babel-temp-file "./temp" ".eps") #+BEGIN_SRC ebnf sequence = "this" "that". alternation = "this" | "that". #+END_SRC #+RESULTS: [[file:/tmp/babel-5910UgK/temp5910f9T.eps]] * ISO-EBNF #+HEADER: :file (org-babel-temp-file "./temp" ".eps") #+HEADER: :style 'iso-ebnf #+BEGIN_SRC ebnf sequence = "this", "that"; alternation = "this" | "that"; #+END_SRC #+RESULTS: [[file:/tmp/babel-5910UgK/temp5910S6B.eps]] * YACC #+HEADER: :file (org-babel-temp-file "./temp" ".eps") #+HEADER: :style 'yacc #+BEGIN_SRC ebnf %% sequence: 'this' 'that'; alternation: 'this' | 'that'; #+END_SRC #+RESULTS: [[file:/tmp/babel-5910UgK/temp5910Uun.eps]]