Fixed BnfNodeParser to allow expressions like 'number hundred' when number is a group

This commit is contained in:
2020-06-27 18:56:04 +02:00
parent d4468da8a3
commit 2c5840752a
14 changed files with 593 additions and 228 deletions
+6 -2
View File
@@ -71,8 +71,12 @@ def concept nineties from bnf ninety number where number < 10 as ninety + number
nineties isa number
# def concept hundreds1 from number 'hundred' where number < 10 as number * 100
# def concept hundreds2 from number=number1 'hundred' 'and' number=number2 where number1 < 10 and number2 < 100 as number1 * 100 + number2
# def concept one hundred as 100
# c:one hundred: isa number
def concept one hundred as 100
one hundred isa number
# hundreds1 isa number
# hundreds2 isa number
def concept thousands from bnf number 'thousand' where number < 1000 as number * 1000
thousands isa number
def concept history as history()
def concept plus from a plus b as a + b
def concept mult from a mult b as a * b