[Subversion] / PEAK / src / peak / util / fmtparse.py  

Log of /PEAK/src/peak/util/fmtparse.py

Parent Directory

No default branch
Bookmark a link to HEAD: (view) (download) (as text)


Revision 1797 - (view) (download) (as text) - [select for diffs]
Modified Mon Aug 16 00:17:47 2004 UTC (19 years, 9 months ago) by pje
File length: 21212 byte(s)
Diff to previous 1769
Removed memoization from 'fmtparse': empirical testing showed that the
cache hit rate was incredibly low: only 18 hits in the entire PEAK test
suite.  Analysis suggests that only grammars having alternatives with
similar prefixes are likely to actually receive any benefit from
memoization.  By contrast, URLs and other simple, structural syntaxes of
the kind 'fmtparse' is intended for, almost never require backtracking,
and therefore don't really need the memoization.  Removing the memoization
and related code appears to shave almost a tenth of a second off the test
suite's run time.

Revision 1769 - (view) (download) (as text) - [select for diffs]
Modified Mon Jul 5 23:41:51 2004 UTC (19 years, 10 months ago) by pje
File length: 21647 byte(s)
Diff to previous 1647
Change all adapter factories to use only a single argument.

Revision 1647 - (view) (download) (as text) - [select for diffs]
Modified Tue Jan 27 03:26:57 2004 UTC (20 years, 3 months ago) by pje
File length: 21706 byte(s)
Diff to previous 1528
Make 'fmtparse.Repeat()' objects tell their child rules about the separator
so that collection features based on primitive types are easier to parse.
'fmtparse' is really in lousy shape and needs to be rewritten/replaced, as
it seems to break whenever it's touched.  No time in the a3 release cycle
for it, though.  :(  It really needs a rethink, redesign, and rewrite with
super-tiny incremental tests instead of "it works or it doesn't" scale
tests.

Revision 1528 - (view) (download) (as text) - [select for diffs]
Modified Fri Dec 5 01:12:27 2003 UTC (20 years, 5 months ago) by pje
File length: 20694 byte(s)
Diff to previous 1489
Added 'peak.core' as a minimal subset of 'peak.api'.  'peak.core' offers
only "core" API packages and primitives, not the full set of available
framework APIs.  'peak.api' will continue to expand as frameworks are
added, but 'peak.core' will stay as small as practical.  ('peak.exceptions'
may in fact end up being removed from 'peak.core', or at least renamed.)

Also, added 'peak.util.symbol' module, to contain 'NOT_GIVEN', 'NOT_FOUND',
and the 'Symbol' class used to create them.

Revision 1489 - (view) (download) (as text) - [select for diffs]
Modified Wed Nov 26 19:48:03 2003 UTC (20 years, 5 months ago) by pje
File length: 20633 byte(s)
Diff to previous 1466
Minor fix for 'canBeEmpty' support during parsing.  If a Conversion parses
an empty string, and 'canBeEmpty' is true, and a 'defaultValue' was
supplied, the Conversion will now return the default instead of passing the
empty string to its converter function.

Revision 1466 - (view) (download) (as text) - [select for diffs]
Modified Sat Nov 22 19:37:39 2003 UTC (20 years, 5 months ago) by pje
File length: 20501 byte(s)
Diff to previous 1402
Enhanced 'fmtparse' and 'peak.model' to allow using types as syntax rules
for parsing, including abstract types.  An abstract type's syntax is the
union (using 'fmtparse.Alternatives') of the syntaxes of its subclasses
(as specified by 'mdl_subclassNames').

Revision 1402 - (view) (download) (as text) - [select for diffs]
Modified Tue Sep 30 23:04:33 2003 UTC (20 years, 7 months ago) by pje
File length: 19910 byte(s)
Diff to previous 1389
Removed all uses of deprecated binding APIs.

Revision 1389 - (view) (download) (as text) - [select for diffs]
Modified Tue Sep 9 20:43:05 2003 UTC (20 years, 8 months ago) by pje
File length: 19923 byte(s)
Diff to previous 1208
Fix "inverse refcount leak" introduced when support was added for recursive
grammars.  Using 'id()' to key a dictionary is a bad idea if the objects
you're taking the 'id()' of can be deallocated while the entry is still in
the dictionary; this led to occasional weird problems with some grammars.
Apparently, when I wrote this I thought there'd be references held for as
long as the memo dictionary existed, but this isn't the case.  So now, the
memo holds a reference to the key object in the value, ensuring that the
reference can't go away until the entire dictionary is discarded.

Revision 1208 - (view) (download) (as text) - [select for diffs]
Modified Thu Jun 26 19:49:21 2003 UTC (20 years, 10 months ago) by pje
File length: 19887 byte(s)
Diff to previous 1200
Fix typos reported by Alexander Smishlajev.

Revision 1200 - (view) (download) (as text) - [select for diffs]
Modified Sat Jun 21 21:47:53 2003 UTC (20 years, 10 months ago) by pje
File length: 19877 byte(s)
Diff to previous 1184
By popular demand, added syntax recursion.  Added a cheesy and
over-simplified test case for recursion. Also, fixed some subtle bugs in
Repeat().  'peak.util.fmtparse' now depends on 'binding.Once', which it
technically shouldn't since it lives in 'peak.util'.  I'll probably fix
this by moving what's now '_once.pyx' to 'peak.util', as it is not specific
to the rest of the PEAK framework.  But I'll look at that later.

Revision 1184 - (view) (download) (as text) - [select for diffs]
Modified Fri Jun 13 21:49:19 2003 UTC (20 years, 11 months ago) by pje
File length: 18370 byte(s)
Diff to previous 1117
Fix typo found by Oleg Broytmann.

Revision 1117 - (view) (download) (as text) - [select for diffs]
Modified Wed May 14 22:14:45 2003 UTC (21 years ago) by pje
File length: 18369 byte(s)
Diff to previous 1092
Finished switchover to using protocols.advise() API to declare interfaces.

Revision 1092 - (view) (download) (as text) - [select for diffs]
Modified Fri May 9 00:14:32 2003 UTC (21 years ago) by pje
File length: 18394 byte(s)
Diff to previous 1091
Misc. doc edits

Revision 1091 - (view) (download) (as text) - [select for diffs]
Modified Thu May 8 20:35:53 2003 UTC (21 years ago) by pje
File length: 18299 byte(s)
Diff to previous 1090
Integrated syntax-driven processing into 'peak.model', including addition
of 'toString' and 'mdl_toString' methods.  By defining a 'mdl_syntax' rule
in any peak.model.Type subclass, you can get automatic rule-driven
conversion to and from strings, including the parsing of nested field
contents.

Revision 1090 - (view) (download) (as text) - [select for diffs]
Added Thu May 8 19:28:00 2003 UTC (21 years ago) by pje
File length: 18305 byte(s)
Factored out URL parsing into a more generic parsing framework in
'peak.util.fmtparse', with a few minor optimizations and enhancements.

This form allows you to request diffs between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.

  Diffs between and
  Type of Diff should be a

Sort log by:

cvs-admin@eby-sarna.com

Powered by ViewCVS 1.0-dev

ViewCVS and CVS Help