aboutsummaryrefslogtreecommitdiff
path: root/src/interp/spad-parser.boot
diff options
context:
space:
mode:
Diffstat (limited to 'src/interp/spad-parser.boot')
-rw-r--r--src/interp/spad-parser.boot18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/interp/spad-parser.boot b/src/interp/spad-parser.boot
index 3ab5c41a..c7f6e8a8 100644
--- a/src/interp/spad-parser.boot
+++ b/src/interp/spad-parser.boot
@@ -67,6 +67,24 @@ parseName() ==
parseFormalParameter() ==
parseToken 'ARGUMENT_-DESIGNATOR
+parseOperatorFunctionName() ==
+ id := makeSymbolOf(matchCurrentToken 'KEYWORD
+ or matchCurrentToken 'GLIPH
+ or matchCurrentToken 'SPECIAL_-CHAR)
+ symbolMember?(id,$OperatorFunctionNames) =>
+ pushReduction('parseOperatorFunctionName,id)
+ advanceToken()
+ true
+ false
+
+parseAnyId() ==
+ parseName() => true
+ matchString '"$" =>
+ pushReduction('parseAnyId,currentSymbol())
+ advanceToken()
+ true
+ parseOperatorFunctionName()
+
--%
++ Given a pathname to a source file containing Spad code, returns