凤梨和菠萝有什么区别| 感冒发烧能吃什么水果| 晏字五行属什么的| 心肌劳损是什么意思| 什么洗面奶好| 出汗太多吃什么药好| 扁尖是什么| 什么的羽毛| 大舅哥是什么意思| 晚上睡觉脚酸痛什么原因| 新加坡什么工作最挣钱| 蝴蝶的翅膀像什么| 人生的意义是什么| 专科医院是什么意思| 益禾堂什么好喝| 土霉素主要是治疗什么病| 北京什么时候最热| 阴道内壁是什么样的| 割包皮有什么好处和坏处| 喉炎用什么药| 刚需是什么意思| 厌男症的表现是什么| 岫玉是什么| 七夕是什么意思| 胃有幽门螺旋杆菌是什么症状| 产检请假属于什么假| 抖m是什么| 白茶泡出来是什么颜色| 坐班什么意思| 石英表不走了是什么原因| 小腿肚子抽筋是什么原因| 韬光养晦什么意思| 刘备是一个什么样的人| 四周岁打什么疫苗| 下巴老是长痘痘是什么原因| 塔罗牌正位和逆位是什么意思| 一般细菌涂片检查是查什么| 二尖瓣关闭不全是什么意思| 宝付支付是什么| 腊肠炒什么菜好吃| 猪利是什么| 什么叫重本大学| 降压药什么时候吃| 盲点是什么意思| 为什么一直打哈欠| 什么是早教机| 阿斯顿马丁什么档次| 9.25什么星座| 次数是什么| ccu是什么病房| 俄罗斯什么东西值得买| 脚怕冷是什么原因引起的| 滴虫性阴道炎吃什么药| 鸡汤用什么鸡| 瑞五行属性是什么| 脂肪肝是什么症状| 便血是什么原因| 2月7号什么星座| 什么东西燃烧脂肪最快| lemaire是什么品牌| camus是什么酒| 血脂高吃什么药好| 腐竹配什么菜炒好吃| 美人鱼2什么时候上映| 心率快吃什么中成药| 砷对人体有什么危害| wc的完整形式是什么| 一九三九年属什么生肖| 为什么老虎头上有王字| love是什么词性| 易孕体质是什么意思| 七七年属什么生肖| 今天开什么| 栓剂是什么| 私房菜是什么意思| 墨迹什么意思| 什么是卧蚕| 钟馗是什么人物| 手机账号是什么| 为什么发际线高| 本体是什么意思| 什么是鼻窦炎| 什么是国企单位| 做梦掉牙齿是什么预兆| 胃糜烂是什么症状| 是什么| 1月30号是什么星座| 大腿骨叫什么骨| 硬下疳是什么样子| 后脑勺出汗是什么原因| 格格不入是什么意思| 001是什么意思| 水肿是什么病| 孕妇建档是什么意思| 顾问是什么意思| 武夷山岩茶属于什么茶| 骨质断裂是什么意思| 枕戈待旦什么意思| d是什么意思| 石斤读什么| 1928年属什么生肖| 爱新觉罗是什么旗| 脚扭了挂什么科| loser是什么意思| 园字五行属什么| 甲鱼补什么| 舒服是什么意思| 相安无事什么意思| 为什么三角形具有稳定性| 有什么好吃的外卖| 鼻子疼是什么原因| 安溪铁观音属于什么茶| 左眼皮老跳是什么原因| 背上长痘痘擦什么药膏| 什么水果吃了对皮肤好| 五月26日是什么星座| 梦见车掉水里了什么征兆| 咲念什么| 什么食物胶原蛋白含量高| 清奇是什么意思| 雌二醇测定是什么检查| 社保卡是什么样的图片| hello什么意思| 什么品牌的空气炸锅好| 阿咖酚散是什么药| 生理期吃什么比较好| u是什么元素| 哈戳戳是什么意思| 心衰是什么原因引起的| 硫酸亚铁是什么颜色| 肾积水挂什么科| 十指不沾阳春水是什么意思| 焦虑症吃什么药好得快| 心肌是什么意思| 自渡是什么意思| 什么是氙气| 无家可归是什么生肖| al是什么意思| 什么颜色加什么颜色等于白色| 儿童干咳吃什么药| 蚊子喜欢什么| 清热去火喝什么茶| 牟利什么意思| 市政协秘书长是什么级别| 男性霉菌感染用什么药| 漫字五行属什么| 澳门用什么钱币| 雌二醇低是什么原因造成的| 蒜苗炒什么好吃| 11月11是什么星座| 婴儿为什么吐奶| 逆生长是什么意思| 禅悟是什么意思| 皂苷是什么| 炎症反应性细胞改变是什么意思| 大同古代叫什么| 梅兰竹菊代表什么生肖| 肌酸什么时候喝比较好| 性价比高什么意思| 容易头晕是什么原因| 血压计什么牌子好| 5月2日是什么星座| 男女之间的吸引靠什么| 风热感冒用什么药好| 什么是作风建设| 抑郁吃什么药| 微信拥抱表情什么意思| 1号来月经什么时候是排卵期| 舌苔黄腻厚是什么原因| 主意正是什么意思| 控制线是什么意思| 气口是什么意思| 手机号码是什么| beyond什么意思| 女人脑供血不足吃什么| 综合体是什么意思| 幼犬吃什么| 肛门指检能查出什么| 菠萝蜜和什么不能一起吃| 来例假肚子疼吃什么药| 促甲状腺素高是什么原因| 手心发热什么原因| 孩子流口水是什么原因引起的| 水猴子是什么| 眼圈黑是什么原因| 变质是什么意思| 男性尿道疼痛小便刺痛吃什么药| 右肝钙化灶是什么意思| 食管在什么位置图片| 荭是什么意思| 什么是脱肛| 世界上最大的湖是什么湖| 触霉头是什么意思| 尿路感染吃什么药好得快| hpv弱阳性是什么意思| 尿胆原是什么| 梦见包被偷了什么预兆| 破冰是什么意思| 手指甲上的月牙代表什么| 壬子五行属什么| 为什么要分手| 细什么细什么| 天衣无缝什么意思| 为什么新生儿会有黄疸| 皮肤长小肉粒是什么原因| 土龙是什么| 生吃苦瓜有什么好处和坏处| ppd是什么检查| 妈妈的外婆叫什么| 吃鱼肝油有什么好处| 生蚝吃多了有什么危害| 女人梦见棺材代表什么| 小孩多动症是什么原因引起的| 淋雨了喝什么驱寒| rh是什么意思| 大义是什么意思| 爱出汗吃什么药| 麻风疫苗什么时候打| 打呼噜有什么危害| 做什么运动能瘦肚子| 为什么禁止克隆人| 什么病会传染| mizuno是什么品牌| 增强记忆力吃什么| 怕热是什么体质| 莘莘学子什么意思| 山己念什么| 眼镜pd是什么意思| 坐月子适合吃什么水果| 红细胞低吃什么补得快| 什么是c位| mrr是什么意思| 缺二氧化碳是什么症状| 辅弼是什么意思| 幼儿十万个为什么| 烧钱是什么意思| apf值是什么意思| 尿酸高会引起什么疾病| 孩子咳嗽吃什么饭菜好| 一纸空文是什么意思| 老年人骨质疏松吃什么钙片好| 医院特需门诊什么意思| 10月25号是什么星座| 专升本需要考什么| 高笋和茭白有什么区别| 瑶浴是什么意思| 南瓜可以做什么美食| 什么是性病| 潘氏试验阳性说明什么| modern是什么牌子| 怜悯之心是什么意思| 小腹胀痛男性什么原因| 阔以是什么意思| 屁为什么是臭的| 月经过后腰酸疼是什么原因| 妥瑞氏症是什么病| 燕麦是什么| 五年存活率是什么意思| 便秘喝什么药| 什么是普洱茶| hiv1是什么意思| 腹主动脉钙化是什么意思| 张什么结什么| 山药炒什么好吃| 百度
Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^2: On Parsing Perl (Once upon a time)

