Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add symbol parser

  • Loading branch information...
commit 2175d70ea20c064a185f94e35644924937eb5f1a 1 parent fe62df7
Guillermo Alcantara authored
Showing with 5 additions and 0 deletions.
  1. +1 −0  ideal/ideal-tests.factor
  2. +4 −0 ideal/ideal.factor
View
1  ideal/ideal-tests.factor
@@ -9,6 +9,7 @@ IN: ideal.tests
[ "1a" ideal-identifier ] must-fail
+{ T{ ast-symbol f "ok" } } [ "#ok" ideal-symbol ] unit-test
! Test cases
: ideal-test-suit ( -- )
{
View
4 ideal/ideal.factor
@@ -14,6 +14,10 @@ EBNF: ideal-identifier
Identifier = [a-z] [a-zA-Z0-9]* => [[ join-characters ast-identifier boa ]]
;EBNF
+EBNF: ideal-symbol
+Symbol = "#" [a-zA-Z0-9?_!-+=/*%$:@]+ => [[ first2 nip >string ast-symbol boa ]]
+;EBNF
+
EBNF: ideal
Space = " " | "\t" | "\n"
Spaces = Space* => [[ ignore ]]
Please sign in to comment.
Something went wrong with that request. Please try again.