Gedcom::Grammar(3pm) User Contributed Perl Documentation Gedcom::Grammar(3pm)NAME
Gedcom::Grammar - a module to manipulate Gedcom grammars
Version 1.16 - 24th April 2009
SYNOPSIS
use Gedcom::Grammar;
my $st = $grammar->structure("GEDCOM");
my @sgr = $grammar->item("DATE");
my @items = $grammar->valid_items;
my $min = $grammar->min;
my $max = $grammar->max;
my @items = $grammar->items;
DESCRIPTION
A selection of subroutines to handle the grammar of a gedcom file.
Derived from Gedcom::Item.
HASH MEMBERS
Some of the more important hash members are:
$grammar->{top}
The top of the grammar tree.
$grammar->{top}{structures}
A reference to a hash mapping the names of all structures to the grammar objects.
METHODS
structures
my $st = $grammar->structure("GEDCOM");
Return the grammar item of the specified structure, if it exists, or undef.
item
my @sgr = $grammar->item("DATE");
Return a list of the possible grammar items of the specified sub-item, if it exists.
min
my $min = $grammar->min;
Return the minimum permissible number of $grammar items
max
my $max = $grammar->max;
Return the maximum permissible number of $grammar items
items
my @items = $grammar->items;
Return a list of tags of the grammar's sub-items
valid_items
my @items = $grammar->valid_items;
Return a hash detailing all the valid sub-items of the grammar item. The key is the tag of the sub-item and the value is an array of
hashes with three members:
grammar => the sub-item grammar
min => the minimum permissible number of these sub-items
max => the maximum permissible number of these sub-items
perl v5.14.2 2012-04-12 Gedcom::Grammar(3pm)
Check Out this Related Man Page
YAPPS(1) General Commands Manual YAPPS(1)NAME
yapps - create a Python module from a grammar file
SYNOPSIS
yapps [ --dump ] [ --use-devel-grammar ] [ -fcontext-insensitive-scanner ] [ -p pid ] [ -f ] input.g [ output.py ] name
DESCRIPTION --dump Dump out grammar information
--use-devel-grammar Use the devel grammar parser from yapps_grammar.py instead of the stable grammar from grammar.py
-fcontext-insensitive-scanner Scan all tokens (see docs)
yapps generates a Python program which will parse a given grammar.
OPTIONS --dump Dump the grammar information to stdout.
--use-devel-grammar
Use the grammar file in ./yapps_grammar.py instead of yapps/grammar.py.
This option is useful for testing new grammar parsers. (Yes, yapps' parser is itself written with yapps...)
-fcontext-insensitive-scanner
Set the option to use the non-context-sensitive scanner.
CAVEATS
yapps implements a recursive-descent scanner.
HISTORY
Written by Amit J. Patel <amitp@cs.stanford.edu>.
This version was enhanced by Matthias Urlichs <smurf@debian.org>. It is not downwards-compatible with the original yapps2 (yet) and uses a
different runtime library.
See the change log for details.
YAPPS(1)
Hi,
I have 2 files with contents in them and I need to compare each item in each file.
File1:
item4
item5
File2:
item2
item3
item5
item6
The items names can be of different lengths.
If the items in the File1 are not in File2,
delete the missing item in File1.
The resulting... (12 Replies)
hi, i have an awk script and I managed to figure out how to search the max value but Im having difficulty in searching for the min field value.
BEGIN {FS=","; max=0}
NF == 7 {if (max < $6) max = $6;}
END { print man, min}
where $6 is the column of a field separated by a comma (3 Replies)
HI
I have a list of items in 2 files. Some items are present in both the files in any order. Say for example item name is 'apple', it may be present in line 2 of file 1 and line 10 of file 2.
I want to see the missing items only. In simple terms, Items present in file1 if not in file2 then... (5 Replies)
I want to get maximum/minimum date/timestamp from a data file ?
Sample Input File
=============
rec#,order_dt,ext_ts
1,2010-12-01,2010-12-01 17:55:23.222222
2,2011-11-05,2010-12-01 19:55:23.222222
3,2009-10-01,2010-12-01 18:55:23.222222
for above file
Maximum Order_dt = 2011-11-05... (5 Replies)
Hi,
I have a text file containing numbers. There are up to 6 numbers per row and I need to read them, check if they are 0 and if they are not zero check if they are within a given interval (min,max). If they exceed the max or min they should be set to max or min respectively, if they are in the... (4 Replies)
hi
sorry for grammar mistakes but i am writting these fro tablet and am not realy used to ot so well yet....
i am in the middle of doing work here and hope some1 ca answear my question asap please :-)
How to calculate the amount of internal fragmentation using script.
cd directory ...... (6 Replies)
Hello Experts,
I have got a txt files which has multiple columns, I want to get the max, min and diff (max-min) for each column in the same txt file. Example:
cat file.txt
a 1 4
b 2 5
c 3 6
I want ouput like:
cat file.txt
a 1 4
b 2 5
c 3 6
Max 3 6
Min 1 4
Diff 2 2
awk 'min=="" ||... (4 Replies)
I have a list of items (control file) that I want to substitute in a text file, and it's BIG.
The file has two items, the original, and the new:
A B
B C
D E
The file has something like 10,000 entries.
So in the oldfile.txt, I'd like to basically make all these expression matched... (9 Replies)
I have a directory containing thousands of items “video files”, these items were generated by an application, which generates two items with the same name but with different extensions “.avi and .mp4”. There was a tool in my application to remove one item @ a time. Later I found this tool removes... (5 Replies)
Hi,
I have a file with more than 1 million records.. Each row has a distance number.. I want to know how many times is each number occurring from min to max number..
2
5
120
208
7
28
45
6
33
120
7
208
so onn..
output
0-0 (4 Replies)
Hi all
I have a problem where i have a large list ( up to 1000 of items) and need to have 2 items pulled from it into variables in a bash script
my list is like the following and I could have it as an array or possibly an external text file maintained separately. Every line is different and... (6 Replies)
Hi,
I need your kind help to get min and max values from file based on value in $5 .
File1
SP12.3 stc 2240806 2240808 + ID1_N003 ID2_N003T0
SP12.3 sto 2241682 2241684 + ID1_N003 ID2_N003T0
SP12.3 XE 2239943 2240011 + ID1_N003 ID2_N003T0
SP12.3 XE 2240077 2241254 + ID1_N003 ... (12 Replies)
I am trying to get a simple min/max script to work with the below input. Note the special character (">") within it.
Script
awk 'BEGIN{max=0}{if(($1)>max) max=($1)}END {print max}'
awk 'BEGIN{min=0}{if(($2)<min) min=($2)}END {print min}'
Input
-122.2840 42.0009
-119.9950 ... (7 Replies)
Using the input file for each row , using columns 1 (min) and 2 (max) , and with increment of 4 each time I want to create the output file.
Input file
1000 1012 2000 2001
2000 2008 3000 3001
Output desired
1000 2000 2001
1004 2000 2001
1008 2000 2001
1012 2000 2001
2000 3000 3001... (5 Replies)