萎缩性胃炎不能吃什么食物| 帽缨是什么意思| 完璧归赵发生在什么时期| pt是什么意思| 偏头疼是什么原因| 呵是什么意思| 人次是什么意思| 清酒是什么酒| 宫颈管短有什么症状| 长期不过性生活有什么危害| 什么是七杀命格| 隐晦是什么意思| 扁桃体经常发炎是什么原因| 什么千里| 捕风捉影是什么意思| 七月三号什么星座| 马卡龙为什么这么贵| 西洋参和花旗参有什么区别| 卡司是什么意思| 气管炎的症状吃什么药好得快| 涸的意思是什么| 泸州老窖是什么香型| 毛尖是什么茶| 尿酸高吃什么药好| 便秘什么原因引起的| 马踏飞燕什么意思| 爆表是什么意思| 口气臭吃什么能改善| 蜡烛燃烧会产生什么| 邮箱抄送是什么意思| 自在什么意思| 冷酷是什么意思| 皮肤擦伤用什么药膏| 长期手淫会有什么危害| rover是什么意思| 什么是网约车| 宫寒吃什么| 为什么眼睛老是流泪| 火命人适合什么颜色| 柚子是什么季节| 吃布洛芬不能吃什么| 地府是什么意思| 榴莲是什么季节的| chino是什么意思| 7.14日是什么日子| 幽门螺旋杆菌是什么症状| 身体虚弱打什么营养针| 洗内裤用什么洗比较好| 女人梦到蛇预示着什么| cps是什么意思啊| 鸡爪煲汤放什么材料| 墨鱼是什么鱼| 芒果不能和什么食物一起吃| 格局小是什么意思| 为什么会得纤维瘤| 大油边是什么| 两仪是什么意思| 蚊子不喜欢什么味道| loewe是什么牌子| 13朵玫瑰代表什么意思| 情非得已是什么生肖| gbs筛查是什么| 吃马齿苋有什么好处| 什么样人不能吃海参| 散光是什么症状| 什么十分什么| 什么地唱| 长痣是什么原因| 天麻是什么样子| 牙疼吃什么药| 越南古代叫什么| hcg什么时候开始下降| 辣椒是什么时候传入中国的| 波折是什么意思| 50岁掉牙齿是什么原因| 硬膜囊受压是什么意思| 没什么没什么| 血压高为什么| 1934年属什么生肖| 转移是什么意思| 嗳气是什么| 好吃懒做的动物是什么生肖| HPV高危亚型52阳性什么意思| 肌筋膜炎吃什么药| 什么是红眼病| 925银什么意思| 腿水肿是什么原因| 213什么意思| 惨无人道是什么意思| 五味子有什么作用| 吃什么丰胸最好| hi什么意思| 微信为什么不能转账| 验血能查出什么| 胃怕凉怕冷是什么原因| 专长是什么意思| 1月8日是什么星座| 做水果捞用什么酸奶好| 属马的是什么星座| 椰子鞋是什么牌子| 性激素六项挂什么科| 脂质是什么| 什么是过敏性紫癜| 晚上睡觉流口水是什么原因| 丈夫早亡的女人什么命| 蚕吃什么| 早泄是什么原因| 老人脚肿是什么原因引起的| 为什么会下雨| 后脚跟疼是什么原因| 时柱金舆是什么意思| sle是什么病的缩写| 老是胃疼是什么原因| 招采是什么意思| 因数是什么意思| 无什么为什么| 什么叫原研药| 急性胃肠炎用什么抗生素| 小孩老是肚子疼是什么原因| 胃息肉是什么原因造成的| 歌声什么| 脾大是怎么回事有什么危害| 三月十五是什么星座| 男人脖子后面有痣代表什么| 39年属什么生肖| 既什么又什么| 俄罗斯什么东西值得买| 酥油是什么油| 肾阴虚是什么症状| 寅时属什么生肖| 锻练与锻炼有什么区别| 一台什么| 甲亢吃什么好| 细小是什么病| 脂肪肝吃什么药效果好| 荞麦枕头有什么好处| 心肌缺血是什么原因造成的| 不齿是什么意思| 薇诺娜适合什么年龄| 间接胆红素高是什么意思| 什么是邮箱地址应该怎么填写| 孩子流鼻血是什么原因| 精忠报国是什么生肖| jeep是什么意思| 孕妇dha什么时候开始吃| 锐步是什么档次| 抵触是什么意思| 百香果是什么季节的水果| 芦荟有什么功效| 农村做什么生意赚钱| 可拉明又叫什么| 眼镜轴向是什么意思| pass是什么意思| 睡觉经常做梦是什么原因| 摩羯座女和什么座最配| 顾家什么意思| 每天吃一根黄瓜有什么好处| 肺热咳嗽吃什么药| 荷叶配什么减肥效果好| 肾阴虚吃什么食物补| 什么水果通便| 腰间盘突出用什么药| mect是什么意思| ipa啤酒是指什么| 前庭神经炎挂什么科| mask是什么意思| 柱镜度数是什么意思| 什么是十字花科蔬菜| 农历9月17日是什么星座| 宫保鸡丁属于什么菜系| 丹参是什么样子| 糖尿病能吃什么主食| ipa是什么意思| 衤字旁的字与什么有关| 植物神经紊乱看什么科| ab型血为什么叫贵族血| 什么叫凤凰男| 桂花是什么季节开的| 直辖市市长是什么级别| 西洋参和人参有什么区别| 再生牙技术什么时候能实现| 低压高用什么药| 脚后跟痛是什么原因| 陌上花开可缓缓归矣什么意思| 5月13日什么星座| 肾虚吃什么中成药| 群青色是什么颜色| 神经性头疼吃什么药效果好| 什么降血脂效果最好的| 不打破伤风针会有什么后果| 逆水行舟什么意思| 口腔挂什么科| 小蝌蚪吃什么| 湿气重吃什么中成药| 山狸是什么动物| 杰字属于五行属什么| 胃痛去药店买什么药| 卫生纸属于什么垃圾| 抽烟什么感觉| 1月1日是什么星座| 痛风什么不能吃| 为什么会得荨麻疹呢| 腿上的肉疼是什么原因| 除氯是什么意思| 吃什么水果变白| 乙肝两对半25阳性是什么意思| 冰丝是什么材料| 虾为什么叫对虾| 为什么会得胆囊炎| 人心果什么时候成熟| 晟字五行属什么| 小麦什么时候播种| 此起彼落是什么意思| 发烧能吃什么食物| 头臀径是指什么| 脚拇指发麻是什么原因| 电脑什么时候发明的| hl是什么意思| 右手大拇指抖动是什么原因| 路怒症是什么| 家有喜事指什么生肖| 儿童流鼻血挂什么科| 结核抗体阴性代表什么| 老赖什么意思| 12306什么时候放票| 镜子碎了有什么征兆吗| 什么是溶血性贫血| 平安夜什么时候吃苹果| 1月25号什么星座| 潘多拉是什么意思| 清洁度lv是什么意思| 祛是什么意思| 吃黄瓜对身体有什么好处| 为什么半夜流鼻血| 兑水是什么意思| 异卵双胞胎是什么意思| 什么中毒查不出来| 梦见煮饭是什么意思| 白带有腥味是什么原因| 女性肝囊肿要注意什么| 勺是什么意思| 自带bgm是什么意思| 乐高可以拼什么| 心跳过慢吃什么药| 龙吃什么食物| 乳腺癌吃什么好| 戒断反应是什么| 脚底发黄是什么原因| 有过之而不及是什么意思| 柔软对什么| 田螺姑娘是什么意思| 湍急是什么意思| 过度换气是什么意思| 扁桃体肿大有什么症状| 7月中旬是什么时候| 红班狠疮的早期症状是什么| 保护心脏吃什么最好| 左肾小结石是什么意思| 芙蓉花长什么样| 腿弯疼是什么原因| 什么床最环保没甲醛| 甲状腺吃什么盐| 蜱虫咬了什么症状| 终而复始什么意思| 百度
Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: On Parsing Perl (Once upon a time)

