Skip to content

Commit 6950af0

Browse files
committed
[GR-15213] GitHub issue #69: use char classes in lexer.
PullRequest: fastr/2003
2 parents 9dfd4e4 + 27eb798 commit 6950af0

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

com.oracle.truffle.r.parser/src/com/oracle/truffle/r/parser/ParserGeneration.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,5 +105,6 @@ public class ParserGeneration {
105105
"allow 'function(...=NULL)', which has no effect, but also causes not error in GNU-R",
106106
"report tokens and other metadata to the code builder",
107107
"convert to ANTLR4",
108+
"use character classes instead of character sets in lexer"
108109
};
109110
}

com.oracle.truffle.r.parser/src/com/oracle/truffle/r/parser/R.g

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -954,7 +954,7 @@ fragment OP_NAME
954954
| ('*'|'/'|'+'|'-'|'>'|'<'|'='|'|'|'&'|':'|'^'|'.'|'~'|','|'?')
955955
;
956956

957-
fragment ID_NAME : ('a'..'z'|'A'..'Z'|'α'..'ω'|'Α'..'Ω'|'_') ('a'..'z'|'A'..'Z'|'0'..'9'|'α'..'ω'|'Α'..'Ω'|'_'|'.')* ;
957+
fragment ID_NAME : [\p{Alpha}_] [\p{Alnum}_.]* ;
958958

959959
fragment ESC_SEQ
960960
: '\\' ('b'|'t'|'n'|'f'|'r'|'"'|'\''|'`'|'\\'|' '|'a'|'v')

com.oracle.truffle.r.test.native/packages/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ clean_repo:
6161
for dir in $(SUBDIRS); do \
6262
$(MAKE) PACKAGE=$$dir -C $$dir clean || exit 1; \
6363
done
64-
rm $(REPO_DIR)/PACKAGES*
64+
rm -f $(REPO_DIR)/PACKAGES*
6565

6666
clean_recommended:
6767
rm -rf recommended copy_recommended

0 commit comments

Comments
 (0)