summaryrefslogtreecommitdiff
path: root/toke.c
Commit message (Collapse)AuthorAgeFilesLines
* fix threaded build after 8ff3e83bChip Salzenberg2009-08-261-1/+1
|
* In C<use utf8; a=>'b'>, do not set utf8 flag on 'a' [perl #68812]Chip Salzenberg2009-08-261-1/+3
|
* set utf8 bit on inferred method names when C<use utf8>Chip Salzenberg2009-08-261-1/+1
|
* Fix parsing of readline(FH) [perl #68458]Rafael Garcia-Suarez2009-08-231-1/+13
| | | | | | | | | This was broken by commit 984f9f66477bc722578262ae8520584e44e881af, which was committed to solve bug [perl #53806]. Basically, to make everyone happy, we need only to enforce strictures on barewords that follow the specially parsed keywords "print" and "exec" (and similar) -- except when they have been already parsed.
* Add new error "Can't use keyword '%s' as a label"Rafael Garcia-Suarez2009-07-301-3/+6
|
* Forbid labels with keyword namesRafael Garcia-Suarez2009-07-291-3/+3
|
* Tidy code added in 4ba71d51f72efb2af8dc9748dd62219261f2e1fd.Nicholas Clark2009-07-261-5/+4
|
* Allow -C on the #! line when it is identical to -C on the command line.Father Chrysostomos2009-07-261-1/+9
| | | | | Change from dieing whenever -C is seen on the #! line, to dieing only when it differs from that on the command line, or was not specified on the command line.
* Remove !!! and ??? operatorsRafael Garcia-Suarez2009-07-221-8/+0
| | | | | Those were adding non backwards compatible syntax, unlike "...", as pointed out in bug #67646.
* In Perl_yylex(), no need to Newxz() a buffer we immediately write to.Nicholas Clark2009-05-191-1/+1
|
* Amelioration of the error message "Unrecognized character %s in column %d"Claes Jakobsson2009-05-141-2/+14
| | | | | | Changes the error message to "Unrecognized character %s; marked by <-- HERE after %s<-- HERE near column %d". This should make it a little simpler to spot and correct the suspicious character.
* Remove all #ifdef MACOS_TRADITIONAL code in core and non-dual-life XS code.Nicholas Clark2009-04-271-10/+0
| | | | | | | | (MacOS support was removed from MakeMaker in 6.22, and merged to blead on 15th December 2004 with 5dca256ec738057dc331fb644a93eca44ad5fa14. After this point MacOS wouldn't even have been able to build the perl binary, because it would not have been able to build DynaLoader. If anyone wishes to resurrect MacOS, start by reversing this commit and the relevant part of that commit.)
* GvUNIQUE* have been defined as 0 since 2005/06/30 - high time to remove them.Nicholas Clark2009-04-131-5/+0
|
* Deprecate use of the attribute :locked on subroutines.Nicholas Clark2009-04-121-1/+1
|
* Return OPERATOR('[') for '[' without falling through to case '~', avoiding ↵Ian Goodacre2009-03-141-1/+4
| | | | misinterpreting "[~" as an OP_SMARTMATCH.
* Forbid to use "foreach" as an attributeRafael Garcia-Suarez2009-02-141-0/+1
| | | | (like all other control flow statements)
* Combine sv_utf8_upgrade with a following growKarl2009-01-191-7/+9
|
* [perl #59908] \x, \0, and \N{} not ok in double-quotish when followed by > \x100karl williamson2009-01-151-70/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Attached is a patch for this problem. The root cause was that S_scan_const() was not recoding to utf8 under some circumstances when it should be. I also changed it so that in all places, the flag that indicates the output is in utf8 is changed from false to true if and only if the destination is recoded to utf8. One place was skipping this, and then setting it unconditionally later on. In one place in the routine, the routine had code to do the recoding itself. In the other places, it called sv_utf8_upgrade(). I changed it to call the subroutine in all cases. I fixed a bug that would appear only on EBCDIC machines where constants of the form \N{U+....} would have been interpreted as EBCDIC. And in inspecting the code, I realized there were problems with growing the scalar value to fit the input. I cleaned those up. I also added a number of comments to document things I found out, and changed some existing ones to be more accurate. Since no one responded to my request for where to put the test cases, and I couldn't figure out a good place to put them, I added a new test file, t/uni/lex_utf8.t.
* Allow '\r' after "#line XXX" directives.Steve Hay2009-01-141-1/+1
| | | | Fixes lib/feature.t and lib/warnings.t tests that have been failing on Win32 since commit 26b6dc3.
* Require a space or a newline after a "#line XXX" directiveRafael Garcia-Suarez2009-01-061-0/+2
| | | | This fixes bug [perl #59170] Typo: bad regex for #line directive in perlsyn.
* ywarn() is actually only used inside toke.c, so it can be static.Nicholas Clark2008-11-261-2/+2
| | | p4raw-id: //depot/perl@34941
* A small refactoring based on a comment in an old RT ticket (RTSteve Peters2008-11-071-7/+1
| | | | | #4362 in case you were wondering). p4raw-id: //depot/perl@34768
* Re: @{"_<$filename"} is unreasonably tied to use of DB::DB ($^P & 0x2)Tim Bunce2008-11-031-7/+7
| | | | | | Message-ID: <20081103160130.GA45762@timac.local> Date: Mon, 3 Nov 2008 16:01:31 +0000 p4raw-id: //depot/perl@34705
* PATCH: Large omnibus patch to clean up the JRRT quotesTom Christiansen2008-11-021-1/+3
| | | | | | Message-ID: <25940.1225611819@chthon> Date: Sun, 02 Nov 2008 01:43:39 -0600 p4raw-id: //depot/perl@34698
* Explicitly specify some printf formats for constant strings.Rafael Garcia-Suarez2008-11-021-2/+2
| | | | | | This is mostly to silence gcc's warning, "format not a string literal and no format arguments". p4raw-id: //depot/perl@34694
* Eliminate (SV *) casts from sv.c and [tu]*.c, except for the cast inNicholas Clark2008-10-301-6/+6
| | | | | Perl_sv_magicext(), which is documented. p4raw-id: //depot/perl@34671
* Use pvs macros instead of pvn where possible.Marcus Holland-Moritz2008-10-291-14/+14
| | | p4raw-id: //depot/perl@34653
* Eliminate (AV *) casts in *.c.Nicholas Clark2008-10-291-1/+1
| | | p4raw-id: //depot/perl@34650
* Add MUTABLE_CV(), and eliminate (CV *) casts in *.c.Nicholas Clark2008-10-291-3/+3
| | | p4raw-id: //depot/perl@34647
* Two casts that are MUTABLE_?V.Nicholas Clark2008-10-281-2/+2
| | | p4raw-id: //depot/perl@34622
* Update copyright years.Nicholas Clark2008-10-251-2/+2
| | | p4raw-id: //depot/perl@34585
* Unintented interpolation of $/ in regex (was: Re: [perlBram2008-08-241-1/+6
| | | | | | | | | | Message-ID: <20080724181427.aiml4sdvr40k4coc@horde.wizbit.be> Note that the Subject: has a typo - it should be $\ This adds a new warning. I moved the tests from the original patch to t/lib/warnings/toke. p4raw-id: //depot/perl@34224
* Make sure parser's filehandle is closed when finishedSteve Hay2008-06-171-2/+2
| | | | | | | (It was mistakenly left open if there was no old_parser, which caused t/comp/require.t to leave behind a 'bleah.pm' (from the test for #49472) on Win32, where the deletion of an open file fails.) p4raw-id: //depot/perl@34071
* Tweak the "Illegal character in prototype" warning so it's moreRafael Garcia-Suarez2008-06-081-2/+4
| | | | | precise when reporting illegal characters after _ p4raw-id: //depot/perl@34023
* Add a new warning, "Prototype after '%s'"Renee Baecker2008-06-081-2/+39
| | | | | | | Based on: Subject: Re: [perl #36673] sub foo(@$) {} should generate an error Message-ID: <483A9A2B.6020808@smart-websolutions.de> p4raw-id: //depot/perl@34021
* Re: [PATCH: TODO Tests] Re: [perl #53806] No complain about barewordRafael Garcia-Suarez2008-05-201-1/+1
| | | | | | From: "Rafael Garcia-Suarez" <rgarciasuarez@gmail.com> Message-ID: <b77c1dce0805200045i1000598ci13c9cb3a29f64b6d@mail.gmail.com> p4raw-id: //depot/perl@33874
* Add ..., !!!, and ??? operatorschromatic2008-05-181-2/+15
| | | | | Message-Id: <200805101252.11961.chromatic@wgz.org> p4raw-id: //depot/perl@33858
* Prevent the tokenizer from segfaulting in debug mode when a FUNC token is forcedRafael Garcia-Suarez2008-05-161-1/+1
| | | | | | From: "Rafael Garcia-Suarez" <rgarciasuarez@gmail.com> Message-ID: <b77c1dce0805160313r78cb1b2bxfeb64460d2e9a7df@mail.gmail.com> p4raw-id: //depot/perl@33833
* Handle PL_minus_E before PL_minus_{n,p}.Florian Ragwitz2008-05-111-3/+3
| | | | | Message-Id: <1210485078-19640-1-git-send-email-rafl@debian.org> p4raw-id: //depot/perl@33822
* Three variables in S_scan_trans only hold flags for op_private, so canNicholas Clark2008-03-041-3/+3
| | | | | be U8. p4raw-id: //depot/perl@33437
* [ patch ] silence 2 possibly uninitialized varsJim Cromie2008-02-181-3/+3
| | | | | Message-ID: <47B7879B.5040302@gmail.com> p4raw-id: //depot/perl@33327
* assert() that every NN argument is not NULL. Otherwise we have theNicholas Clark2008-02-121-1/+105
| | | | | | | | | | | | ability to create landmines that will explode under someone in the future when they upgrade their compiler to one with better optimisation. We've already done this at least twice. (Yes, some of the assertions are after code that would already have SEGVd because it already deferences a pointer, but they are put in to make it easier to automate checking that each and every case is covered.) Add a tool, checkARGS_ASSERT.pl, to check that every case is covered. p4raw-id: //depot/perl@33291
* [perl #49472] Attributes + Unkown ErrorDave Mitchell2008-02-091-0/+1
| | | | | | | An errored attribute sub still processes the attributes, which require's attribute.pm, so make sure the error state is passed to the new require p4raw-id: //depot/perl@33265
* toke.c/universal.c: constingSteven Schubiger2008-01-291-11/+11
| | | | | Message-ID: <20080128125741.GA27390@refcnt.homeunix.org> p4raw-id: //depot/perl@33103
* also report forced tokens when using -DTGerard Goossen2008-01-281-9/+15
| | | | | Message-ID: <20080117173652.GB4969@ostwald> p4raw-id: //depot/perl@33089
* Remove the -P switchRafael Garcia-Suarez2008-01-111-19/+4
| | | p4raw-id: //depot/perl@32954
* Add newSVpvs_flags() as a wrapper to newSVpvn_flags(), and reworkNicholas Clark2008-01-031-1/+1
| | | | | sv_2mortal(newSVpvs(...)) constructions to use it. p4raw-id: //depot/perl@32819
* Extend newSVpvn_flags() to also call sv_2mortal() if SVs_TEMP is set inNicholas Clark2008-01-031-3/+3
| | | | | | the flags. Move its implementation just ahead of sv_2mortal()'s for CPU cache locality. Refactor all code that can be to use this. p4raw-id: //depot/perl@32818
* Add a new function newSVpvn_flags(), which takes a third parameter ofNicholas Clark2008-01-021-12/+6
| | | | | | | | | | flag bits. Right now the only flag bit is SVf_UTF8, which will call SvUTF8_on() on the new SV for you. Provide a wrapper newSVpvn_utf8(), which takes a boolean, and passes in SVf_UTF8 if that is true. Refactor the core to use it where possible. It makes the source code clearer and smaller, but seems to be swings and roundabouts on object code size. p4raw-id: //depot/perl@32807
* "Automate" change 32648 (ensure that -E always loads the latestNicholas Clark2007-12-271-1/+2
| | | | | features) p4raw-id: //depot/perl@32744