packages feed

beautifHOL 0.10 → 0.11

raw patch · 3 files changed

+34/−13 lines, 3 files

Files

ConfigHOL.hs view
@@ -11,11 +11,11 @@  module ConfigHOL where --- Maximum lenght of a term before splitting it across lines.+-- |Maximum lenght of a term before splitting it across lines. maxArgLen :: Int maxArgLen = 10 --- Output strings.  Listed here as a list of strings for easy manipulation.  DO+-- |Output strings.  Listed here as a list of strings for easy manipulation.  DO -- NOT CHANGE THE ORDER OF THE LIST!  Most of the operators are obvious; ones -- that are not are commented. opStr :: [String]@@ -84,10 +84,4 @@ ifTab = max (length ifStr) $ max (length thenStr) (length elseStr) letTab = max (length letStr) (length inStr) --- get filepath--- check that the dir and file exist--- open the file--- parse it--- return errors on bad parsing--- set the constants--- close the file+
README view
@@ -62,6 +62,10 @@           ==MODIFYING THE PROGRAM== +==+MODIFYING THE INPUT LANGUAGE+==+ The syntax of the current input language is documented in <http://www.cs.indiana.edu/~lepike/pub_pages/docHOL.pdf>. @@ -75,10 +79,33 @@   darcs get --partial   http://www.cs.chalmers.se/Cs/Research/Language-technology/darcs/BNFC/ -There are only three files you need to modify:-  * HOL.cf, the BNF specification of the input grammar, read in by BNFC.+BNFC will generate new files for you based on your new input language.  The+current input language is defined in HOL.cf as a labeled BNF grammar.  Edit this+file.  *BE SURE* to move or rename PrintHOL.hs, ConfigHOL.hs, and TestHOL.hs+when generating new files as BNFC will overwrite these files (which have been+modified in beautifHOL).  After generation from BNFC, overwrite the generated+files and compile as usual.  If you have added new language constructs, you will+have to add corresponding cases to PrintHOL.hs.++==+MODIFYING ANYTHING ELSE+==+If you want to modify only the output syntax or the pretty-printing style, you+need only to modify one or more of the following files:   * PrintHOL.hs, the guts of the pretty-printer.-  * ConfigHOL.hs, +  * ConfigHOL.hs, where user-defined constants are (e.g., the output syntax for+    conjunction, the maximum length of a formula on a line, etc.).+  * TestHOL.hs, where main is defined.++You do *NOT* need BNFC to make these modifications.  Simply rebuild the program+by issuing +  > ghc --make TestHOL.hs -o beautifHOL+or+  > runhaskell Setup.lhs configure+  > runhaskell Setup.lhs build+  > runhaskell Setup.lhs install++BE SURE TO SEND ME ANY PATCHES!  ==TODOs== 
beautifHOL.cabal view
@@ -1,5 +1,5 @@ Name:                beautifHOL-Version:             0.10+Version:             0.11 Cabal-Version:       >= 1.2 License:             GPL License-file:        LICENSE