[REBOL] learning to parse Re:(2)
From: chaz:innocent at: 7-Oct-2000 1:05
I'm going through a book called "The New English Grammar: A Descriptive
Introduction" by N.R. Cattell, copyright 1969, isbn 0 262 53 015 5 (first
published 1966 as "The Design of English" by Heinemann Educational Books,
Ltd.)
I've learned that parsing is very dependent on the word classes
("constituents") chosen, and the order of these constituents.
Problem. I'm trying to reuse the constituent "nounphrase", and it doesn't
seem to be working. Any ideas?
Rebol []
nominal: [
"Americans" |
"Australians" |
"Dutch" |
"Germans" |
"REBOLs" |
"Masses"
]
determiner: [
"Attractive" |
"Intelligent" |
"Visionary" |
"Dangerous"
"The" |
"Complacent" |
none
]
nounphrase: [determiner nominal]
particle: [
up
|
out
|
over
|
away
|
none
]
verbintransitive: [
understand
|
rule
|
script
|
travel
|
triumph
]
;verbphrase: [verbintransitive particle nounphrase]
verbphrase: [verbintransitive particle nounphrase]
preverb: [
always
|
fortunately
|
certainly
|
none
]
auxiliary: [
will
|
shall
|
should
|
must
|
none
]
predphrase: [ auxiliary preverb verbphrase]
string: "Complacent Masses will always triumph over Dangerous REBOLs"
parse string [nounphrase predphrase]
chaz
REBOL[] print enbase/64 #{26EB2D027A2D85EAFE44404E2FE1DA7247AB} ask []