淋巴系统由什么组成| 天麻与什么煲汤最好| 中医说的湿气重是什么意思| 冬天喝什么茶好呢| 为什么人会打喷嚏| 乙肝需要检查什么项目| 免疫是什么意思| 皮粉色是什么颜色| 什么样的梦想| 祛痣挂什么科| 肠功能紊乱吃什么药| 梦到蛇预示着什么| 手足口病是什么| 开导是什么意思| 8000年前是什么朝代| 撸管是什么| 右手抖是什么病的预兆| 掌心有痣代表什么| 属猴和什么属相相克| 金乌是什么| 十三太保什么意思| 小产可以吃什么水果| bpo是什么意思| 鼻子里面痒是什么原因| b驾照能开什么车| 断眉有什么说法| 咖啡为什么提神| 体内湿热吃什么中成药| 血糖高喝什么牛奶好| 三高可以吃什么水果| 胎儿脉络丛囊肿是什么原因引起的| 喝荷叶茶有什么好处和坏处| 高级护理是干什么的| 什么是低碳生活| 胃部检查除了胃镜还有什么方法| 丝瓜有什么营养| 农历五月的别称是什么| 什么什么自若| 八字中的印是什么意思| 早孕反应最早什么时候出现| 脑血栓有什么症状| 小确幸什么意思| 木字旁的字有什么| 筋膜是什么| 麻蛇是什么蛇| 公关是干什么的| 眩晕症有什么症状| 衙内是什么意思| 章鱼属于什么类动物| poems综合征是什么病| 的近义词是什么| 睡觉打鼾是什么原因| bae什么意思| 风湿什么药好| 长针眼是什么原因| 上环要做什么检查| 手足口病用什么药最好| 4岁打什么疫苗| 做梦梦到鸡是什么意思| 龟头敏感吃什么药| 11月30号什么星座| 六月份出生的是什么星座| 摩羯和什么星座最配| 疾控中心是干什么的| 基诺浦鞋属于什么档次| 欲言又止什么意思| 为什么拔罐肩膀最黑| 白带什么样| 减肥可以吃什么| 牛奶能做什么美食| 马子什么意思| 膳食是什么意思| 醋精和白醋有什么区别| 吃什么最补脑| 取保候审是什么意思还会判刑吗| 妄想症是什么意思| 曦是什么意思| 尿糖是什么意思| 媾是什么意思| boss是什么意思| 花肠是母猪的什么部位| 又什么又什么式的词语| 四级警长是什么级别| 义是什么意思| 吃什么水果能降血压| 中性粒细胞偏低是什么意思| 广东话扑街是什么意思| 情绪高涨是什么意思| 玄色是什么颜色| 一个三点水一个有读什么字| 婴儿老打嗝是什么原因| 为什么叫大姨妈| 正痛片别名叫什么| 核桃和什么一起打豆浆| 类风湿因子高是什么原因| 耳鸣脑鸣是什么原因引起的| 痘坑用什么药膏最有效| 正月十八是什么日子| 补充蛋白质吃什么食物| 基尼是什么货币| ig是什么| 肝内多发钙化灶是什么意思| 鲜字五行属什么| soho是什么意思| 为什么一同房就有炎症| 什么的枝干| 关东煮是什么| 不可抗力是什么意思| 眼睛飞蚊症用什么眼药水| 尿蛋白质阳性什么意思| 鸡的祖先是什么| 挂钩疼挂什么科| 怀孕养狗对胎儿有什么影响| 避孕药叫什么名字| 天鹅吃什么| 有机和无机是什么意思| 鼻子大的男人说明什么| azul是什么颜色| 彰字五行属什么| 太监是什么生肖| 舌头热灼是什么原因| 血小板少是什么病| 下焦湿热吃什么中成药| ood是什么意思| 感冒吃什么菜比较好| 什么品牌的冰箱好| 甘油三酯高吃什么食物好| 哪吒为什么叫哪吒| 浩浩荡荡是什么意思| 智齿冠周炎吃什么消炎药| 经常喝红茶有什么好处和坏处吗| 驴肉不能和什么一起吃| 交易是什么意思| 孕妇吃梨有什么好处| hisense是什么牌子| 多吃火龙果有什么好处和坏处| 高半胱氨酸是什么意思| 吃黑米有什么好处和坏处| 今日什么冲什么生肖| 嘉庆叫什么名字| 焦虑症应该挂什么科室| 晚上吃什么有助于减肥| 大头虾是什么意思| 部队班长是什么军衔| 尿粘液丝高是什么原因| 荷叶有什么功效| ct是检查什么| 高血糖不能吃什么| 蓝眼泪是什么意思| 礼五行属什么| 馍是什么意思| 粑粑是什么意思| 高糖是什么| 小孩舌头发白什么原因| d二聚体是查什么的| 宫腔内稍高回声是什么意思| 严什么什么重| 滥情什么意思| 后生是什么意思| 耐力板是什么材质| 痛风喝什么水| 曙光是什么意思| 睡不着挂什么科| plory是什么牌子| 应激反应是什么意思| 肾功能不全是指什么| 半月板是什么意思| 安居乐业是什么意思| 伤口流水是什么原因| 青柠是什么水果| 河粉是什么| 梦见死去的朋友是什么意思| 黑代表什么生肖| 农历五月属什么生肖| 冉字五行属什么| 皮肤癣用什么药最好| 牙龈肿痛吃什么药最见效| 6月18日是什么星座| 秋葵和什么不能一起吃| 属牛的跟什么属相最配| 吃什么养胃| 嗜酸性粒细胞偏高是什么原因| KT是什么| 6月份怀孕预产期是什么时候| 屁是什么气体| 彩霞是什么意思| 三只手是什么意思| 95年属什么的生肖| 痔疮肛瘘是什么症状| 梦见老虎是什么预兆| 狼吞虎咽什么意思| 贝伐珠单抗是什么药| 缘字五行属什么| 白斩鸡是什么意思| 利尿剂是什么| 4月1日什么星座| 多囊卵巢综合症有什么症状| 3.1是什么星座| 你有一双会说话的眼睛是什么歌| mfr是什么意思| 五月二十号是什么星座| 明年是什么生肖| 低gi什么意思| 什么是卵泡期| 日语一库一库是什么意思| 最好的假牙是什么材质| 散光是什么意思| 异性朋友是什么意思| 三色线分别代表什么| 什么的天| 味淋是什么调料| 心动是什么意思| 为什么会长瘊子| 170是什么码| 淋巴细胞低是什么原因| 小囊性灶是什么意思| 惊弓之鸟是什么故事| 总胆红素偏高是什么意思| 独在异乡为异客异是什么意思| 先锋霉素又叫什么| 72年属什么生肖| 流清鼻涕是什么原因| 便是什么意思| 奶粉中的opo是什么| 心动过速吃什么药| 成也萧何败也萧何什么意思| 流光是什么意思| 扁桃体发炎引起的发烧吃什么药| 南瓜皮可以吃吗有什么作用| 奇花初胎矞矞皇皇是什么意思| 叉烧是什么意思| 吃什么补脑| 强阳下降到什么程度开始排卵| 火红的太阳像什么| 甚嚣尘上什么意思| 什么叫双规| 经常做噩梦的原因是什么| 麻子是什么意思| 双侧卵巢多卵泡是什么意思| 穿什么内衣好| 鹅蛋脸适合什么样的发型| 前列腺增生用什么药好| 内页是什么意思| 为什么肚子总是胀胀的| 炎性改变是什么意思| 酒精肝吃什么药| 食道炎吃什么药| 脂肪肝有什么症状| 花椒桂圆艾绒敷肚脐有什么作用| 婴儿出汗多什么原因| 血尿是什么原因引起的| 纵欲是什么意思| 碱性体质的人有什么特征| 缠足是什么时候开始的| 米加参念什么| 糖类抗原是检查什么的| 梦见橘子是什么意思| 9月份怀孕预产期是什么时候| 凯旋归来是什么意思| 吃什么对嗓子好| 三四月份是什么星座| 什么是癣| 断奶吃什么| 痛风是什么原因造成的| 百度
Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
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 having an uproarious good time at the Monastery: (6)
As of 2025-08-07 10:39 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.


    壶承是什么 什么原因 上火便秘吃什么最快排便 每天喝柠檬水有什么好处 糖耐主要是检查什么
    五月二十一号是什么星座 六味地黄丸有什么作用 栅栏是什么意思 子宫是什么样子图片 什么情况下会猝死
    右手中指指尖麻木是什么原因 日语一库一库是什么意思 三伏天要注意什么 种小麦用什么肥料好 切记是什么意思
    膝盖发软无力是什么原因 口吃是什么意思 unny是什么牌子 蓝绿色是什么颜色 固精是什么意思
    麝香对孕妇有什么危害性hcv7jop9ns5r.cn 马与什么属相相克相冲hcv9jop1ns2r.cn 吃什么东西可以降压hcv9jop1ns6r.cn 一戴套就软是什么原因hcv8jop1ns1r.cn 头晕耳鸣是什么原因引起的hcv8jop7ns4r.cn
    盗汗吃什么药hcv8jop0ns9r.cn 为什么天气热皮肤就痒hcv9jop4ns8r.cn 心力衰竭是什么症状hcv8jop7ns7r.cn hvr是什么意思kuyehao.com 吃素对身体有什么好处hcv7jop6ns6r.cn
    雌激素低吃什么药hcv7jop6ns0r.cn 什么血型可以生出o型血xinmaowt.com 林冲为什么叫豹子头fenrenren.com 空调什么时候发明的hcv8jop0ns9r.cn 血压低是什么情况hcv9jop6ns3r.cn
    碱性磷酸酶偏高说明什么问题hcv8jop6ns4r.cn 拉肚子吃什么hcv8jop7ns8r.cn 买房要看什么hcv9jop5ns9r.cn 乳液是什么hcv9jop5ns1r.cn 及什么意思hcv8jop5ns6r.cn
    百度