diff --git a/collects/honu/core/main.rkt b/collects/honu/core/main.rkt index 68240cf57d..025d007270 100644 --- a/collects/honu/core/main.rkt +++ b/collects/honu/core/main.rkt @@ -20,6 +20,7 @@ [honu-function function] [honu-var var] [honu-equal =] + [honu-not-equal !=] [honu--> %arrow] [honu-class class] [honu-require require] diff --git a/collects/honu/core/private/honu2.rkt b/collects/honu/core/private/honu2.rkt index 967d317a7e..5b4b467f1d 100644 --- a/collects/honu/core/private/honu2.rkt +++ b/collects/honu/core/private/honu2.rkt @@ -248,6 +248,9 @@ (define-unary-operator honu-not 0.7 'left not) (define-binary-operator honu-equal 1 'left equal?) +(define-binary-operator honu-not-equal 1 'left (lambda (left right) + (not (equal? left right)))) + (begin-for-syntax (define (fix-module-name name) diff --git a/collects/honu/core/read.rkt b/collects/honu/core/read.rkt index 99e4502df1..d4eb2c7928 100644 --- a/collects/honu/core/read.rkt +++ b/collects/honu/core/read.rkt @@ -36,7 +36,7 @@ (define-lex-abbrev string-character (:or (:: #\\ any-char) (:~ #\"))) (define-lex-abbrev string (:: #\" (:* string-character) #\")) -(define-lex-abbrev operator (:or "+" "=" "==" "*" "/" "-" "^" "||" "|" "&&" "<=" +(define-lex-abbrev operator (:or "+" "!=" "=" "==" "*" "/" "-" "^" "||" "|" "&&" "<=" ">=" "<-" "<" ">" "!" "::" ":=" "%")) (define-lex-abbrev block-comment (:: "/*" (complement (:: any-string "*/" any-string)) @@ -68,6 +68,7 @@ #; [block-comment (token-whitespace)] ["/*" (token-block-comment)] + ["..." (token-identifier '...)] ["." (token-identifier '%dot)] ["," (token-identifier '%comma)] [":" (token-identifier '%colon)] diff --git a/collects/honu/main.rkt b/collects/honu/main.rkt index 9c8a236583..fc12954720 100644 --- a/collects/honu/main.rkt +++ b/collects/honu/main.rkt @@ -1,6 +1,6 @@ #lang honu/private -(require (prefix-in racket: (combine-in racket/base racket/list))) +(require (prefix-in racket: (combine-in racket/base racket/list racket/file))) ;; require's and provide's a module (define-syntax-rule (provide-module module ...) @@ -17,6 +17,9 @@ ;;"private/function.honu" ) +(define (int x) + (inexact->exact (round x))) + (racket:provide sqr sqrt sin max number? symbol? null @@ -28,11 +31,17 @@ cos sin random filter + append values + int + regexp (racket:rename-out [honu-cond cond] [null empty] [current-inexact-milliseconds currentMilliseconds] [string-length string_length] + [string-append string_append] + [racket:find-files find_files] [racket:empty? empty?] + [regexp-match regexp_match] [racket:first first] [racket:rest rest]))