Sponsored Content
Full Discussion: Scripting comments
Top Forums Shell Programming and Scripting Scripting comments Post 302179657 by era on Friday 28th of March 2008 09:32:18 AM
Old 03-28-2008
Low-level languages build character, but that doesn't mean you have to live with them if you don't want to. But this is hardly the place for an advocacy discussion (sorry for baiting you). My point was just that a good half of any typical coding guideline will be dealing with traps in any particular language; a good language doesn't have many such traps, and so it's easier for the guideline author to concentrate on substantial issues of style and comprehension. In my limited experience, few languages are good, by this definition, and even fewer of those which are will reach any level of popularity.
 

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Remove comments...

It may be a no-brainer, but the answer is escaping me right now: I'm trying to write a little script to remove all comments from .c source... I was thinking sed, but I'm not a very strong regexp user (e.g. I suck with sed). I tried dumping the file into: sed -e 's/\/\* * \*\///g' and several... (1 Reply)
Discussion started by: LivinFree
1 Replies

2. Shell Programming and Scripting

Comments unexpectedly print

Hi All, I am working on a sh script. Half way through the script, my comments start to print to screen as if I used echo. Obviously any comments are preceded with a #. And I have not used set -x or anything similar. Can anyone free me of this simple but annoying problem? Thanks John (5 Replies)
Discussion started by: John H
5 Replies

3. Programming

lint comments

Hi can anyone help me regarding the meaning of the following lint messages. what is the use of having such lint comments in the c program. /*lint -esym(534,cputs,fgets,cprintf) */ /*lint -efile(766,pragmas.h) */ Thanks a lot in advance. (5 Replies)
Discussion started by: axes
5 Replies

4. Shell Programming and Scripting

delete comments

Delete everything comes in between /* & */. Current File: ==================== create or replace procedure test421 is begin /* ---sasasas/*dsdsds */ dbms_output.put_line('SAURABH'); END; To be File: =================== create or replace procedure test421 is begin... (10 Replies)
Discussion started by: susau_79
10 Replies

5. UNIX for Dummies Questions & Answers

Delete Comments in file

How can I delete comments (lines beginning with /* and ending with */) in file? with single command line..My suggestion is to use grep and sed! (4 Replies)
Discussion started by: aadi_uni
4 Replies

6. Shell Programming and Scripting

Sed script, changing all C-comments to C++-comments

I must write a script to change all C++ like comments: // this is a comment to this one /* this is a comment */ How to do it by sed? With file: #include <cstdio> using namespace std; //one // two int main() { printf("Example"); // three }//four the result should be: (2 Replies)
Discussion started by: black_hawk
2 Replies

7. Shell Programming and Scripting

print only comments

I want to write a shell script which it takes as argument a java file or a c++ file (.java or .cpp). It will check if the file is type of java or c++, else it ends with error message. If all are ok, it will call awk that prints only the comments that the java or c++ file contains, grouping and... (5 Replies)
Discussion started by: Mark_orig
5 Replies

8. UNIX for Dummies Questions & Answers

Delete Comments

Hello i am back :D, i have a prolem. I want to Delete the IPs which are in Comments. Input 192.168.0.1 192.168.0.2 #192.168.0.3 #192.168.0.4 - when TAB or Space, delete too. /*192.168.0.5 192.168.0.6 192.168.0.7*\ Output 192.168.0.1 192.168.0.2 My solution is sed -e... (7 Replies)
Discussion started by: eightball
7 Replies
PATGEN(1)						      General Commands Manual							 PATGEN(1)

