dcg
Parsing numbers with multiple digits in Prolog
I have the following simple expression parser: expr(+(T,E))-->term(T),\"+\",expr(E). expr(T)-->term(T).[详细]
2023-01-08 09:14 分类:问答Counting definite clause grammar recursions in Prolog
I have the following Prolog definite clause grammar: s-->[a],s,[b]. s-->[]. This will result in words like [a,a,b,b] being accepted in opposite to words like [a,b,a,b]. To put it in a nutshel[详细]
2023-01-07 16:36 分类:问答Learn Prolog Now! DCG Practice Example
I have been progressing through Learn Prolog Now! as self-study and am now learning about Definite Clause Grammars. I am having some difficulty with one of the Practical Session\'s tasks. The task rea[详细]
2023-01-02 10:33 分类:问答韩剧《那年,我们的夏天》1?
今年的爆红黑马韩剧《那年,我们的夏天》在开播后虽然收视平平,却靠着好口碑成为近期韩网话题度最高的韩剧,崔宇植与金多美CP感超强的化学反应加上每集暧昧动人的剧情,让这段从校园走到出社会的爱情变得更加[详细]
2022-12-29 12:19 分类:问答Prolog: Sentence Parser
Been sat here for hours now just staring at this code and have no idea what I\'m doing wrong. I know what\'s happening from tracing the code through (it is going on an eternal loop when it hits verbPh[详细]
2022-12-28 19:57 分类:问答Reading another packages symbol table in Perl
I am trying to read a global symbol from another package. I have the package name as a string. I am using qualify_to_ref from Symbol module[详细]
2022-12-27 01:13 分类:问答SWI-Prolog tokenize_atom/2 replacement?
What I need to do is to break atom to tokens. E. g.: tokenize_string(\'Hello, World!\', L). would unify L=[\'Hello\',\',\',\'World\',\'!\']. Exactly as tok开发者_如何学JAVAenize_atom/2 do. But when[详细]
2022-12-24 03:17 分类:问答Parsing with DCGs in Scheme (without Prolog)?
Lots of Prolog-in-Scheme implementations are out there. 开发者_如何学编程E.g. Kanren, Schelog.[详细]
2022-12-13 01:41 分类:问答