# # Style sheet for the B language # Copyright (c) 1999 Philippe Coucaud # # # This file is part of a2ps. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; see the file COPYING. If not, write to # the Free Software Foundation, 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. # style B is written by "Philippe Coucaud " requires a2ps 4.12a version is 1.1 # 1.0 initial release # 1.1 new operators added (/=, : {, ||, &) documentation is "B is a formal specification method mostly used to describe critical" "systems. It is based on the mathematical sets theory." end documentation first alphabet is "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789" second alphabet is "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_" # B is case sensitive case sensitive keywords in Keyword_strong are ANY, ASSERTIONS, BE, BEGIN, BOOL, CASE, CHOICE, CONSTANTS, CONSTRAINTS, DEFINITIONS, DO, EITHER, ELSE, ELSIF, END, EXTENDS, FALSE, FIN, FIN1, IF, IMPLEMENTATION, IMPORTS, IN, INCLUDES, INITIALISATION, INT, INTEGER, INTER, INVARIANT, LET, MACHINE, MAXINT, MININT, NAT, NAT1, NATURAL, NATURAL1, OF, OPERATIONS, OR, PI, POW, POW1, PRE, PROMOTES, PROPERTIES, REFINES, REFINEMENT, SEES, SELECT, SETS, SIGMA, STRING, THEN, TRUE, USES, UNION, VALUES, VAR, VARIABLES, VARIANT, WHEN, WHERE, WHILE end keywords keywords in Keyword_strong are bool, card, closure, closure1, conc, dom, "first", fnc, front, id, iseq, iseq1, iterate, inter, last, max, min, mod, not, or, perm, pred, prj1, prj2, ran, rel, rev, seq, seq1, size, skip, succ, tail, union end keywords operators are <-- \leftarrow, --> \rightarrow, := , :: , # try to use the mathematical notation for sets (/:([ \t]*)({)/ \in , \1 Plain, \2 Plain ), # "/:" is not ambigous (no need to see if a set definition follows) "/:" \not\in, <=> \Leftrightarrow, => \Rightarrow, <= \leq, >= \geq, <, >, # don't know if B users would appreciate a mathematical \/ (using the # symbol font) for the || operator (a la C)? || \vee, # same question for the & operator ( /\ ??) & \wedge, "/=" \neq end operators sequences are "/*" Comment "*/" end sequences end style