by LanX (Saint)
on Jul 11, 2022 at 11:58 UTC ( [id://11145420]=note: print w/replies, xml ) Need Help??


in reply to Re: On Parsing Perl (Once upon a time)
in thread On Parsing Perl

Static parsing is only reliable, if you rule out or control all imported subs, because prototypes change the way Perl is parsed. See HaukeX's other reply.

Basically changes at compile time ( see BEGIN blocks ) can change the parser.

Dynamic parsing is possible though, if you inspect the op-tree after compilation, that's the basic idea of some newer tools, like the perlnavigator.

See also perl -c in perlrun or B::Xref

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery

Replies are listed 'Best First'.
Re^3: On Parsing Perl (Once upon a time)
by haukex (Archbishop) on Jul 11, 2022 at 14:06 UTC
    Static parsing is only reliable, if you rule out or control all imported subs, because prototypes change the way Perl is parsed.

    I think, though, that prototypes aren't the only reason Perl isn't statically parseable. There are quite a few heuristics that the parser uses that aren't all too well documented, and I'm not sure if a static parser would be able to reimplement all of them. And then there is no strict code, which I think gets even trickier. At some point I was considering researching and making a list of all of the reasons, but I unfortunately never got around to it.

      > There are quite a few heuristics that the parser uses that aren't all too well documented,

      I agree, it's messy. But that's a matter of research.

      For instance I was bitten when operator overloading of < and > became unreliable, because the parser thought that < is the start of a <> iterator.

      I also remember a time where this was legal syntax

      for qw/a b c/ { }

      and BTW this is a list multiplication, even without parens around

      qw/a b c/ x 3

      > At some point I was considering researching and making a list of all of the reasons, but I unfortunately never got around to it.

      I think this could be solved by an automatic approach training an external parser against automatically created code and snippets harvested from CPAN.

      The test would pass if (a patched) B::Deparse created the same syntax tree after compilation.

      Many people already invested time in parsers ( I could name at least half a dozen projects), those tests could be used too.

      As a side product, P5P would get a proper test suite too.

      Cheers Rolf
      (addicted to the Perl Programming Language :)
      Wikisyntax for the Monastery

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11145420]
help
Chatterbox?
and all is quiet...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2025-08-08 17:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.


    泄泻病是什么意思 胆红素是什么意思 腋臭是什么原因引起的 老年人贫血吃什么补血最快最有效 生肖龙和什么生肖相冲
    巴基斯坦人说什么语言 夜猫子是什么意思 绛红色是什么颜色 狸子是什么动物 吃什么东西养胃
    挑担是什么关系 掌纹多而乱代表什么 中秋节吃什么 哺乳期上火了吃什么降火最快 什么是淡盐水
    茜读什么 脑梗看什么科 急性扁桃体发炎吃什么药 梦见弟媳妇是什么预兆 失眠吃什么药最有效
    xpe是什么材料hcv9jop5ns3r.cn 检查梅毒挂什么科hcv9jop1ns3r.cn 新生儿白细胞高是什么原因hcv9jop6ns2r.cn 一个火一个华念什么hcv9jop7ns0r.cn 什么的教导hcv8jop0ns6r.cn
    望眼欲穿什么意思hcv9jop7ns2r.cn 金字旁加巨念什么hcv9jop3ns3r.cn 尿白细胞定量高是什么意思hcv9jop8ns1r.cn 做梦捡到钱是什么意思hcv9jop0ns4r.cn 眉毛旁边长痘痘是什么原因jingluanji.com
    夏天怕热冬天怕冷是什么体质clwhiglsz.com 吃什么补记忆力最快hcv9jop3ns5r.cn 泽五行属什么hcv8jop6ns9r.cn 指甲变紫色是什么原因hcv8jop0ns4r.cn 悸动是什么意思hcv8jop7ns5r.cn
    齐博林手表是什么档次hcv9jop6ns1r.cn 专场是什么意思hcv7jop9ns0r.cn diamond是什么牌子hcv9jop1ns1r.cn 13年是什么年1949doufunao.com 肝胆胰脾挂什么科hcv9jop5ns6r.cn
    百度