by Anonymous Monk
on Jul 11, 2022 at 11:27 UTC ( [id://11145418]=note: print w/replies, xml ) Need Help??


in reply to On Parsing Perl

I'm currently working on something, (basically perl parser), and apart from the BEGIN block, everything seems parseable (is that the right word?) using some simple LL grammars. Or am I just too uneducated?

Replies are listed 'Best First'.
Re^2: On Parsing Perl (Once upon a time)
by haukex (Archbishop) on Jul 11, 2022 at 11:42 UTC
    everything seems parseable (is that the right word?) using some simple LL grammars.

    No, only perl (the interpreter) can parse all of Perl (the language). See my node here for details.

    Edit: added emphasis.

Re^2: On Parsing Perl (Once upon a time)
by LanX (Saint) on Jul 11, 2022 at 11:58 UTC
    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

      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://11145418]
help
Chatterbox?
and all is quiet...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (2)
As of 2025-08-07 02:02 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.


    属猴和什么属相最配 升白针叫什么名字 支教是什么意思 肚脐周围疼痛是什么原因 肠炎吃什么食物调理
    牙龈长泡是什么原因 甲钴胺片治什么病 耐力是什么意思 什么是乌龙茶 去湿气吃什么药
    什么是轻断食 电销是什么工作 dm是什么意思 四曾念什么 开门是什么意思
    卖是什么意思 生不逢时是什么意思 棒子面是什么 全身瘙痒要警惕什么病 干咳是什么病的前兆
    反酸吃什么马上能缓解hcv9jop7ns9r.cn 生长激素由什么分泌hcv8jop7ns5r.cn 阴阳怪气是什么意思hcv8jop5ns5r.cn 灰色裤子配什么上衣hcv9jop0ns6r.cn 大学团委书记什么级别hcv8jop6ns5r.cn
    罗可以组什么词hcv8jop1ns2r.cn 蜂王浆什么味道hcv8jop7ns2r.cn 天丝是什么成分zhongyiyatai.com sk是什么牌子hcv8jop5ns3r.cn 什么叫有氧运动和无氧运动baiqunet.com
    梦见自己丢钱了什么征兆hcv8jop9ns2r.cn 脚底板疼是什么原因hcv8jop0ns5r.cn 黑魔鬼烟为什么是禁烟hcv9jop3ns2r.cn 胎儿停止发育是什么原因造成的hcv8jop2ns5r.cn 过敏性鼻炎用什么药效果最好hcv9jop1ns2r.cn
    老年人尿血是什么原因hcv8jop3ns6r.cn 感觉牙齿松动是什么原因tiangongnft.com 移交是什么意思hcv9jop6ns5r.cn 痛风急性发作期吃什么药hcv7jop7ns2r.cn 1月2日什么星座xinjiangjialails.com
    百度