1*d219b4ceSAdam Hornacek/* 2*d219b4ceSAdam Hornacek * CDDL HEADER START 3*d219b4ceSAdam Hornacek * 4*d219b4ceSAdam Hornacek * The contents of this file are subject to the terms of the 5*d219b4ceSAdam Hornacek * Common Development and Distribution License (the "License"). 6*d219b4ceSAdam Hornacek * You may not use this file except in compliance with the License. 7*d219b4ceSAdam Hornacek * 8*d219b4ceSAdam Hornacek * See LICENSE.txt included in this distribution for the specific 9*d219b4ceSAdam Hornacek * language governing permissions and limitations under the License. 10*d219b4ceSAdam Hornacek * 11*d219b4ceSAdam Hornacek * When distributing Covered Code, include this CDDL HEADER in each 12*d219b4ceSAdam Hornacek * file and include the License file at LICENSE.txt. 13*d219b4ceSAdam Hornacek * If applicable, add the following below this CDDL HEADER, with the 14*d219b4ceSAdam Hornacek * fields enclosed by brackets "[]" replaced with your own identifying 15*d219b4ceSAdam Hornacek * information: Portions Copyright [yyyy] [name of copyright owner] 16*d219b4ceSAdam Hornacek * 17*d219b4ceSAdam Hornacek * CDDL HEADER END 18*d219b4ceSAdam Hornacek */ 19*d219b4ceSAdam Hornacek 20*d219b4ceSAdam Hornacek/* 21*d219b4ceSAdam Hornacek * Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved. 22*d219b4ceSAdam Hornacek * Portions Copyright (c) 2017, 2019, Chris Fraire <cfraire@me.com>. 23*d219b4ceSAdam Hornacek * 24*d219b4ceSAdam Hornacek * ##Legal Notices 25*d219b4ceSAdam Hornacek * Microsoft and any contributors grant you a license to the Microsoft documentation and other content 26*d219b4ceSAdam Hornacek * in this repository under the [Creative Commons Attribution 4.0 International Public License](https://creativecommons.org/licenses/by/4.0/legalcode), 27*d219b4ceSAdam Hornacek * see the [LICENSE](LICENSE) file, and grant you a license to any code in the repository under the [MIT License](https://opensource.org/licenses/MIT), see the 28*d219b4ceSAdam Hornacek * [LICENSE-CODE](LICENSE-CODE) file. 29*d219b4ceSAdam Hornacek * 30*d219b4ceSAdam Hornacek * Microsoft, Windows, Microsoft Azure and/or other Microsoft products and services referenced in the documentation 31*d219b4ceSAdam Hornacek * may be either trademarks or registered trademarks of Microsoft in the United States and/or other countries. 32*d219b4ceSAdam Hornacek * The licenses for this project do not grant you rights to use any Microsoft names, logos, or trademarks. 33*d219b4ceSAdam Hornacek * Microsoft's general trademark guidelines can be found at http://go.microsoft.com/fwlink/?LinkID=254653. 34*d219b4ceSAdam Hornacek * 35*d219b4ceSAdam Hornacek * Privacy information can be found at https://privacy.microsoft.com/en-us/ 36*d219b4ceSAdam Hornacek * 37*d219b4ceSAdam Hornacek * Microsoft and any contributors reserve all others rights, whether under their respective copyrights, patents, 38*d219b4ceSAdam Hornacek * or trademarks, whether by implication, estoppel or otherwise. 39*d219b4ceSAdam Hornacek */ 40*d219b4ceSAdam Hornacek 41*d219b4ceSAdam HornacekIdentifier = ([a-zA-Z] [a-zA-Z0-9_]* | [_] [a-zA-Z0-9_]+) 42*d219b4ceSAdam Hornacek 43*d219b4ceSAdam HornacekNumber = [\-]? ({Numeric_integer} | {Numeric_fp} | {Hexadecimal} | {Binary} | 44*d219b4ceSAdam Hornacek {Octal}) {Literal_type_suffix}? 45*d219b4ceSAdam HornacekDIGIT = [0-9] 46*d219b4ceSAdam HornacekHEXDIG = [0-9A-Fa-f] 47*d219b4ceSAdam HornacekBINDIG = [01] 48*d219b4ceSAdam HornacekOCTDIG = [0-7] 49*d219b4ceSAdam Hornacek 50*d219b4ceSAdam Hornacek/* 51*d219b4ceSAdam Hornacek * "Numeric, no fractional part" 52*d219b4ceSAdam Hornacek */ 53*d219b4ceSAdam HornacekNumeric_integer = {DIGIT} ([_]* {DIGIT})* 54*d219b4ceSAdam Hornacek/* 55*d219b4ceSAdam Hornacek * "Numeric, fractional part" 56*d219b4ceSAdam Hornacek */ 57*d219b4ceSAdam HornacekNumeric_fp = {Numeric_integer} "." {Numeric_integer} 58*d219b4ceSAdam Hornacek/* 59*d219b4ceSAdam Hornacek * "Hexadecimal (base 16)" 60*d219b4ceSAdam Hornacek */ 61*d219b4ceSAdam HornacekHexadecimal = [&][Hh] {HEXDIG} ([_]* {HEXDIG})* 62*d219b4ceSAdam Hornacek/* 63*d219b4ceSAdam Hornacek * "Binary (base 2)" 64*d219b4ceSAdam Hornacek */ 65*d219b4ceSAdam HornacekBinary = [&][Bb] {BINDIG} ([_]* {BINDIG})* 66*d219b4ceSAdam Hornacek/* 67*d219b4ceSAdam Hornacek * "Octal (base 8)" 68*d219b4ceSAdam Hornacek */ 69*d219b4ceSAdam HornacekOctal = [&][Oo] {OCTDIG} ([_]* {OCTDIG})* 70*d219b4ceSAdam Hornacek 71*d219b4ceSAdam Hornacek/* 72*d219b4ceSAdam Hornacek * "Literal type character" 73*d219b4ceSAdam Hornacek */ 74*d219b4ceSAdam HornacekLiteral_type_suffix = ([Ss] | [Ii] | [Ll] | [Dd] | [Ff] | [Rr] | [Uu][IiLlSs] | 75*d219b4ceSAdam Hornacek [Cc] | "%" | "&" | "@" | "!" | "#" | "$") 76