Euphoria Ticket #265: eudoc one off error on header placement inside a constant list

notice in std/socket.e the Socket Option enums

public enum 
        ... 
	ESO_OOBINLINE, 
	--**** 
	-- ====  Windows Socket Option enums 
	ESO_USELOOPBACK, 
	ESO_DONTLINGER, 
	ESO_OKLINGER 
 
this renders as 
 
2.3.7.19 ESO_USELOOPBACK 
2.3.7.20 Windows Socket Option enums 
2.3.7.21 ESO_DONTLINGER 
... 

previously eudoc would stop collecting constants all together when comments or markup other than {--** was between a list of constants.

now it seems like it wants to work to accept a new header inline, except it should have put the header after the current constant. then continue on collecting the public or export item.

one work around would require restarting the public constant list. this was used later on in socket.e

in this case of a list of public enum using the previous_enum+1 would become error prone and read more complex than it should. and in the current euphoria, this is not even possible

 enum ESO_USELOOPBACK = ESO_OOBINLINE+1, 
      next=last+1 

will error

<0117>:: Not expecting to see '+' here 
	ESO_USELOOPBACK = ESO_OOBINLINE+1, 

workaround is to place the header one enum less than it should actually be.

public enum 
	ESO_PREVIOUS, 
	--**** 
        -- !! actually ESO_OOBINLINE+1 
	-- ====  Option enums 
	ESO_OOBINLINE, 
 
	ESO_USELOOPBACK, 
	ESO_DONTLINGER, 
	ESO_OKLINGER 
... 

and BTW, do these enum even need to be public? won't someone try to use the enum directly instead of the actual socket option constant with anyones guess what kind of a result?

Details

Type: Bug Report Severity: Major Category: Bundled Utility
Assigned To: unknown Status: Fixed Reported Release: 3680
Fixed in SVN #: View VCS: none Milestone: 4.1.0

1. Comment by DerekParnell Nov 06, 2010

Deferred until 4.1.

2. Comment by SDPringle Feb 03, 2015

See: hg:eudoc/rev/8fca3aab9b8c

changeset: 66:8fca3aab9b8c tag: tip user: Shawn Pringle <shawn.pringle@gmail.com> date: Tue Feb 03 13:31:10 2015 -0300 files: tests/res/s_enum.e tests/t_enum.e description:

  • Adds a unit test for eudoc: Run eutest in the tests directory to see if you have fixed ticket 265

3. Comment by SDPringle Feb 04, 2015

See: hg:eudoc/rev/14cf81f7c528

changeset: 67:14cf81f7c528 parent: 64:e12d01792ad1 user: Shawn Pringle <shawn.pringle@gmail.com> date: Wed Feb 04 10:33:35 2015 -0300 files: euparser.e description:

  • fixes ticket 265

4. Comment by SDPringle Feb 04, 2015

See: hg:eudoc/rev/df22d5284e3a

changeset: 68:df22d5284e3a tag: tip user: Shawn Pringle <shawn.pringle@gmail.com> date: Tue Feb 03 13:31:10 2015 -0300 files: tests/res/s_enum.e tests/t_enum.e description:

  • Adds a unit test for eudoc: Run eutest in the tests directory to see if you have fixed ticket 265

Search



Quick Links

User menu

Not signed in.

Misc Menu