NAME
patgen - generate patterns for TeX hyphenation SYNOPSIS
patgen dictionary_file pattern_file patout_file translate_file DESCRIPTION
This manual page is not meant to be exhaustive. See also the Info file or manual Web2C: A TeX implementation. The patgen program reads the dictionary_file containing a list of hyphenated words and the pattern_file containing previously-generated patterns (if any) for a particular language (not a complete TeX source file; see below), and produces the patout_file with (previously- plus newly-generated) hyphenation patterns for that language. The translate_file defines language specific values for the parameters left_hyphen_min and right_hyphen_min used by TeX's hyphenation algorithm and the external representation of the lower and upper case ver- sion(s) of all `letters' of that language. Further details of the pattern generation process such as hyphenation levels and pattern lengths are requested interactively from the user's terminal. Optionally patgen creates a new dictionary file pattmp.n showing the good and bad hyphens found by the generated patterns, where n is the highest hyphenation level. The patterns generated by patgen can be read by initex for use in hyphenating words. For a real-life example of patgen's output, see $TEXMFMAIN/tex/generic/hyphen/hyphen.tex, which contains the patterns TeX uses for English by default. At some sites, patterns for (many) other languages may be available, and the local tex programs may have them preloaded. All filenames must be complete; no adding of default extensions or path searching is done. FILE FORMATS
Letters When initex digests hyphenation patterns, TeX first expands macros and the result must entirely consist of digits (hyphenation levels), dots (`.', edge of a word), and letters. In pattern files for non-English languages letters are often represented by macros or other expandable constructs. For the purpose of patgen these are just character sequences, subject to the condition that no such sequence is a prefix of another one. Dictionary file A dictionary file contains a weighted list of hyphenated words, one word per line starting in column 1. A digit in column 1 indicates a global word weight (initially =1) applicable to all following words up to the next global word weight. A digit at some intercharacter position indicates a weight for that position only. The hyphens in a word are indicated by `-', `*', or `.' (or their replacements as defined in the translate file) for hyphens yet to be found, `good' hyphens (correctly found by the patterns), and `bad' hyphens (erroneously found by the patterns) respectively; when read- ing a dictionary file `*' is treated like `-' and `.' is ignored. Pattern file A pattern file contains only patterns in the format above, e.g., from a previous run of patgen. It may not contain any TeX comments or control sequences. For instance, this is not a valid pattern file: % this is a pattern file read by TeX. patterns{% ... } It can only contain the actual patterns, i.e., the `...'. Translate file A translate file starts with a line containing the values of left_hyphen_min in columns 1-2, right_hyphen_min in columns 3-4, and either a blank or the replacement for one of the "hyphen" characters `-', `*', and `.' in columns 5, 6, and 7. (Input lines are padded with blanks as for many TeX related programs.) Each following line defines one `letter': an arbitrary delimiter character in column 1, followed by one or more external representa- tions of that character (first the `lower' case one used for output), each one terminated by the delimiter and the whole sequence ter- minated by another delimiter. If the translate file is empty, the values left_hyphen_min=2, right_hyphen_min=3, and the 26 lower case letters a...z with their upper case representations A...Z are assumed. Terminal input After reading the translate_file and any previously-generated patterns from pattern_file, patgen requests input from the user's termi- nal. First the integer values of hyph_start and hyph_finish, the lowest and highest hyphenation level for which patterns are to be gener- ated. The value of hyph_start should be larger than any hyphenation level already present in pattern_file. Then, for each hyphenation level, the integer values of pat_start and pat_finish, the smallest and largest pattern length to be ana- lyzed, as well as good weight, bad weight, and threshold, the weights for good and bad hyphens and a weight threshold for useful pat- terns. Finally the decision (`y' or `Y' vs. anything else) whether or not to produce a hyphenated word list. FILES
$TEXMFMAIN/tex/generic/hyphen/hyphen.tex The original hyphenation patterns for English, by Donald Knuth and Frank Liang. $TEXMFMAIN/tex/generic/hyphen/ushyphmax.tex Maximal hyphenation patterns for English, extended by Gerard Kuiken. http://www.ctan.org/tex-archive/language/ Patterns and support for many other languages SEE ALSO
Frank Liang and Peter Breitenlohner, patgen.web. Frank Liang, Word hy-phen-a-tion by com-puter, STAN-CS-83-977, Stanford University Ph.D. thesis, 1983, http://tug.org/docs/liang. Donald E. Knuth, The TeXbook, Addison-Wesley, 1986, ISBN 0-201-13447-0, Appendix H. AUTHORS
Frank Liang wrote the first version of this program. Peter Breitenlohner made a substantial revision in 1991 for TeX 3. The first version was published as the appendix to the TeXware technical report. Howard Trickey originally ported it to Unix. Web2C 2012 7 April 2010 PATGEN(1)
All times are GMT -4. The time now is 01:07 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy