Allowing '->' and '=>' in C<...>

On Tue, Jan 25, 2000 at 12:03:51AM -0500, Ronald J Kimball wrote:
> I'm concerned that someone may find another exception, and then another,
> and then another, and soon POD parsing becomes extremely complicated.

Too late - thats already the case with special-handling -> and =>
inside of C<...>. It won't get significantly more or less complicated
by limiting what can appear to the left of [-=]>. In fact its more likely
to make the code less complicated.

> > its not enough to simply be '->' or '=>', perhaps we only want to allow
> > certain classes of characters to be to the left of '->' and '=>' and
> > maybe only a select few punctuation characters are in that set.
> 
> This has the drawback of trading simplicity for readibility.  I think it
> would create too many special cases to remember.

Unlike the dozen or so special cases we already have where we want
to allow -> and => but not ==> --> !=> /=> and <<op>>= in general.
Perhaps you're not fully aware of the existing special cases. The
regexp in the code looks something like:

   qr/(?:[^-+*/=!&|%^x.<>$]+=|[^-$]+-)$/;

If anything I bet the above proposal would decrease the amount of special
cases rather than increase it.

-- 
Brad Appleton <bradapp@enteract.com> http://www.enteract.com/~bradapp/
  "And miles to go before I sleep." -- Robert Frost
0
bradapp
1/25/2000 2:22:01 PM
perl.pod-people 532 articles. 0 followers. Follow

2 Replies
822 Views

Similar Articles

[PageSpeed] 10

On Tue, Jan 25, 2000 at 08:22:01AM -0600, Brad Appleton wrote:
> On Tue, Jan 25, 2000 at 12:03:51AM -0500, Ronald J Kimball wrote:
> > I'm concerned that someone may find another exception, and then another,
> > and then another, and soon POD parsing becomes extremely complicated.
> 
> Too late - thats already the case with special-handling -> and =>
> inside of C<...>. It won't get significantly more or less complicated
> by limiting what can appear to the left of [-=]>. In fact its more likely
> to make the code less complicated.

The code may become less complicated, but the parsing rules may become more
complicated, which would make writing more complicated.  The POD author
would have to remember when -> and => end the block and when they don't,
depending on the characters which appear before.


> > > its not enough to simply be '->' or '=>', perhaps we only want to allow
> > > certain classes of characters to be to the left of '->' and '=>' and
> > > maybe only a select few punctuation characters are in that set.
> > 
> > This has the drawback of trading simplicity for readibility.  I think it
> > would create too many special cases to remember.
> 
> Unlike the dozen or so special cases we already have where we want
> to allow -> and => but not ==> --> !=> /=> and <<op>>= in general.
> Perhaps you're not fully aware of the existing special cases. The
> regexp in the code looks something like:
> 
>    qr/(?:[^-+*/=!&|%^x.<>$]+=|[^-$]+-)$/;
> 
> If anything I bet the above proposal would decrease the amount of special
> cases rather than increase it.
> 

How would you allow both C<@-> and C<$@->[0]> while decreasing the number of
special cases?


I think I'm starting the favor the original proposal of C<@-Z<>>.  :D


Ronald
0
rjk
1/25/2000 5:11:33 PM
On Tue, Jan 25, 2000 at 12:11:33PM -0500, Ronald J Kimball wrote:
> The code may become less complicated, but the parsing rules may become
> more complicated

No more so than they are already.

> The POD author would have to remember when -> and => end the block
> and when they don't,

No they wouldn't. They'd simply expect it to work intuitively and that
things that saw '=>' or '->' in context that didn't look like a Perl
expression would simple "do the write thing" much as pod2man has
tried to do all this time. Whenever it didn't, they'd submit a bug
report.

> How would you allow both C<@-> and C<$@->[0]> while decreasing the
> number of special cases?

Because the result would probably still be no more special cases than
are currently required to do it the current way (there are about two
dozen at present).

> I think I'm starting the favor the original proposal of C<@-Z<>>.  :D

I prefer the even earlier original proposal of not having C<...> do any
special handling for '->' and '=>' :-). Either that, or make it possible
for Pod::Parser to reuse the perl-parser since it would basically have
to know most of perl to get it completely right ;-)

-- 
Brad Appleton <bradapp@enteract.com> http://www.enteract.com/~bradapp/
  "And miles to go before I sleep." -- Robert Frost
0
bradapp
1/25/2000 8:41:47 PM
Reply:

Similar Artilces:

Handling of '>>>' and '-- '
Hi all, A couple of queries: 1) Is there a way to STOP Thunderbird from indenting replies with >>>>>>'s in e-mail (but not newsgroups)? 2) Is there a way to STOP Thunderbird from deleting everything that comes after a '-- ' on reply? If the answer is no, what'd be the best way to go about getting these 'features' added? Cheers, Cyker none wrote: > Hi all, > > A couple of queries: > 1) Is there a way to STOP Thunderbird from indenting replies with >>>>>>'s in e-mail (but not newsgroups)? > >...

The type '<class>' exists in both '<dll location>' and '<dll location 2>'
For some reason though it appears that one of my class files (_common.cs - in the App_Code directory) is being included in the WAP .dll file as well as when it compiles the App_Code at runtime.error CS0433: The type 'inlinehockey._common' exists in both 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\25321638\9b5c4b00\assembly\dl3\3657f4e6\cd91aef5_4d5cc601\inlinehockey.DLL' and 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\25321638\9b5c4b00\App_Code.xad_ajc1.dll'  The error was not knowing what dll to use for the type w...

The type '<class>' exists in both '<dll location>' and '<dll location 2>'
Hi. Has anyone come across this problem upgrading VS2003 to VS2005:The type '<class>' exists in both '<dll location>' and '<dll location 2>' Thanks! Hi TinaFMills,   Did you finish the process of migrate project form 2003 to 2005?   The error message means duplicate class name in different locations. Such as aspx pages, user controls, custom controls and so on. Please load the solution in Visual Studio IDE try to find the duplicate class. Edit->File and Replace->Find In Files (look in entire solution)    Sincerely,Benson YuMicrosoft Online...

DetailsView Converts '<' & '>' to '&lt;' & '&gt;'
I have multi-line textboxes from which the data is stored as a text value in the SQL database. Before the data is passed to the stored procedure, the text is parsed to replace all vbNewLIne and vbLf cases with "<br/>". This is done successfully, storing the text in the database with the "<br/>" tags. When the data is displayed, I want the text data dropped into the page as is; meaning "<br/>" in the database appears as "<br/>" in the source. However, the DetailsView object into which the values are being passed seems to be trans...

[DOC PATCH pod/perlapi.pod 5.5.64] Change 'See C<Foo>' to 'See L<"Foo">'
perlapi.pod has lots of "See also C<Move>" and "See C<warn>" which would probably be better written as "See also L<"Move">" and "See L<"warn">" as they're all =item's. However, this touches on the same issue as the whole L<"qr//"> discussion. L<"foo"> is supposed to indicate that "foo" is a section in the current man page, not an item. As far as I can see, there's no way to indicate a link to an item in the current man page, only in other man page...

C# and Linq --> Operator '>=' cannot be applied to operands of type 'int' and 'System.Linq.IQueryable<int?>
 Hi, I'm pretty new to the world of programming, but i tried searching the web after an answar but keeps coming up empty. So, I'm stuck. So, the school assignment is to build a booking-application for a hotel. At the moment, it just consists of two calendars (end date/start date), two dropdownlists (how many beds/extra beds) and a submit button. This is where I am at the moment: --------- start of code------------------    protected void Button1_Click(object sender, EventArgs e)    {        DataClass...

Give access to non virtual folder through configuration entry? ERROR: <location> path attribute must be a relative virtual path. It cannot contain any of '?' ':' '\' '*' '"' '<' '>' or '|'.
I have a webpage running under a virtual directory that is mapped to d:/webapplication that produces an excel spreadsheet, the page calls a library object that generates a report and places it in a folder d:/attachments. This folder is not in the virtual directory. When I access the webpage i click a button and it attemps to return the created spreadsheet as a mim content type application/vnd.ms-excel. However i getting redirected back to the login page of the application. Ive also noticed that the excel spreadsheet has not even been created at this location. So assuming this...

'<name>' is not a member of '<classname>'
I am posting this question as I am unsure how to proceed. I recently migrated a web project from .net 2003 to 2005. I have been able to work out most of the issues, but, unfortunaltely I am left with a few I do not understand. The error shows Error 17 'ddlQualSource' is not a member of 'CwMerge.ucFileUpload'. When I look for the object which is DropDownList it exists on a web form. The only 2 references to this object is in the HTML and the code below showing when it is loading with data. What I need to do is use the users selection later on in the project on a different web f...

problem with updating the <meta> 'description' and 'keywords' and <title></title> in masterpage from textbox in formview,
I have a slight problem with updating the <meta> 'description and keywords' and <title></title>  in masterpage from formview, as i am calling the textbox values from a access db.the formview resides in a page that has a masterpage. masterPages <meta> and <title> updated by textbox in formview doesnt work but when outside the 'formview' it works finemy Page_Load (......) is as follows.     {    Page.Header.Title = TextBox3.Text;        HtmlMeta meta = new HtmlMeta(); &...

bug: Cannot convert 'T1<T>::T2<0>' to 'T1<int>::T2<0>
I have bug in this code (C++ Builder 2010 Update 5): template <class T> class T1 { public: template <bool b> class T2 { public: // T2() {} // T2(const T2 &Value) {} }; typedef T2<false> T3; T3 f() const {return T3(); } }; int _tmain(int argc, _TCHAR* argv[]) { typedef T1<int> T4; T4 c; T4::T3 i = c.f(); //T4::T3 i; T4::T3 j = i; } [BCC32 Error] Test.cpp(29): E2034 Cannot convert 'T1<T>::T2<0>' to 'T1<int>::T2<0>' in line T4::T3 i = c.f(); ...

SqlBulkCopy: the locale id '0' of the source column '<column name> ' and the locale id '1033' of the destination column '<column name>' do not match.
Hi, I am using the sqlbulkcopy object to transfer large amount of data from one SQL server to Other. The code look like this.. SqlDataReader readerSrc = null;SqlBulkCopy bulkCopy = new SqlBulkCopy(connDest);//Prepare Destination Table.SqlCommand cmdDelete = new SqlCommand("DELETE FROM " + destTableName, connDest);//Set the sqlcommand textSqlCommand cmdGet = new SqlCommand("SELECT * FROM " + srcTableName, connSrc);//Open source connection.connSrc.Open();//Open destination connection.connDest.Open();int delete = cmdDelete.ExecuteNonQuery();//Get the data.readerSrc = cmdGet.ExecuteRead...

[perl6/specs] a455b1: old <a>**',' is now written <a>+%','
Branch: refs/heads/master Home: https://github.com/perl6/specs Commit: a455b11b2c4364014f34401d41001a0fa3628e3d https://github.com/perl6/specs/commit/a455b11b2c4364014f34401d41001a0fa3628e3d Author: Larry Wall <larry@wall.org> Date: 2011-09-20 (Tue, 20 Sep 2011) Changed paths: M S05-regex.pod Log Message: ----------- old <a>**',' is now written <a>+%',' The separator syntax is now required to be a modifier on a quantifier, so the old <a> ** ',' is now written <a>+ % ','. This allo...

Why Response.Write("<script>window.open("newWind.aspx','report','');</script>") not working?
I need to open a new web browser of url=newWind.aspx and tried the code below; Response.Write("<script>window.open('newWind.aspx','report','');</script>")However nothing happens, what can I do to make it work? Try RegisterClientScriptBlock("OpenWin","<script language=javascript>window.open('newWind.aspx','report','');</script>")I think that is the name of it...Also look at RegisterStartupScriptBlock (I think)MajorCats Thanks. But, it was same difference. Is there anything that blocks the new browser from showing up in the setting of IE or system?   &nbs...

''''''''''''''''''''
Name: haznen Email: haznenatyahoodotcom Product: Gran Paradiso Alpha 8 Summary: '''''''''''''''''''' Comments: '''''''''''''''''''''''''''''''''''' Browser Details: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20061204 UGES/1.7.2.0 GranParadiso/3.0a1 From URL: http://www.mozilla.org/projects/granparadiso/ Note to readers: Hendrix gives...

Web resources about - Allowing '->' and '=>' in C<...> - perl.pod-people

Resources last updated: 12/20/2015 10:08:09 AM