[M3devel] duplicated code and unit names -- M3ID, M3Keyword

Jay K jay.krell at cornell.edu
Thu Jul 16 20:54:59 CEST 2009


We have some redundancies that are causing me some grief.

 

We have two units called M3ID.
They have no overlap, and could be merged into one.

"No overlap" doesn't mean they are completely unrelated, but sort of.

 

 

More bothersome is that m3-sys\m3scanner
and m3-tools\m3scan have near duplicate code, in particular
the list of tokens and the Classify function.

 

In particular, where people were using libm3\M3Config,
there are problems using instead m3quake\MxConfig, because
this can bring together the two M3IDs.

 

I was going to replace all uses of M3Config with MxConfig.
However to avoid the duplicate M3ID units, I think I'll
keep M3Config and MxConfig more like duplicates of each
other at least for now, to avoid bringing m3quake
into places that have the other M3ID.


M3Config is in libm3 and MxConfig is in m3quake.

m3quake imports m3middle, which has M3ID.

 

Therefore, if you use M3Config and have your own M3ID,

you can't switch to MxConfig without renaming one of the M3IDs.

This does occur in m3-tools.

 

C:\dev2\cm3.2\m3-sys\m3scanner\src\M3Keyword.m3(25):PROCEDURE Classify (READONLY x: ARRAY OF CHAR): TK =
C:\dev2\cm3.2\m3-sys\m3scanner\src\M3Keyword.m3(360):  END Classify;
C:\dev2\cm3.2\m3-tools\m3scan\src\M3ID.i3(12):PROCEDURE Classify (READONLY x: ARRAY OF CHAR): M3Token.T;
C:\dev2\cm3.2\m3-tools\m3scan\src\M3ID.m3(17):PROCEDURE Classify (READONLY x: ARRAY OF CHAR): M3Token.T =



 - Jay
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20090716/46686e20/attachment-0001.html>


More information about the M3devel mailing list