BNFC-2.9.6.2: A compiler front-end generator.
Safe HaskellSafe-Inferred
LanguageHaskell2010

BNFC.Backend.Latex

Synopsis

Documentation

makeLatex :: SharedOptions -> CF -> Backend Source #

Entry point: create .tex file and a Makefile to compile it.

makefile :: String -> String -> Doc Source #

Create a makefile for the given tex file

>>> makefile "myFile.tex" "Makefile"
all : myFile.pdf

myFile.pdf : myFile.tex
	pdflatex myFile.tex

clean :
	-rm myFile.pdf myFile.aux myFile.log

cleanall : clean
	-rm Makefile myFile.tex

comment :: String -> String Source #

cfToLatex :: String -> CF -> String Source #

Create content of .tex file.

prtTerminals :: String -> CF -> String Source #

identSection :: CF -> [String] Source #

prtIdentifiers :: [String] Source #

prtLiterals :: String -> CF -> String Source #

stringLit :: TokenCat -> [String] Source #

prtOwnToken :: (String, Reg) -> String Source #

prtComments :: ([(String, String)], [String]) -> String Source #

prtSymb :: String -> CF -> String Source #

prtReserved :: String -> CF -> String Source #

stringRes :: String -> String Source #

three :: Monoid a => [a] -> [[a]] Source #

Group a list into blocks of 3 elements.

prtBNF :: String -> CF -> String Source #

prtRules :: [(Cat, [Rule])] -> String Source #

prtSymbols :: [Either Cat String] -> String Source #

prt :: String -> String Source #

macros :: String Source #

reserved :: String -> String Source #

literal :: String -> String Source #

empty :: String Source #

symbol :: String -> String Source #

tabular :: Int -> [[String]] -> String Source #

terminal :: String -> String Source #

nonterminal :: Cat -> String Source #

arrow :: String Source #

delimiter :: String Source #

beginDocument :: String -> String Source #

endDocument :: String Source #

latexRegExp :: Reg -> String Source #